Repository navigation
feat: backup and trust - export/import with preview, typed delete, reminder (UX-12) - #216
Merged
Merged
Conversation
…minder (UX-12) - DataPanel in the settings: "data only on this device" note, what is stored, last backup, export, import, replay introduction, delete everything - versioned backup file (src/backup): now includes rounds and course templates (IndexedDB), achievements and focus; version 1 files are still read; sections are cleaned, unusable entries become warnings - ImportDialog: preview, merge (default, repeatable) or replace (confirmation, shows what is lost, optional safety backup); broken, foreign or too new files get plain messages - delete everything needs the typed word LÖSCHEN and offers a backup first; it now also clears the rounds - ConfirmModal/service: title, danger, typed phrase, details, secondary action - backup reminder on Today (5 entries, 10 new entries, 30 days; "Später" = 7 days) - test: export -> delete -> import restores the identical state; merge/replace/reminder/UI tests - test infra: debounced store writes no longer leak between tests - tests (491) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/backup) now contains rounds and course templates (IndexedDB), achievements and focus points as well - the old export missed rounds, templates and achievements, and "reset" did not delete the rounds. Version 1 files are still read (marked as an older backup); every section is cleaned with the stores' own sanitizers, unusable entries become warnings. Format documented indocs/DATA_MODEL.mdLÖSCHEN, lists what goes, offers "Zuerst Backup exportieren" inside the dialog and now also clears the rounds/templates and the reminder bookkeeping.ConfirmModalgained title, danger style, typed phrase, details and a secondary action (plain confirmations behave as before)src/backup/download.ts: web download or native share sheet; bookkeeping is only written after the file was handed over)Acceptance
Export -> delete -> import restores the identical state:
tests/backup/roundtrip.test.tsgoes through a real file (JSON text),clearAllData, thenapplyData('replace')and compares everything (settings, favorites, sessions with notes/timer/focus, HCP history, collections, focus, achievements, rounds incl. course data, course templates) withtoEqual.Also fixed
cancelAllPendingWrites()runs after every test. The suite was run 5 times in a row greenNumbers
Start chunk 150.8 KB, tests 452 -> 491, lint 0 errors; axe now also audits the import dialog, the typed-delete dialog and the reminder.
Test plan
npm test(491, 5 repeated runs),npm run lint,npm run typecheck,npm run build(local)🤖 Generated with Claude Code