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 scenario-tracker to the centralized sync framework. This migration tests converting from plain objects (no PersistedState) to svelte-idb, and uses the ManualTrigger with imperative server calls.
src/routes/apps/(app)/scenario-tracker/+page.svelte — imperative server calls, manual getScenarioData() refresh after each mutation, 15+ individual mutation functions
Overview
Migrate scenario-tracker to the centralized sync framework. This migration tests converting from plain objects (no
PersistedState) to svelte-idb, and uses theManualTriggerwith imperative server calls.Design doc:
docs/plans/2026-06-21-sync-framework-design.mdCurrent state
src/routes/apps/(app)/scenario-tracker/+page.svelte— imperative server calls, manualgetScenarioData()refresh after each mutation, 15+ individual mutation functionssrc/routes/apps/(app)/scenario-tracker/stores.svelte.ts— plain objects (notPersistedState!) —options,timelineEntries,riskswith.currentpropertysrc/lib/remote/scenario-tracker.remote.ts—getScenarioData(query), 15+ individual command functions (addScenarioOptions,deleteScenarioOption,addScenarioActivity, etc.)Migration steps
createReactiveDB:db.store.liveAll()for eachscenario-tracker.remote.ts:createLoadQueryforgetScenarioData(loads all stores)addScenarioOptions, etc.) — these are the primary interactioncreateBackupForm+createBackupCommandfor full backupSyncManagerwithmanualtrigger:+page.svelte— usesync.syncOnMount(data), keep imperative mutation callsstores.svelte.ts→states.svelte.ts(rename to match project convention)bun check+svelte-autofixerWhat stays app-specific
ScenarioSettings,ScenarioOption,ScenarioActivity,ScenarioTimelineEntry,ScenarioRisk)serverWinsmerge strategyPrisma models (existing)
ScenarioSettings→ storesettingsScenarioOption→ storeoptionsScenarioActivity→ storeactivities(nested in options)ScenarioTimelineEntry→ storetimelineEntriesScenarioRisk→ storerisksBlocked by