Replace local SyncTaskRegistry with gto-support-sync library#4447
Merged
Conversation
…tation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
frett
commented
Jun 3, 2026
frett
left a comment
Contributor
Author
There was a problem hiding this comment.
Review
Removes the hand-rolled SyncTaskRegistry from :app and replaces it with rememberSyncTaskRegistry / rememberSyncTask from gto-support-sync across all three dashboard presenters. Also fixes a pre-existing bug in ToolsPresenter where the fallback sync locale was a one-shot read instead of a reactive flow.
✅ Looks Good
- ktlint — passes clean
- Presenter patterns —
DashboardPresentercorrectly callssyncRegistry.rememberSyncTask { }directly on the returned registry (not viacircuitContext.rememberSyncTask { }), which avoids theDisposableEffecttiming gap where the context tag isn't set until after first composition LessonsPresenter/ToolsPresenter—circuitContext.rememberSyncTask(locale) { }is the right child-presenter pattern; behavior is equivalent to the oldDisposableEffectregistration- Test updates —
putTag(syncTaskRegistry)correctly replaces theinternalextension setter for cross-module test setup;circuitContext.tag<SyncTaskRegistry>()correctly replaces theinternalgetter inDashboardPresenterTest SyncTaskRegistryTestdeletion — correct; the library's own tests cover this behaviorappLanguageFlowfix —collectAsState()on theStateFlowprovides a stable initial value immediately; recomposition on locale change is intentional and correct- Initialization order in tests —
syncTaskRegistryis declared beforecircuitContextin both test classes, so property initialization is safe
🤖 Posted by Claude Code
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4447 +/- ##
===========================================
- Coverage 52.34% 52.26% -0.09%
===========================================
Files 457 456 -1
Lines 12228 12202 -26
Branches 2122 2119 -3
===========================================
- Hits 6401 6377 -24
Misses 5202 5202
+ Partials 625 623 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SyncTaskRegistryclass and migrates all three dashboard presenters (DashboardPresenter,LessonsPresenter,ToolsPresenter) to userememberSyncTaskRegistry/rememberSyncTaskfrom thegto-support-synclibrarySyncTaskRegistrydirectly viaputTag()instead of the now-internalextension property, and deletesSyncTaskRegistryTest(covered by the library's own tests)ToolsPresenterwhere the sync locale fell back tosettings.appLanguage(a one-shot read) — it now usessettings.appLanguageFlow.collectAsState()so locale changes are reflected reactivelyTest plan
./gradlew testpasses./gradlew :build-logic:ktlintCheck ktlintCheckpasses🤖 Generated with Claude Code