Repository navigation
Conversation
… toast MemoryGraphPage reloads silently on every app resume. BasedHardware#22078 rewrote its catch block and dropped the old `if (!silent)` guard, so a resume refresh that fails while a map is loaded now shows "Couldn't load knowledge graph · Try again". The Memories tab stays alive in Home's IndexedStack, so the toast appears on whatever tab is open, usually Home. Background refreshes now keep the current map quietly again; a refresh the person starts still reports the failure.
|
The fix is correct and tightly scoped — it restores the pre-#22078 quiet behavior for background refreshes, with a test covering both paths. No blocking issues. Per file:
UX: one deliberate trade-off worth naming — after a failed silent resume refresh, the map stays stale until the next explicit refresh. That matches the pre-#22078 behavior and is the right call for a toast that would otherwise appear over unrelated tabs. USER IMPACT: Returning to the app while offline no longer pops a "Couldn't load knowledge graph" toast over whatever tab you're on; the saved Mind Map stays as-is, and tapping Refresh still reports failures. Nothing further needed from my side — the test coverage is appropriate for the change. Leaving the merge call to a maintainer. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
What's wrong
MemoryGraphPagereloads silently every time the app comes back to the foreground:Before #22078 a failed silent load did nothing (
if (!silent) setState(...)). The rewritten catch block dropped that guard, so a resume refresh that fails while a map is loaded now raises the toast:The Memories tab stays alive in Home's
IndexedStackonce visited, and its Mind Map preview is aMemoryGraphPage. The toast goes to the rootScaffoldMessenger, so it shows on whatever tab is open, usually Home, which has no map on it. Coming back to the app while offline, or closing Control Center with airplane mode on, is enough.Change
Only show the toast for a refresh the person started. A silent refresh keeps the current map, as it did before #22078. The empty-map and session-changed branches are unchanged.
Tests
test/widgets/memory_graph_empty_state_test.dart: "a failed refresh on app resume keeps the map without a toast". It loads a map, resumes with a failing loader (no toast, map still shown; fails on main), then taps Refresh with the same failing loader (toast shown). The other 16 graph tests pass unchanged.Product invariants affected
app/lib/pages/memories/**). This changes when a Mind Map load failure is announced; memory tiers, collections and Archive access are untouched.UI-Evidence: none -- removes a toast from a background refresh; the widget test pins both the silent and the user-started case.
Failure-Class: none