GT-3107 Convert AccountLayout to Circuit - #4592
Open
tjohnson009 wants to merge 1 commit into
Open
tjohnson009 wants to merge 1 commit into
tjohnson009 wants to merge 1 commit into
Conversation
Converts the Account screen to a Circuit Presenter/UI pair, replacing AccountActivity and AccountViewModel. The presenter also absorbs the single-flow AccountActivityViewModel and GlobalActivityViewModel so the entire screen renders from a plain UiState, which unblocks full-screen Paparazzi coverage (GT-3108). - Add AccountScreen ParcelableScreen - Add AccountPresenter with UiState/UiEvent nested per convention; syncing uses the shared SyncTaskRegistry/SyncTracker mechanism from gto-support, matching DashboardPresenter - AccountLayout is now a @CircuitInject UI wrapped in DrawerMenuLayout - Up navigation flows through navigator.pop() via UiEvent.NavigateUp - Drawer menu launches the screen via startCircuitActivity(AccountScreen) - Remove AccountActivity from the manifest Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mm8jFZh3uaPNENLcbnuxow
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #4592 +/- ##
===========================================
+ Coverage 53.54% 53.89% +0.34%
===========================================
Files 440 438 -2
Lines 11582 11588 +6
Branches 1960 1962 +2
===========================================
+ Hits 6202 6245 +43
+ Misses 4790 4751 -39
- Partials 590 592 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
frett
reviewed
Sep 8, 2026
Comment on lines
+77
to
+82
| userActivity = remember { userActivityManager.userActivityFlow } | ||
| .collectAsState(UserActivity(emptyMap())).value, | ||
| globalActivity = GlobalActivityScreen.UiState( | ||
| activity = remember { globalActivityRepository.getGlobalActivityFlow() } | ||
| .collectAsState(GlobalActivityAnalytics()).value | ||
| ), |
Contributor
There was a problem hiding this comment.
let's put these changes on hold, I think I want global activity and account activity to have their own sub-presenters and not just be wrapped up into a large Account Presenter
Contributor
There was a problem hiding this comment.
I need to do some research to see if SubCircuit fits this use case or not
This was referenced Sep 24, 2026
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.
Resolves GT-3107
Converts the Account screen to a Circuit Presenter/UI pair, following the same structure as the Dashboard and Tool Details conversions. Follow-up from the review of #4583.
Changes
AccountScreen— new@Parcelize data objectParcelableScreen.AccountPresenter— replacesAccountViewModel, withUiState/UiEventnested in the presenter (internal,@ConsistentCopyVisibility) matchingDashboardPresenter. It also absorbsAccountActivityViewModelandGlobalActivityViewModel(each was a singlestateInflow), so the child pager pages are driven from the same state object. Syncing uses the sharedSyncTaskRegistry/SyncTrackermechanism from gto-support — the same pattern asDashboardPresenter— so the initial sync fires on task registration, pull-to-refresh flows throughtriggerSyncTasks(force = true), and sync failures are caught and logged bySyncTracker. Up navigation isnavigator.pop().AccountLayout— now a@CircuitInjectUI that is a pure function ofUiState, wrapped inDrawerMenuLayout(preserving the drawer previously provided byAccountActivity). Rendering is unchanged — the pre-existingAccountLayoutHeaderPaparazzi goldens verify without modification.AccountLayoutHeaderalso gained amodifierparameter.startCircuitActivity(AccountScreen)through the sharedCircuitActivityhost.AccountActivity,startAccountActivity(),AccountLayoutEvent, and the manifest entry are removed.Why child ViewModels were converted in the same pass
AccountActivityLayout/GlobalActivityLayoutpreviously instantiated ViewModels inside composition, which is what made the assembled screen unrenderable in Paparazzi. With the whole screen state-driven, GT-3108 (consolidating the Account Paparazzi tests to full-screen snapshots) is unblocked.Tests
AccountPresenterTestcovering state production (user, pages incl. remote-config gating, activity data, drawer), the launch-time sync, forced sync via pull-to-refresh, and up navigation. Sync tests gate the mocked sync service on aCompletableDeferredso theisSyncRunningtransitions are asserted deterministically.verifyPaparazzipasses against the existing goldens; full app unit tests and ktlint pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mm8jFZh3uaPNENLcbnuxow