Adopt go_router for app navigation #6

Closed
opened 2026-09-11 13:30:22 +00:00 by tech · 0 comments
Owner

Goal

Adopt go_router for centralized URL-based navigation in the Flutter app.

Approach

Replace MaterialApp.onGenerateRoute with a lifecycle-owned GoRouter and named routes. Preserve signup and email-confirmation flows, localized UI and deep links. Keep transient signup email out of serialized browser history. Preserve the unknown-route fallback to login with a canonical URL.

Acceptance criteria

  • Existing pages use go_router and centralized route definitions.
  • Signup, confirmation tokens, missing tokens, and login return work.
  • Route changes and browser navigation do not retain stale verification results.
  • Locale changes preserve route and state; unknown URLs safely return to login.
  • Formatting, analysis, frontend tests and web build pass.

Notes

The current routes are public. Real session/KYC authorization and protected destinations are outside this migration. Existing uncommitted work is preserved.

Implementation and validation

Adopted go_router 18.0.1 with a lifecycle-owned router, named routes, canonical unknown-route fallback, and transient-extra codec. Migrated signup and verification navigation. Query-token changes reset verification and discard stale asynchronous results.

dart format --output=none --set-exit-if-changed frontend/app/lib frontend/app/test, app flutter analyze, make test-frontend (56 tests), and flutter build web --no-wasm-dry-run passed. Browser checked direct confirmation reload, return-to-login URL, and browser back/forward. Preview rebuilt at http://127.0.0.1:5123/. Public routes remain public; session/KYC guards await real account state and protected pages. Changes remain uncommitted locally.

Delivery

Implementation is now committed and pushed in PR #9. Earlier notes describing uncommitted work are superseded by this delivery. Current implementation branch: routing-6. Review order is #7 → #8 → #9; PRs #7, #8 and #9 are now merged into main.

Validation: all 56 frontend tests, all four Flutter package analyses, formatting checks and app web build passed. Website tests (3), Astro check and website build passed. Durable scope, limitations and workflow are stored in docs/implementation.md, AGENTS.md, frontend/AGENTS.md and .agents/skills/.

Merge completion

Merged through PRs #7, #8 and #9 in dependency order with merge commits. All contributions are on main at abc3f2d. Local main is synchronized and its tree matches the previously validated routing-6 tree exactly. Task completed.

### Goal Adopt go_router for centralized URL-based navigation in the Flutter app. ### Approach Replace MaterialApp.onGenerateRoute with a lifecycle-owned GoRouter and named routes. Preserve signup and email-confirmation flows, localized UI and deep links. Keep transient signup email out of serialized browser history. Preserve the unknown-route fallback to login with a canonical URL. ### Acceptance criteria - [x] Existing pages use go_router and centralized route definitions. - [x] Signup, confirmation tokens, missing tokens, and login return work. - [x] Route changes and browser navigation do not retain stale verification results. - [x] Locale changes preserve route and state; unknown URLs safely return to login. - [x] Formatting, analysis, frontend tests and web build pass. ### Notes The current routes are public. Real session/KYC authorization and protected destinations are outside this migration. Existing uncommitted work is preserved. ### Implementation and validation Adopted go_router 18.0.1 with a lifecycle-owned router, named routes, canonical unknown-route fallback, and transient-extra codec. Migrated signup and verification navigation. Query-token changes reset verification and discard stale asynchronous results. `dart format --output=none --set-exit-if-changed frontend/app/lib frontend/app/test`, app `flutter analyze`, `make test-frontend` (56 tests), and `flutter build web --no-wasm-dry-run` passed. Browser checked direct confirmation reload, return-to-login URL, and browser back/forward. Preview rebuilt at http://127.0.0.1:5123/. Public routes remain public; session/KYC guards await real account state and protected pages. Changes remain uncommitted locally. ### Delivery Implementation is now committed and pushed in [PR #9](https://git.sendico.io/tech/sxchnge/pulls/9). Earlier notes describing uncommitted work are superseded by this delivery. Current implementation branch: `routing-6`. Review order is #7 → #8 → #9; PRs #7, #8 and #9 are now merged into `main`. Validation: all 56 frontend tests, all four Flutter package analyses, formatting checks and app web build passed. Website tests (3), Astro check and website build passed. Durable scope, limitations and workflow are stored in `docs/implementation.md`, `AGENTS.md`, `frontend/AGENTS.md` and `.agents/skills/`. ### Merge completion Merged through PRs #7, #8 and #9 in dependency order with merge commits. All contributions are on `main` at `abc3f2d`. Local `main` is synchronized and its tree matches the previously validated `routing-6` tree exactly. Task completed.
tech added the frontend label 2026-09-11 13:30:22 +00:00
tech self-assigned this 2026-09-11 13:30:22 +00:00
tech added this to the SXCHNGE project 2026-09-11 13:30:22 +00:00
tech added reference routing-6 2026-09-11 13:30:25 +00:00
tech changed reference from routing-6 to routing-6 2026-09-11 13:38:43 +00:00
tech closed this issue 2026-09-11 13:46:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tech/sxchnge#6