Skip to content

chore: investigate removing V1 chat migration (migrateV1) #51

@Cheezeiii365

Description

@Cheezeiii365

Context

migrateV1() in conversationStore.ts unconditionally overwrites index.json with a single-entry array when migrating legacy chat.json data. If the .migrated marker is missing but index.json already has conversations, this could destroy existing metadata.

Flagged during PR review analysis — risk is low and theoretical, but worth tracking.

Action

Investigate removing migrateV1() entirely. The only users are the dev team — there are no external users who need this migration path. If confirmed safe, remove the migration code and the .migrated marker logic to reduce complexity.

If removal isn't viable for some reason, a simple "skip if index exists" guard is sufficient — a full merge/dedup implementation is not warranted.

References

  • File: packages/main/src/conversationStore.ts (~lines 169–230)
  • Priority: Low

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions