You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate note-taker to the centralized sync framework. This migration tests the PollingTrigger — note-taker currently uses polling-based sync with exponential backoff (2min base, 10min max) instead of event-triggered auto-backup.
Replace noteAdapter + PersistedState with db.notes.liveAll()
Migrate note-taker.remote.ts to factory functions
Create SyncManager with polling trigger:
strategy: serverWins,// server is source of truth for notestrigger: 'polling',pollingInterval: 120000,// 2 minutes (keep existing base)maxPollingInterval: 600000,// 10 minutes (keep existing max)
Preserve existing form-based CRUD (createNoteForm, updateNoteForm) — these stay as-is, only the sync layer changes
Overview
Migrate note-taker to the centralized sync framework. This migration tests the
PollingTrigger— note-taker currently uses polling-based sync with exponential backoff (2min base, 10min max) instead of event-triggered auto-backup.Design doc:
docs/plans/2026-06-21-sync-framework-design.mdCurrent state
src/routes/apps/(app)/note-taker/+page.svelte— polling-based sync withsetInterval, exponential backoff on failure,syncInFlightstatesrc/routes/apps/(app)/note-taker/states.svelte.ts— customPersistedStatewrapper with IndexedDB adapter (noteAdapter),toServerFormat()/fromServerFormat()compatibility layersrc/lib/remote/note-taker.remote.ts—getNotes(query),syncNoteData(command),createNoteForm/updateNoteForm(forms),deleteNote(command)Migration steps
createReactiveDB:noteAdapter+PersistedStatewithdb.notes.liveAll()note-taker.remote.tsto factory functionsSyncManagerwithpollingtrigger:createNoteForm,updateNoteForm) — these stay as-is, only the sync layer changes+page.svelte— replace polling logic withsync.handleSync()(PollingTrigger handles interval + backoff automatically)bun check+svelte-autofixerWhat stays app-specific
createNoteForm,updateNoteForm,deleteNote)Note)serverWinsmerge strategy (server is source of truth)Prisma models (existing)
Note→ storenotesBlocked by