The local practice plane keeps two generations of legacy data machinery whose rollback windows have closed. With the schema-migration replay in place (the PR stacked on #800), local rows follow the same mechanism as online rows, and this is the remaining local-only surface.
What to remove
packages/web/src/project/localProject.ts: everything except LOCAL_PROJECT_ID and LOCAL_REVIEWER_ID. The localChecklists flat-row import (migrateLocalChecklistsToYDoc, the buildStudyForLocalRow family, the text seeding), and loadLegacyLocalRows. Move the two constants somewhere without the yjs and y-dexie imports.
rowsFromLocalDoc in localCollections.ts, and the yjs import there.
packages/web/src/project/localProject.test.ts (tests the round-trip of the flat-row import).
packages/web/src/dev/legacy.ts and its window.__devLegacy seam in dev/expose.ts.
packages/web/e2e/flat-key-migration.spec.ts.
packages/web/src/primitives/useProject/flatKeyMigration.ts and the checklist handlers under primitives/useProject/handlers/ if nothing else imports them (the commit that moved the write path onto the outbox kept them only for the legacy conversion).
- The
ConnectionPool.initializeLocalRows fallback that calls the loader when no localProjects row exists. A device with no row starts empty.
Dexie
- Add a schema version that drops the
projects ydoc table and localChecklists (this.version(5).stores({ projects: null, localChecklists: null })).
- Remove the
yDexie addon and the y-dexie dependency once no table declares a Y.Doc column. Check whether Dexie needs the addon to parse the historical version 1 declaration on existing databases before removing it.
- Update
db.on('ready') and clearAllData, which reference the projects table and the local Y.Doc row, and the glossary entries for projects and localChecklists.
localChecklistPdfs stays: it is live storage for practice PDFs.
Risk
Any device that has not opened the app since the row-plane cutover (the localProjects table shipped in Dexie version 3) would lose local practice data it never converted. Decide on a cutoff and say so in the release notes.
Refs #791.
The local practice plane keeps two generations of legacy data machinery whose rollback windows have closed. With the schema-migration replay in place (the PR stacked on #800), local rows follow the same mechanism as online rows, and this is the remaining local-only surface.
What to remove
packages/web/src/project/localProject.ts: everything exceptLOCAL_PROJECT_IDandLOCAL_REVIEWER_ID. ThelocalChecklistsflat-row import (migrateLocalChecklistsToYDoc, thebuildStudyForLocalRowfamily, the text seeding), andloadLegacyLocalRows. Move the two constants somewhere without the yjs and y-dexie imports.rowsFromLocalDocinlocalCollections.ts, and theyjsimport there.packages/web/src/project/localProject.test.ts(tests the round-trip of the flat-row import).packages/web/src/dev/legacy.tsand itswindow.__devLegacyseam indev/expose.ts.packages/web/e2e/flat-key-migration.spec.ts.packages/web/src/primitives/useProject/flatKeyMigration.tsand the checklist handlers underprimitives/useProject/handlers/if nothing else imports them (the commit that moved the write path onto the outbox kept them only for the legacy conversion).ConnectionPool.initializeLocalRowsfallback that calls the loader when nolocalProjectsrow exists. A device with no row starts empty.Dexie
projectsydoc table andlocalChecklists(this.version(5).stores({ projects: null, localChecklists: null })).yDexieaddon and they-dexiedependency once no table declares aY.Doccolumn. Check whether Dexie needs the addon to parse the historical version 1 declaration on existing databases before removing it.db.on('ready')andclearAllData, which reference theprojectstable and the local Y.Doc row, and the glossary entries forprojectsandlocalChecklists.localChecklistPdfsstays: it is live storage for practice PDFs.Risk
Any device that has not opened the app since the row-plane cutover (the
localProjectstable shipped in Dexie version 3) would lose local practice data it never converted. Decide on a cutoff and say so in the release notes.Refs #791.