Skip to content

Show each tool call as one header row with live status #313

Open

Description

@hakula139

Summary

A tool call displays its label and result title on separate rows, and they often repeat each other. An edit shows ▎ ✎ Edit(/tmp/f.rs) followed by ▎ ✓ Edited f.rs. A read names its file three times (→ Read(src/foo.rs), ✓ Read foo.rs, src/foo.rs:1-120 of 300) before showing five lines of content, taking nine rows in total. Blank rows around each call group add even more space, so a burst of reads fills the screen.

A call's row stays unchanged while it runs. When several read-only calls run in parallel (#276), the chat gives no indication of which are still in flight, and the status bar names only one tool.

Design

  • One header row. The row starts with a status cell: a spinner frame while the call runs, then ✓ or ✗ in success or error. The call label follows. The status cell takes the place of the per-tool icon for tools whose label names them (Read(...), Edit(...), Grep(...)), and bash keeps $ before its bare command.
  • Titles that add something. The result title joins the header as a muted suffix when it carries new information: a bash command's description, grep and glob counts, and the edit counts below. It is dropped when it restates the label, as Read foo.rs and Edited f.rs do today.
  • One-row reads. A successful read renders as Read(src/foo.rs) · 120 lines, with no excerpt by default. The excerpt stays reachable in the expanded view from Expand truncated tool output and collapse finished thinking #312.
  • Edit counts. An edit header ends with +N −M, in success and error.
  • Spacing. Calls whose header is their only row stack without blank rows between them, and a blank row still separates a call that has a body.
  • Errors. A failed call keeps today's red bar for the whole block, with the error text as its body.

A burst of exploration followed by a test run would look like this:

▎ ✓ Read(src/config.rs) · 214 lines
▎ ✓ Read(src/main.rs) · 88 lines
▎ ✓ Grep(load_config) · Found 3 total occurrences across 2 files

▎ ✓ $ cargo test --all · Run the test suite
▎   running 12 tests
▎   ... +40 lines

Codex renders a command in one header, • Ran seq 1 10 1>&2 && false, with its output beneath └ (codex-rs/tui/src/history_cell/snapshots/codex_tui__history_cell__tests__stderr_tail_more_than_five_lines_snapshot.snap). It titles an edit • Edited example.txt (+1 -1) (codex-rs/tui/src/snapshots/codex_tui__diff_render__tests__apply_update_block.snap) and groups adjacent reads under a single • Explored header (codex-rs/tui/src/history_cell/snapshots/codex_tui__history_cell__tests__coalesces_reads_across_multiple_calls.snap). Claude Code animates a tool's bullet while the call runs, then colors it green or red when it resolves. It reports reads as Read N lines.

Acceptance criteria

  • Each tool call renders one header row. Its status cell animates while the call runs, then settles to ✓ or ✗ when the result arrives.
  • Parallel calls animate independently, and each result settles the row for its own call.
  • A result title appears in the header only when it adds information beyond the call label.
  • A successful read renders on one row with its line count, and an edit header shows +N −M.
  • Header-only calls stack without blank rows between them.
  • Resumed sessions render tool calls in the same layout.
  • Snapshot tests cover bash, read, edit, grep, glob, tasks, a failed call, and a call still running.

Activity

  1. added this to the v0.1.0 milestone on Oct 17, 2026
  2. self-assigned this
    on Oct 17, 2026
  3. added
    enhancement
    area: tui
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: tuienhancement

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions