tui-cannot-retire

TUI: cannot retire/close a chat tab — resume-prompt modal blocks closing .chat-4 (and similar)

Metadata

Statusdone
Assignedagent-714
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-27T15:44:23.306771457+00:00
Started2026-04-27T15:44:58.702617426+00:00
Completed2026-04-27T16:02:44.932028967+00:00
Tagseval-scheduled

Description

Description

User cannot get rid of .chat-4 in the TUI. Switching to that tab brings up a modal:

This session is 1d 18h old and 309.7k tokens.
Resuming the full session will consume a substantial portion of your usage limits.
We recommend resuming from a summary.

  ❯ 1. Resume from summary (recommended)
    2. Resume full session as-is
    3. Don't ask me again

  Enter to confirm · Esc to cancel

The user wants a fourth option: 'Retire / close this chat — don't resume.' Right now Esc just dismisses the modal but the tab persists, and the next visit re-shows the modal. There's no path to delete/archive the chat from the TUI.

The tab bar shows next to each tab ([3] ◉ coord:4 ✕) — that visually implies a close button, but apparently clicking/triggering it doesn't work, or there's no keybinding bound to it. User quote: 'man why can't we retire the .chat-4 ???'

Required

Pick whichever path is cleanest:

A. Keybinding to retire current tab — e.g. Ctrl+W or q while focused on a chat tab → confirms ('Retire .chat-4? [y/N]') → calls the proper retire op (probably wg abandon or wg edit --status abandoned — check existing code for chat retirement) and removes the tab.

B. Add a fourth option to the resume modal — '4. Retire this chat (don't resume)' that does the same.

C. Both. The hotkey is the more general fix; the modal option is the discoverable one.

Recommend C — modal option for discoverability, hotkey for power users.

Files likely to touch

  • src/tui/ — chat tab handling, the resume-prompt modal, and key dispatch on tab focus
  • Whatever wg-side command marks a chat as retired/abandoned. Check existing code for chat retirement first; wg abandon likely already covers it.

Validation

  • Failing test first: TUI test that asserts a chat tab can be retired without resuming, given a chat task with an old/large session
  • Implementation makes test pass
  • cargo build + cargo test pass with no regressions
  • Manual smoke: open wg tui with a chat that triggers the resume modal; retire the chat from the modal AND via hotkey; verify (a) tab disappears from tab bar, (b) the chat task is marked retired/abandoned in wg list, (c) the modal does not return on next TUI open

Depends on

Required by

Log