Overview
Context: The Flutter app currently gives no visual indication when the Python backend is unreachable. If the backend goes down after the initial connection, the user sees a blank notes list (or stale data) with no explanation. There is no persistent UI element that communicates backend reachability.
This issue adds a simple, non-intrusive banner to the HomeScreen that appears when the backend is unreachable.
What needs to be done
Goal
When the Python backend stops responding, a yellow/red banner appears at the top of the HomeScreen within one API call's worth of time. When the backend comes back and any call succeeds, the banner disappears automatically.
Where to look
app/lib/services/app_state.dart — add _backendReachable, update it in all catch blocks
app/lib/screens/home_screen.dart — _DesktopLayout and _MobileLayout — add the banner above the main content area
- Flutter
MaterialBanner widget docs for reference
Edge cases
- Do not show the banner if sync is simply unconfigured (no WebDAV set up) — only when the backend API itself is unreachable
- Do not show the banner on the
ConnectScreen — it only belongs on the HomeScreen
- The banner should not push the notebook sidebar or notes list out of position on the desktop layout
Testing steps
Notes
This is a good first issue. It requires only Flutter changes — a new boolean in AppState and a conditional widget in HomeScreen.
Related to: #12, #22, #23, #24
Overview
Context: The Flutter app currently gives no visual indication when the Python backend is unreachable. If the backend goes down after the initial connection, the user sees a blank notes list (or stale data) with no explanation. There is no persistent UI element that communicates backend reachability.
This issue adds a simple, non-intrusive banner to the
HomeScreenthat appears when the backend is unreachable.What needs to be done
AppState(app/lib/services/app_state.dart), add abool _backendReachable = truefield with a getter, and expose it vianotifyListeners()whenever it changes_backendReachable = falsein anycatchblock inAppStatewhere an API call fails due to a connection error (distinguish connection errors from 4xx/5xx errors — a 404 is not "offline")_backendReachable = truewhen any API call succeedsHomeScreen(home_screen.dart), wrap the main content in aColumnand conditionally show aMaterialBannerorAnimatedSwitcher-wrapped container at the top when!appState.backendReachable:AppState.checkBackendHealth()(orAppState.connect())_backendReachablebecomestrueagainGoal
When the Python backend stops responding, a yellow/red banner appears at the top of the
HomeScreenwithin one API call's worth of time. When the backend comes back and any call succeeds, the banner disappears automatically.Where to look
app/lib/services/app_state.dart— add_backendReachable, update it in all catch blocksapp/lib/screens/home_screen.dart—_DesktopLayoutand_MobileLayout— add the banner above the main content areaMaterialBannerwidget docs for referenceEdge cases
ConnectScreen— it only belongs on theHomeScreenTesting steps
Notes
Related to: #12, #22, #23, #24