Overview
Context: The Python backend already handles sync conflicts automatically using one of three strategies (LAST_WRITE_WINS, KEEP_BOTH, MERGE_STROKES — see nexanote/sync/conflict.py). After a sync, GET /sync/status returns a conflicts_resolved count. The SettingsScreen displays this count in its sync stats section.
The gap: If conflicts were resolved during a sync triggered from the sidebar button, the user gets no feedback — they'd have to navigate to Settings to see the count. Worse, with KEEP_BOTH strategy, a conflict copy is created as a new note, and the user won't know it exists unless they happen to scroll to it.
What needs to be done
Goal
After a sync that resolved conflicts, the user immediately sees a warning that something was auto-resolved and can navigate to their notes to review the outcome — without needing to open Settings.
Where to look
app/lib/services/app_state.dart — triggerSync(), add getSyncStatus() call after sync
app/lib/widgets/notebook_sidebar.dart — sync button (where the ScaffoldMessenger context is accessible)
app/lib/screens/settings_screen.dart — reference for how conflicts_resolved is currently read
Testing steps
Related to: #17, #22, #23
Overview
Context: The Python backend already handles sync conflicts automatically using one of three strategies (
LAST_WRITE_WINS,KEEP_BOTH,MERGE_STROKES— seenexanote/sync/conflict.py). After a sync,GET /sync/statusreturns aconflicts_resolvedcount. TheSettingsScreendisplays this count in its sync stats section.The gap: If conflicts were resolved during a sync triggered from the sidebar button, the user gets no feedback — they'd have to navigate to Settings to see the count. Worse, with
KEEP_BOTHstrategy, a conflict copy is created as a new note, and the user won't know it exists unless they happen to scroll to it.What needs to be done
AppState.triggerSync()or wherevergetSyncStatus()is called), check ifconflicts_resolved > 0SnackBarorAlertDialogwith a message like: "Sync resolved 2 conflicts. If using 'Keep Both' strategy, conflict copies have been added to your notes."loadNotes()to refresh the list (so the user can see any new conflict copies)KEEP_BOTH, also callloadNotes()automatically after sync so conflict copies appear without requiring manual actionGoal
After a sync that resolved conflicts, the user immediately sees a warning that something was auto-resolved and can navigate to their notes to review the outcome — without needing to open Settings.
Where to look
app/lib/services/app_state.dart—triggerSync(), addgetSyncStatus()call after syncapp/lib/widgets/notebook_sidebar.dart— sync button (where theScaffoldMessengercontext is accessible)app/lib/screens/settings_screen.dart— reference for howconflicts_resolvedis currently readTesting steps
Related to: #17, #22, #23