Skip to content

Fix watch cancel confirmation output (canceld -> cancelled) - #32

Merged
hsliuustc0106 merged 1 commit into
mainfrom
fix/cancel-confirmation-output
Oct 2, 2026
Merged

hsliuustc0106 merged 1 commit into
mainfrom
fix/cancel-confirmation-output

Conversation

@hsliuustc0106

Copy link
Copy Markdown
Contributor

Problem

nanodot watch cancel <id> prints canceld <id> ... instead of cancelled. The handler builds its confirmation with f"{args.watch_command}d ...", which happens to spell pause/resume correctly but concatenates wrong for cancel. The stored state itself is correct (watch list shows cancelled); this is display-only.

Found while running a real PR-watch task locally and recording the full lifecycle (create → first snapshot → pause/resume → cancel → stop).

Fix

Replace the string concatenation with an explicit past-tense map (pause→paused, resume→resumed, cancel→cancelled), matching the spelling already used by the task store and watch list output.

Test

Extended test_pause_resume_cancel_take_effect to assert the exact confirmation text for all three actions, including a regression check that canceld never appears. Verified the test fails against the old code and passes with the fix; full suite: 515 passed.

The pause/resume/cancel handler built its confirmation with
f"{args.watch_command}d ...", which only spells pause/resume correctly
and printed 'canceld' for cancel. Use an explicit past-tense map so the
output matches the stored state spelling ('cancelled').

Found while running a real PR-watch task locally. Adds output
assertions to the lifecycle CLI test, including a regression check
that 'canceld' never appears.
@hsliuustc0106
hsliuustc0106 merged commit 33549c0 into main Oct 2, 2026
2 checks passed
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