Skip to content

fix(tui): a forced stop folds the Tasks panel like a normal finish - #445

Merged
mrnasil merged 1 commit into
mainfrom
fix/tui-force-stop-tasks-collapse
Nov 9, 2026
Merged

mrnasil merged 1 commit into
mainfrom
fix/tui-force-stop-tasks-collapse

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 9, 2026

Copy link
Copy Markdown
Member

Problem

After a forced stop (Esc without waiting), the sticky Tasks panel stayed expanded even though every row was finished. The subagent blocks in the transcript also kept showing running. A normal finish folds the panel to its header row.

The cause: the forced-stop path in run/mod.rs set the running rows to cancelled directly and never called the collapse sync.

Fix

  • TuiApp::cancel_running_subagents() marks the running rows and their transcript blocks as cancelled, then calls sync_tasks_collapse.
  • The forced-stop path now calls it.

Tests

  • New test: forced_stop_cancels_running_rows_and_folds_panel.
  • cargo test -p whycodes-tui --lib: 1497 passed.
  • clippy and fmt are clean, and the panic, swallowed-error, dependency-boundary and tracked-secrets checks pass.

🤖 Generated with Claude Code

The forced-stop path flipped running subagent rows to `cancelled` in
place, skipping the collapse sync, so the panel stayed expanded with
every row finished, and the transcript blocks kept saying `running`.
`TuiApp::cancel_running_subagents` now updates both and folds the
panel the same way a last `completed` update does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mrnasil
mrnasil merged commit f634867 into main Nov 9, 2026
7 checks passed
@mrnasil
mrnasil deleted the fix/tui-force-stop-tasks-collapse branch November 9, 2026 23:57
@mrnasil mrnasil mentioned this pull request Nov 10, 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