Skip to content

v0.9.16: per-card hotkeys for working cards — [e]xpand [i]nterrupt [f]ocus #385

@spytensor

Description

@spytensor

Context

Per umbrella #377 and ADR #378, working cards (#381) and collapsed-done lines (#384) render hotkey hints ([e]xpand [i]nterrupt [f]ocus) but do not respond to keystrokes. This issue wires them.

Goal

Keystrokes routed to the currently focused card act on that card alone, not globally.

Required Behavior

  • Card focus: Cards in the chat stream are addressable. Default focus is "no card focused" — keys fall through to the composer. The user moves focus with Tab / Shift-Tab between cards (cycle order: spawn-time ascending; skip cards that are not in Working or Done). A focused card shows a brighter border.
  • e — expand: Valid on a Done-collapsed card with a non-empty log. Pressing e expands the card in place to show its full tool-call list. Pressing e again collapses back. No side panel.
  • i — interrupt: Valid on a Working card. Sends a cancel signal to that sub-agent. The card transitions to Done with a visible "interrupted" annotation. Other sub-agents and the room itself are unaffected.
  • f — focus: Valid on a Working card. The card occupies the full chat-stream height; other working cards collapse to one-line stubs. Press f again or Esc to exit focus mode.

Acceptance Criteria

  • AC-1: Tab / Shift-Tab cycle focus through eligible cards. Focused card has a visibly distinct border (color or weight, per existing palette).
  • AC-2: e toggles expand on focused Done cards. Disabled on Working cards.
  • AC-3: i interrupts the focused Working sub-agent. The interrupted card transitions to Done with an "interrupted" annotation, e.g. @security ⨯ interrupted · 1m 12s · 2 steps. Other roles continue.
  • AC-4: f enters focus mode for the focused Working card; f again or Esc exits. While in focus mode, the right rail and footer narration stay visible; only other cards collapse.
  • AC-5: When no card is focused, e / i / f fall through to the composer as ordinary text input.
  • AC-6: Input integration tests cover each hotkey path including the disabled cases.
  • AC-7: The interrupt path is wired to a kernel-side cancel signal that already exists, or a new minimal signal is added with documented semantics if none exists.

Out of Scope

  • Mouse-clicking a card to focus it (keyboard only in this issue).
  • Multi-select focus.
  • Persisting which card was focused across sessions.

Required Evidence

  • Input integration tests above.
  • One asciinema recording demonstrating: focus a working card, interrupt it, focus another, enter focus mode, exit, expand a done card's log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:consoleConsole snapshot, control surface, and dashboard data planearea:tuiFull-screen terminal UI and ratatui consoleenhancementNew feature or requestpriority:highTruth-in-advertising or locked-spec gapsize:M1-3 daysstatus:needs-designPending design decision, do not implementtype:featNew feature for v0.5 virtual team

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions