Skip to content

v0.9.16: inline working card widget in the chat stream #381

@spytensor

Description

@spytensor

Context

Per umbrella #377 and ADR #378, sub-agent activity moves out of the right rail and into the chat stream as inline working cards. This issue lands the working card widget itself, fed by the lifecycle data from #380.

Goal

Render each Working-state spawn instance as an inline card in the chat stream, at the chat-time position where it was spawned.

Required Visual (per ADR mockup)

┌─ @security · audit README security claims ─────── working · 2m 14s ─┐
│ ✓ read README.md §2.4 security model                                │
│ ∴ cross-checking claims against src/permissions/                    │
└─ 3 tool calls done · [e]xpand [i]nterrupt [f]ocus ──────────────────┘
  • Top border carries: role identity (color from existing palette), task title (the prompt passed to the sub-agent, truncated), state label, elapsed time.
  • Body lines: one per tool call. Done tool calls use ; in-progress uses . Latest N lines visible (N is a config knob, default = 3 — anything older scrolls within the card region if naturally bounded by terminal width).
  • Bottom border carries: done-tool-call count and the hotkey hint string (visual only in this issue; wiring is in __ISSUE_G__).

Acceptance Criteria

  • AC-1: A new widget WorkingCard renders one Working spawn instance per the visual above. The widget reads from the lifecycle record only — no kernel direct access.
  • AC-2: The widget is placed in the chat stream at the position corresponding to the spawning event's chat-time, not at the bottom.
  • AC-3: Identity color is reused from the project's existing color module (same source as @role mentions in scrollback).
  • AC-4: Tool-call lines respect terminal width; long tool summaries are middle-truncated.
  • AC-5: Elapsed time updates at most once per second to avoid flicker.
  • AC-6: Renderer tests cover: (a) zero tool calls (card shows just title), (b) one done + one in-progress, (c) ≥ N tool calls (oldest visually drops).
  • AC-7: Hotkey hint string is rendered but non-functional in this issue; pressing the hint keys does nothing yet.

Out of Scope

  • Hotkey wiring (__ISSUE_G__).
  • Done and Reported rendering (__ISSUE_E__).
  • Footer narration (__ISSUE_F__).
  • Card density auto-collapse (__ISSUE_I__).
  • Right rail changes (__ISSUE_H__).

Required Evidence

  • Renderer unit tests for the three states above.
  • A screenshot from a live dogfood session showing one @host → one sub-role working card with at least 2 tool calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:conversationPublic transcript, host conversation, and internal delegation visibilityarea: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