Skip to content

Cover the two cases the status-bar activity work deferred - #45

Merged
fohara merged 1 commit into
mainfrom
test/activity-bar-deferred-tests
Aug 9, 2026
Merged

fohara merged 1 commit into
mainfrom
test/activity-bar-deferred-tests

Conversation

@fohara

@fohara fohara commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

The last two unchecked boxes in tasks/tasks.status-bar-activity.md. Both were
deferred for want of a TUI integration harness. One exists now (TestAppBuilder
with TestEventSource), so there is no reason to keep leaning on "covered
indirectly by unit tests on ActivityState::record_transition".

Seeding

ActivityState::seed_from_db takes the first row from
find_by_status(InProgress), which orders by full_id. The fixture lists
zulu above alpha in the file, so row order and full_id order disagree and
the test fails if seeding ever stops being deterministic. Plus the empty case,
where nothing is in progress.

Toggling

Driven through the real key path (Tab to the tasks pane, then Space) rather than
by calling record_transition directly, so it covers the wiring in
handle_toggle_status and not just the state machine. Open to InProgress fills
the slot; InProgress to Done clears it and pushes to the recently-completed
tail.

Task file cleanup

tasks/tasks.md marks the status-bar and live-updates files complete, which
they now are.

Both were deferred for want of a TUI integration harness. One exists now
(`TestAppBuilder` with `TestEventSource`), so there is no reason to keep
leaning on "covered indirectly by unit tests".

Seeding: `ActivityState::seed_from_db` takes the first row from
`find_by_status(InProgress)`, which orders by `full_id`. The fixture
lists `zulu` above `alpha` in the file, so row order and `full_id` order
disagree and the test fails if seeding ever stops being deterministic.
Plus the empty case, where nothing is in progress.

Toggling: driven through the real key path rather than by calling
`record_transition` directly, so it covers the wiring in
`handle_toggle_status` and not just the state machine. Open to InProgress
fills the slot; InProgress to Done clears it and pushes to the
recently-completed tail.

`tasks/tasks.md` now marks the status-bar and live-updates files
complete, which they are.
@fohara
fohara merged commit 4d5527e into main Aug 9, 2026
21 checks passed
@fohara
fohara deleted the test/activity-bar-deferred-tests branch August 9, 2026 16:22
@fohara fohara mentioned this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant