Fix status and history output: empty JSON, empty tags, unreachable branch #10
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#10
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?
What to build
Three output defects, all in how the current status and the history are printed.
Empty history prints nothing in JSON mode.
tomate history --jsonreturns early when the history file does not exist, before it reaches the JSON branch, so a script gets an empty stream instead of parseable JSON. Loading the history already handles a missing file by returning an empty history, so the early return is both redundant and wrong.Tags are always set, even when none were given. Starting a Pomodoro stores the tag list unconditionally, so a Pomodoro with no tags carries an empty list rather than no list at all. The status output then prints a bare
Tags:header with nothing beneath it, and the history table's-placeholder for untagged Pomodoros can never appear.An unreachable branch in status printing. The
Activearm re-tests the format option that the function already handled and returned for, so that branch can never run. Remove it.Acceptance criteria
tomate history --jsonprints valid JSON representing an empty history when no history file exists, and exits 0--tagarguments stores no tag list, andtomate statusomits theTags:header entirely for ittomate historyshows the-placeholder in the Tags column for a Pomodoro that has no tagsBlocked by
None — can start immediately.