Honour the export and delete promises for everything the app now stores - #189
Merged
Conversation
The disclaimer promises "export a copy of all your data" and deletion via Delete All Data, and the backup dialog promises phone-transfer fidelity. An audit against the current schema and preferences found gaps on all three surfaces (export, import, delete); this closes them. Export (full backup v4 to v5): - Groups exported (name, colorRole, defaultInputType, in display order) plus a per-category groupName, matched by name on import since row ids change across a restore. Without this, restores lost all grouping and turned inherit-coloured categories neutral. - Per-log loggedAt exported so time-tracked history keeps its times. - Colour profiles now carry lightBackgroundArgb/darkBackgroundArgb. - Settings now carry customLight/DarkBackgroundArgb, customThemeName, periodTrackingEnabled, periodGapToleranceDays (validated 0..3 on import), dailyCheckEnabled, and flowLevelRestoreDone. Import: - New importGroups (replace mode clears existing groups first, never their member categories) runs before category config; categories are filed via the exported groupName; backups without the key leave existing filing untouched. - Log import passes the category's allowMultiple and the exported loggedAt to saveLog. Previously a day with several entries collapsed to its last entry and every timestamp was dropped on restore. Delete: - Reset category settings also deletes groups (user-entered group names can be sensitive), unfiling members first; new additive DAO queries clearAllGroupAssignments and deleteAllGroups. - Delete All Data also clears the saved pregnancy date and the cached export files, and the dialog copy now says so. - Export cache no longer accumulates: date-stamped files meant the old "overwritten every export" comment was wrong, so each export clears the directory first and clearExportCache is shared with delete. Copy: full-backup description mentions groups; fixed pre-existing en/em dashes in the custom range separator and the Merge/Replace dialog text. LESSONS.md gains the transferable lesson; subsystem map 02 updated. Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg
mapgie
marked this pull request as ready for review
September 8, 2026 18:56
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.
The in-app promises are explicit: the privacy disclaimer says you can "export a copy of all your data" and delete everything via Settings, Data, Delete All Data; the backup dialog says a full backup is for "transferring to a new phone". An audit of the export builder, the importer, and the delete paths against the current schema (post logging redesign) and the full preferences list found gaps on all three surfaces. This PR closes them.
What was broken
Export/restore lost data
groupstable (added in the redesign) was never exported: a restore lost all grouping and group membership, and any category set to inherit its group's colour rendered neutral grey afterwards.loggedAtwas not exported and the importer calledsaveLogwith defaults, so time-tracked history lost every timestamp and a day with several allow-multiple entries collapsed to its last entry.lightBackgroundArgb/darkBackgroundArgbcolumns.Deletion left data behind
What changed
groupsarray and a per-categorygroupName(name-matched on import, since row ids change across a restore; backups without the key leave existing filing untouched), per-logloggedAt, colour-profile background columns, and the missing settings. Old backups still import; old app versions ignore the new keys.importGroups(replace mode clears groups first, never their member categories) runs before category config; log import now passesallowMultipleandloggedAtthrough tosaveLog;periodGapToleranceDaysis range-validated (0..3) before applying.DataExporter.clearExportCacheis shared with the delete path.Verification
a11y_check.pyclean,wcag_check.pypasses, semantics-import sweep clean, changelog fragment validates (minor).saveLog'sallowMultiple/loggedAtparameters,ColorProfileconstructor, group repository methods).🤖 Generated with Claude Code
https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg
Generated by Claude Code