feat(workspace): tool output + Edit/Write diff preview in transcript #574

Merged
code-lead merged 1 commit from dev/565 into main 2026-04-30 18:13:27 +00:00
Collaborator

Adds tool_progress broadcast, groups tool_call/progress/summary events per pill, and renders unified diffs for Edit/Write tools.

Test plan

  • Expand a Read pill → JSON input + tool output block
  • Expand an Edit pill → coloured unified diff with removed/added lines
  • Expand a Write pill → diff showing full content as added
  • Progress lines appear below the pill without expanding
  • aria-expanded toggles on button click
  • just qa clean (530 web + 2544 server tests pass)

Closes #565

Adds tool_progress broadcast, groups tool_call/progress/summary events per pill, and renders unified diffs for Edit/Write tools. ## Test plan - Expand a Read pill → JSON input + tool output block - Expand an Edit pill → coloured unified diff with removed/added lines - Expand a Write pill → diff showing full content as added - Progress lines appear below the pill without expanding - `aria-expanded` toggles on button click - `just qa` clean (530 web + 2544 server tests pass) Closes #565
dev self-assigned this 2026-04-30 18:03:45 +00:00
feat(workspace): tool output + Edit/Write diff preview in transcript
All checks were successful
qa / dockerfile (pull_request) Successful in 7s
qa / qa (pull_request) Successful in 2m20s
d27a22ea14
- Broadcast tool_progress events from logTaskEvent (were silently dropped)
- Group stream events (tool_call / tool_progress / tool_summary) so each
  pill owns its progress lines and output block
- ToolCallPill: add aria-expanded, replace Unicode glyphs with lucide
  ChevronDown/ChevronRight per CLAUDE.md icon convention
- Edit/Write pills render a monospace unified diff (file header + coloured
  ±lines) instead of raw JSON when expanded
- tool_summary renders as collapsible "Output" block within the expanded pill
- tool_progress events appear as always-visible live status lines below the
  pill button
- Tool name falls back to event.summary; never shows raw "tool call"
- New tests: tool_summary, tool_progress, Edit diff, Write diff, FIFO
  multi-tool grouping, name fallback (530 web + 2544 server all green)

Closes #565

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-04-30 18:06:10 +00:00
reviewer approved these changes 2026-04-30 18:12:12 +00:00
reviewer left a comment

Tool output + Edit/Write diff preview all correct and well-tested.

Nit (non-blocking): in ToolCallPill, the pDetail?.text branch in progress rendering is a dead path — the server stores progress text in summary, not detail.text, so ev.summary always fires. Works fine; worth a cleanup if the field contract tightens later.

Tool output + Edit/Write diff preview all correct and well-tested. Nit (non-blocking): in `ToolCallPill`, the `pDetail?.text` branch in progress rendering is a dead path — the server stores progress text in `summary`, not `detail.text`, so `ev.summary` always fires. Works fine; worth a cleanup if the field contract tightens later.
code-lead deleted branch dev/565 2026-04-30 18:13:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!574
No description provided.