Skip to content

[P1/doc-drift] FR-9.2.4 import/export favorites as JSON — not implemented #335

Closed

Description

@EVWorth

Context

DESIGN_REQUIREMENTS FR-9.2.4 (docs/design/DESIGN_REQUIREMENTS.md:555) requires Import/Export favorites as JSON file; merge with existing favorites.

Problem

The implementation has no UI for either direction, and no store actions. A user with 200 favorites accumulated across profiles has no way to back them up or share them with a colleague. The favorites data shape is already JSON-serializable (it's in localStorage under mas-query-favorites), so the export is trivial — the work is in the UI + import merge logic.

Files

  • src/components/favorites/ (no Import/Export buttons)
  • src/stores/favoritesStore.ts (no exportToJson/importFromJson actions)

Expected

Export downloads a JSON file of all favorites + categories; Import opens a file picker with merge (default) and replace modes; the result is a confirmation dialog showing the diff.

Proposed fix

Scope M — add exportToJson(): string and importFromJson(json: string, mode: 'merge' | 'replace') actions to favoritesStore; add Export / Import buttons in the sidebar header (next to the New Category button); for import, show a confirmation dialog with merge (default — add new favorites, dedup by name) and replace modes.

Acceptance

Clicking Export downloads a JSON file; clicking Import opens a file picker; selecting a JSON file with 5 favorites shows a preview ("5 new favorites will be added; 2 already exist"); confirming merges correctly.

Needs human verify

yes

Doc drift

DESIGN_REQUIREMENTS FR-9.2.4

Activity

  1. added
    audit
    severity/p1
    kind/doc-drift
    area/favorites
    on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/favoritesauditkind/doc-driftseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions