fix(feedback,routing): Navigator-overlay toasts and redirect/title fixes - #107
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Improves framework UX resilience by routing feedback toasts through the Navigator Overlay (so they work without a Scaffold) and tightening two routing behaviors: redirect re-evaluation on auth-state changes and correct title-suffix handling when the suffix is blank.
Changes:
- Render
MagicFeedbacksnackbars/toasts via a single overlay-toast mechanism (with transparentMaterialwrapping to avoid fallbackDefaultTextStyleartifacts). - Wire GoRouter
refreshListenabletoAuth.stateNotifierso redirects re-run automatically on login/logout/restore. - Treat a blank/whitespace title suffix as “absent” (no dangling separator), with test coverage added.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/routing/title_manager_test.dart | Adds coverage for treating blank title suffix as absent. |
| test/routing/router_auth_refresh_test.dart | New widget tests proving auth-state bumps re-run redirects without loops. |
| lib/src/ui/magic_feedback.dart | Replaces ScaffoldMessenger snackbars with Navigator Overlay-based toasts and adds text-style hardening. |
| lib/src/routing/title_manager.dart | Implements blank-suffix suppression via _withSuffix. |
| lib/src/routing/magic_router.dart | Adds refreshListenable resolved from Auth.stateNotifier with defensive fallback. |
| example/pubspec.lock | Updates example dependency lock resolutions. |
| CHANGELOG.md | Documents the fixes under [Unreleased]. |
… no dangling separator
…d color params, and guard degrade-path logging
anilcancakir
force-pushed
the
feat/design-first-component-system
branch
from
July 21, 2026 07:12
b62dbf3 to
60fafc6
Compare
Contributor
Author
|
Addressed the review feedback in
Also folded in the original overlay-toast underline fix (transparent |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
Hardens the
MagicFeedbacktoast path and two routing behaviors, surfaced while building on the framework.Feedback (overlay toasts)
Overlayso they show without aScaffoldancestor.Scaffoldhosts it (no silent drop).Materialso its text no longer inherits the root fallbackDefaultTextStyle(the yellow debug double-underline);Magic.error/success/toastnow render clean text.Routing
APP_NAMEresolving to"") as absent, so the browser tab shows just the route title instead of"Route | "with a dangling separator.Testing
flutter test test/routing/title_manager_test.dartgreen (39). The transparent-Material toast fix is a rendering change verified against a real overlay (no unit harness).