refactor: migrate OrgRepo, UserRepo, and device config to entity DAOs (#1235) - #1
Open
marsof02 wants to merge 6 commits into
Open
refactor: migrate OrgRepo, UserRepo, and device config to entity DAOs (#1235)#1marsof02 wants to merge 6 commits into
marsof02 wants to merge 6 commits into
Conversation
This was referenced Jun 18, 2026
* refactor: split TextButton.kt into multiple focused files for better organization * fix: restore throttled navigation and resolve ktlint issues after TextButton split (Greenstand#1237) * Clean up README.md by removing conflict markers Removed unnecessary merge conflict markers from README. --------- Co-authored-by: Aneesh Pallapolu <yaagnik.p@gmail.com>
* chore(deps): bump Compose to 1.10.5, compileSdk to 36, add Navigation 3 deps Prerequisite for the Navigation 2 -> Navigation 3 migration: navigation3-ui 1.1.1 requires Compose >= 1.10.0 and compileSdk 36. material-icons-extended stays at 1.7.8 (last published version). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(navigation): migrate from Navigation 2 to Navigation 3 Replace androidx.navigation:navigation-compose with androidx.navigation3: - Routes implement NavKey; back stack owned by the app via rememberNavBackStack - New Navigator + NavOptions DSL (popUpTo<T>, popUpToRoot, launchSingleTop) replacing NavHostController and NavigationUtils' throttled helpers - NavHost -> NavDisplay in Host.kt and ImageCaptureActivity, with saveable-state and ViewModel-store entry decorators and the same 500ms fade transitions - trackedComposable -> custom screen-tracking NavEntryDecorator (Crashlytics breadcrumbs); HandleUIEvents gains an origin-is-top guard replacing the Nav2 RESUMED check - Org deep link parsed manually from the launch intent (cold start only, matching previous behavior) - NavigatorTest + FakeNavigator; previews/screenshot harness on LocalNavigator Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(navigation): provide NavigationEventDispatcherOwner for NavDisplay NavDisplay's back handling crashed on launch: AppCompatActivity's setContentView (appcompat 1.7.x) plants only the pre-navigationevent view-tree owners, so nav3 could not find a NavigationEventDispatcher. - Bump androidx.activity to 1.12.0, where ComponentActivity implements NavigationEventDispatcherOwner - Plant the view-tree owner on the decor view in TreeTrackerActivity Verified on a Pixel 7 API 35 emulator: cold start, splash auto-nav, signup back handling, and org deep link all work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test(navigation): cover deep link parsing, route registry, event execution - OrgDeepLinkTest (10 cases): parseStartRoute over valid/invalid scheme, host, path, query params, and URL-encoding (Robolectric for android.net.Uri) - RouteRegistryTest (8 cases): no-arg resolution to NavKey, arg-route null, alias normalization, isValidRoute - SettingsViewModelTest: two cases now execute the NavigationEvent lambda against a FakeNavigator and assert the resulting back stack, covering the event -> Navigator wiring and the new popUpToRoot() logout path Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(navigation): scope nav throttle per-screen instead of globally The 300 ms navigation throttle lived on a single lastMutationTime field on the one Navigator per NavDisplay, making it a global lock across every screen and button: navigating on one screen dropped any navigation from another for 300 ms, so a user could not tap "next" through a flow quickly. Bind each screen its own origin-scoped Navigator (via the per-entry decorator) and gate throttled calls on "is my screen still the top of the stack?" rather than a wall-clock timer: - Navigator gains an `origin` binding and `scopedTo(originContentKey)`; isThrottled() drops a throttled call only when the caller's origin is no longer on top. Unscoped navigators keep the time-based debounce as a fallback for tests and non-entry hosts. - rememberScreenTrackingNavEntryDecorator re-provides LocalNavigator as a view scoped to the entry's contentKey, so every screen gets per-screen double-tap protection with no call-site changes. Result: rapid "next" across different screens all succeed (no time gap), while a double-tap on one screen drops the second navigation (origin no longer top). Also removes the side effect where a non-throttled navigate armed the window. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(navigation): shorten nav fade to 300ms Reduce the NavDisplay transition duration from 500ms to 300ms. On a pop, NavDisplay deliberately keeps the outgoing screen on top for the full fade (targetZIndex = initialZIndex - 1f), so during that window it intercepts taps meant for the revealed screen behind it. Halving the window makes tapping the revealed screen right after Back land reliably, and makes transitions snappier overall. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…enstand#1235) (Greenstand#1303) * docs: add task_22 plan for splitting TreeTrackerDAO (Greenstand#1235) * refactor: extract entity-specific Room DAO interfaces (Greenstand#1235) * refactor: wire new DAOs in AppDatabase and RoomModule (Greenstand#1235) * chore: run codeAnalysis formatting on database DAO files (Greenstand#1235) * docs: add task_24 plan for splitting TreeTrackerDAO (Greenstand#1235) --------- Co-authored-by: Jonathan Muller <elforama@gmail.com>
|
👋 Hi @marsof02, thanks for the contribution! Before this PR can be reviewed and merged, please add:
Just drag-and-drop the file(s) into the PR description and GitHub will upload them. This check re-runs automatically when you edit the description. This PR is marked as non-UI, so a screenshot is not required — but a video is still required, showing that the parts of the app affected by this change still work correctly. |
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.
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
./codeAnalysisto automatically apply formatting/linting)Part of Greenstand#1235 🦕
Summary
PR 2 of 6 for Greenstand#1235 — migrates leaf consumers off
TreeTrackerDAO:Stacks on Greenstand#1303 (branch
chore/split-treetracker-dao).Merge after PR 1, or review against that branch only.
TreeTrackerDAOis still used elsewhere; removed in a later PR.Out of scope (follow-up PRs)
TreeTrackerDAO, split tests