Overview
Context: The Flutter app has no local storage — all note data lives in the Python backend's SQLite database. The Flutter app only holds notes in memory (in AppState._notes). There is currently no offline mode.
Before building a proper offline cache (a large task), this issue is about understanding and documenting the current failure modes when the backend becomes unreachable mid-session, and fixing the most dangerous ones.
What needs to be done
Audit (do this first)
Fix the worst failure modes
Document the findings
Goal
No action the user can take in the app while the backend is down causes a crash or an unhandled exception. All failures are caught and shown as user-readable error messages. The data already loaded in memory remains visible.
Where to look
app/lib/services/app_state.dart — all API calls, error handling
app/lib/screens/note_editor_screen.dart — auto-save debounce and status indicator
app/lib/services/api_client.dart — HTTP calls that can throw
Notes
True offline editing (local SQLite cache in Flutter) is a much larger project and is NOT part of this issue. This issue is purely about graceful degradation.
Related to: #12, #24, #26 | Parent: #17
Overview
Context: The Flutter app has no local storage — all note data lives in the Python backend's SQLite database. The Flutter app only holds notes in memory (in
AppState._notes). There is currently no offline mode.Before building a proper offline cache (a large task), this issue is about understanding and documenting the current failure modes when the backend becomes unreachable mid-session, and fixing the most dangerous ones.
What needs to be done
Audit (do this first)
Fix the worst failure modes
try/catchinAppStateand show aSnackBarinsteadNoteEditorScreenshould catch HTTP errors and show "Save failed — backend unreachable" in the save status indicator (already has a "Saved" / "Saving..." indicator — add a red "Save failed" state)loadNotes()orloadNotebooks()fails, keep the last successfully loaded data in memory rather than clearing the listDocument the findings
app_state.dartsummarising which operations are safe when offline and which are not — this will guide whoever implements true offline caching in the futureGoal
No action the user can take in the app while the backend is down causes a crash or an unhandled exception. All failures are caught and shown as user-readable error messages. The data already loaded in memory remains visible.
Where to look
app/lib/services/app_state.dart— all API calls, error handlingapp/lib/screens/note_editor_screen.dart— auto-save debounce and status indicatorapp/lib/services/api_client.dart— HTTP calls that can throwNotes
Related to: #12, #24, #26 | Parent: #17