Commit Graph
5 Commits
Author SHA1 Message Date
Lucas WintherandClaude Opus 5.5 e97e8b002f feat(export): carry tasks and amounts in the backup
They exist on this device and nowhere else, so an export without them is
a lossy backup. Both are additive keys, as custom games were: older files
lack them and still import. Tasks travel as stored, including any this
build cannot read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 13:34:56 +02:00
Lucas WintherandClaude Opus 5.5 064cea25fd fix(goal): never drop an unreadable goal by accident, and let the count be retyped
Review found three ordinary actions that deleted a goal this build could
not read: "It repeats daily", pressing an already-pressed Off, and "not
daily" without saying so. Only "not daily" clears a goal now, and its
warning keys off what is stored, not what parses.

The count field was bound straight to the goal, so emptying it snapped
the old number back and typing appended to it. It now keeps a draft.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 13:24:41 +02:00
Lucas WintherandClaude Opus 5.5 34c7dce5ca feat(progress): keep a check-in goal on the reader's progress record
Goals ride the existing record, so export and the later-edit-wins import
merge carry them with no new key. Setting one clears a contradicting
"not daily"; saying "not daily" clears the goal, so no conflict hides
in storage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 13:09:05 +02:00
Lucas Winther b36047d218 feat(state): support full export and preferences restoration 2026-09-17 10:19:59 +02:00
Lucas WintherandClaude Opus 5 f9ef21a366 fix: an imported backup no longer rolls progress back
The progress store merged like the mark stores do, keeping whichever copy had
the earlier timestamp. That is right for a mark — `at` is when the reader made
it, membership is the whole fact, and the oldest stamp is the truest one — and
wrong here, because this record *is* the data. A status, an effort, a note and
whether an event repeats all live in it, and `at` says when one of those last
changed.

So the earlier copy winning discarded every edit made after it, in both of the
directions an import actually happens in: restoring a backup taken before an
evening's work undid the evening, and importing an old file onto a device with
newer progress rolled the device back. Neither is recoverable — there is no
account and no server holding a second copy.

The later record wins now. Nothing is removed in either direction, and taking
the maximum of two timestamps is as order-independent and idempotent as the rule
it replaces. `mergeProgress` came out of the hook to be tested, which is also
how the ignored store's opposite rule is now written down rather than assumed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-08-20 06:37:11 +02:00