Skip to content

fix(tui): close task tabs without trapping or replacing their chat - #1897

Merged
santoshkumarradha merged 3 commits into
devfrom
fix/task-chat-tab-lifecycle
Oct 22, 2026
Merged

santoshkumarradha merged 3 commits into
devfrom
fix/task-chat-tab-lifecycle

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Problem and reproduction

With a conversation containing an active task-belt run:

  1. Open the run from its task row or its tab.
  2. Click the main conversation tab to return to the chat.
  3. Click the run tab’s close button: it reappears on the next frame.
  4. Close the main conversation while the run tab remains: the task view can be selected as the next conversation even though it points at the same transcript, preventing the expected close/navigation.

Reproduced in the actual terminal application using the built-in demo conversation with an active plan, on base a6b4f97d8. The original referenced screenshot was unavailable in the retrieved conversation; the diagnosis comes from live interaction and failing regression tests.

Root cause and fix

The strip remembers its rendered list, including a synthetic #work tab sharing its owner’s transcript. Conversation dismissal records that synthetic key, but run-tab generation ignores the dismissal. Conversation close fallback also accepts the synthetic entry as another conversation.

Keep run views out of remembered conversation normalization and close fallback. Dismiss a run view independently, honor its dismissal on subsequent frames, and restore it when its task is explicitly opened again. ctrl+w on a selected run tab closes that view; the owning chat and work remain available. The manual documents this behavior.

Validation

  • New regressions fail on the original implementation for persistent task-tab close, synthetic close fallback, and remembered task identity; pass with the fix. Additional coverage checks keyboard close, explicit reopening, and closing the last owner conversation to Home.
  • Focused task/tab tests pass; make pr-ready passes, including build, vet, manual/law checks, and all eight touched TUI test shards. make build passes.
  • Actual terminal checks cover task → main → close, explicit task-row reopening, and keyboard close. A live reply returned TAB LIFECYCLE OK; recorded main and auxiliary calls all used OpenRouter deepseek/deepseek-v4.1-flash with HTTP 200.

The live terminal recording and before/after captures are preserved locally. Direct PR attachment upload is unavailable through the installed tools, so media is not attached; no evidence files are committed.

@santoshkumarradha
santoshkumarradha merged commit 2a5a77b into dev Oct 22, 2026
5 checks passed
@santoshkumarradha
santoshkumarradha deleted the fix/task-chat-tab-lifecycle branch October 22, 2026 19:24
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