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
{{ message }}
Repository navigation
[P1/doc-drift] FR-9.2.4 import/export favorites as JSON — not implemented #335
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.
Activity
feat(favorites): export and import a library as JSON (#616)