fix(dashboard): route gear chips to /equipment instead of missing /gear - #740
Merged
Merged
Conversation
The dashboard gauge strip and urgent banner navigated to `/gear`, which is not a registered route (the gear/equipment section lives at `/equipment`). Tapping "Add gear", a gear service chip, or the urgent banner therefore threw `GoException: no routes for location: /gear` and showed the "Page Not Found" screen. - Add-gear chip now pushes `/equipment/new` (opens the add form directly, matching how gear is added elsewhere). - Gear service chips and the overdue-service urgent banner now go to the `/equipment` list. The widget tests defined their own stub `/gear` route, so they passed against a path the real app router never had. Updated the stubs and assertions to the real `/equipment` routes so they now guard against a regression.
etlami
force-pushed
the
fix/dashboard-gear-route
branch
from
July 27, 2026 09:01
15cdabe to
01512ce
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a dashboard navigation crash caused by dashboard widgets routing to a non-existent /gear location, aligning them with the app’s actual equipment section routes under /equipment.
Changes:
- Update dashboard widgets to navigate to
/equipmentand/equipment/newinstead of/gear. - Adjust dashboard widget tests’ stub
GoRouterroutes and assertions to match the real router paths. - Ensure “Add gear” from the dashboard opens the add-equipment form directly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/features/dashboard/presentation/widgets/gauge_strip.dart | Routes “Add gear” to /equipment/new and gear-service chips to /equipment. |
| lib/features/dashboard/presentation/widgets/urgent_banner.dart | Routes overdue-service urgent banner to /equipment. |
| test/features/dashboard/presentation/widgets/gauge_strip_test.dart | Updates stub routes and assertions to /equipment and /equipment/new. |
| test/features/dashboard/presentation/widgets/urgent_banner_test.dart | Updates stub route and assertions to /equipment. |
| test/features/dashboard/presentation/pages/dashboard_page_test.dart | Updates stub router to include /equipment with nested new route. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
|
📦 Build artifacts for this PR · commit
Artifacts expire in 7 days. Downloading requires being signed in to GitHub. The macOS build is ad-hoc signed — right-click → Open on first launch. Updated automatically on each push. |
ericgriffin
approved these changes
Jul 28, 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.
Problem
On the home dashboard, tapping + Add gear (and the gear service chips / the overdue-service urgent banner) crashes to the Page Not Found screen with:
There is no
/gearroute inapp_router.dart— the gear/equipment section is registered at/equipment. The dashboard widgets just navigate to the wrong path.Fix
lib/features/dashboard/presentation/widgets/:context.push('/equipment/new')(opens the add-gear form directly, consistent with how gear is added elsewhere, e.g.equipment_list_content.dart).context.go('/equipment')(the gear list)./equipment.Why the tests didn't catch it
gauge_strip_test.dartandurgent_banner_test.dartbuilt their own stubGoRouterthat defined a/gearroute, so they asserted navigation against a path the real app router never had. Updated the stub routes and assertions to the real/equipment//equipment/newroutes so they now guard against this regression.Testing
Run locally against Flutter 3.44.8 / Dart 3.12.2:
flutter test test/features/dashboard/-> all pass (43 tests)flutter analyzeon the changed files -> no issuesdart format-> clean