Skip to content

Remove nested-to-flat Y.Map migration code #514

@InfinityBowman

Description

@InfinityBowman

Context

Shipped on 2026-05-02, the checklist answers Y.Map format changed from nested Y.Maps to flat dot-notation keys for performance. A client-side migration (migrateYDocToFlatKeys) runs on every Y.Doc load to convert any remaining old-format documents.

Once all production Y.Docs have been opened at least once on the new format (give it one full release cycle), this migration code is dead weight.

Files to remove

  • packages/web/src/primitives/useProject/reactor/migrate.ts -- the migration module
  • packages/web/src/primitives/useProject/reactor/migrate.test.ts -- its unit tests
  • packages/web/e2e/flat-key-migration.spec.ts -- e2e test for the migration

Code to update

  • packages/web/src/project/ConnectionPool.ts -- remove the three migrateYDocToFlatKeys() call sites and the import

When to remove

After all active users have loaded their projects at least once on the flat-key format. A conservative window is 4-6 weeks after 2026-05-02 (target: mid-June 2026). Check server logs or Y.Doc snapshots to confirm no nested-format documents remain before removing.

Related

  • The localChecklists Dexie table migration (migrateLocalChecklistsToYDoc) has a similar TODO in packages/web/src/primitives/db.ts (shipped 2026-04-18).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions