Add Deck browsing feature with controller, UI, routing, and format helpers - #49
Add Deck browsing feature with controller, UI, routing, and format helpers#49ercmine wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d246eab80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state = state.copyWith( | ||
| isLoadingInitial: true, | ||
| plans: const [], | ||
| nextCursor: null, | ||
| errorMessage: null, |
There was a problem hiding this comment.
Reset deck history when starting a refresh
refresh() clears plans and nextCursor but keeps undoStack and shownPlanIds, so after a user swipes some cards and taps Retry, Undo can restore cards from the previous run and swipe telemetry positions continue from stale history. This mixes old results into a fresh deck session and produces inaccurate interaction tracking.
Useful? React with 👍 / 👎.
| Future<void> requestLocation() async { | ||
| await _requestPermissionAndLoadLocation(); | ||
| await initialize(); |
There was a problem hiding this comment.
Avoid duplicate location requests in requestLocation
requestLocation() invokes _requestPermissionAndLoadLocation() and then calls initialize(), which calls _ensureLocation() and can invoke the same permission/load flow again when location is still unavailable. In denied or disabled-location scenarios, one tap triggers duplicate location requests and extra state churn.
Useful? React with 👍 / 👎.
Motivation
Description
deck_state.dart), controller (deck_controller.dart) with telemetry, location and repository integration, and a new route at/sessions/:id/deckwired intorouter.dartandsession_page.dart.deck_page.dartand a set of widgets for cards and details (deck_card.dart,deck_card_skeleton.dart,deck_actions_bar.dart,card_details_sheet.dart, and several small badges/pills), and hooked link launching into existinglinkLauncherProviderusage.deckControllerProviderinproviders/app_providers.dart, added format helpers incore/format/formatters.dart, and updatedpubspec.yamlto includeflutter_card_swiper,cached_network_image, andcollectiondependencies.Testing
flutter analyzeto ensure static analysis and imports are correct and it completed successfully.flutter testand unit/widget tests completed successfully (no failing tests).Codex Task