Preserve finish time and planned duration in history #12
Labels
No labels
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/tomate#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blocked by: #10
What to build
A Pomodoro read back out of the history should carry the same facts it had when it was archived. Two are lost or corrupted today.
History is written as one record shape and read back as another. The record written on archive has no finish time, so a Pomodoro loaded from history always reports its finish time as null and its actual duration as unknown — even though the finish time is exactly what was used to compute the archived figure.
Worse, that archived figure is the time actually spent, but it is written into the field that means the duration the timer was set for. So a 25-minute Pomodoro stopped after one second comes back as a Pomodoro that was set for one second:
Both figures matter and they are different questions — how long you meant to work, and how long you did. The history should keep both, and
tomate historyshould stay clear about which column it is showing.Existing history files must keep loading. Decide how a record written under the old shape is interpreted and say so.
Acceptance criteria
tomate history --jsonexposes all four, and a loaded Pomodoro reports a finish time rather than nulltomate history's table labels whichever duration it shows unambiguouslyBlocked by
tomate history --jsonemits for an empty history; this one changes what it emits for a populated one, and should build on the settled behaviour