-
Notifications
You must be signed in to change notification settings - Fork 136
Migrate ThemeModel to Room
#15045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Migrate ThemeModel to Room
#15045
Conversation
- Convert all classes and methods to Kotlin syntax - Use @JvmField for properties accessed from Java code - Maintain exact same behavior and API - All tests passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Convert ThemeModel to Room entity with composite primary key (siteId, themeId, isWpComTheme) - Create ThemeDao with direct @upsert exposure following OrderStatusDao pattern - Remove ThemeSqlUtils and move business logic to ThemeStore - Add LocalIdConverter for Room type conversion - Add comprehensive ThemeDaoTest with 13 test cases - Rewrite ThemeStoreUnitTest from Java to Kotlin - Update WPAndroidDatabase to version 31 with AutoMigration - Use site.localId() instead of LocalId(site.id) - Use runBlocking without dispatcher to preserve threading behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Generated by 🚫 Danger |
Updates ThemeRepository to use the new Room-based ThemeModel constructor with all required parameters instead of the deprecated default constructor. This fixes compilation errors in the Wasabi debug unit tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The LocalIdConverter was defined in both fluxc and fluxc-plugin modules, causing a "Type is defined multiple times" error during dex merging. Since fluxc-plugin already depends on fluxc via api dependency, it inherits the LocalIdConverter from the fluxc module. Removed the duplicate from fluxc-plugin to resolve the build error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
- Remove unused imports from ThemeStore, ThemeDao, and ThemeStoreUnitTest - Fix import ordering in WPAndroidDatabase (ThemeModel should come before persistence imports) - Remove unused createSite function from ThemeDaoTest - Rename test functions to follow detekt naming convention: "when X, then Y" All 19 detekt issues have been resolved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #15045 +/- ##
============================================
- Coverage 38.61% 38.52% -0.09%
- Complexity 10311 10312 +1
============================================
Files 2163 2167 +4
Lines 122674 122936 +262
Branches 16934 16945 +11
============================================
+ Hits 47365 47366 +1
- Misses 70503 70765 +262
+ Partials 4806 4805 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closes: AINFRA-548: Migrate
ThemeModelDescription
Test Steps
Images/gif
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.