feat: group consecutive tool calls with verb labels and improved UI#94
feat: group consecutive tool calls with verb labels and improved UI#94
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25aa644be5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Consecutive same-type tool calls collapse into expandable groups
("Wrote 3 files", "Ran 2 commands") with animated slide-in transition.
Solo items show past-tense verbs ("Wrote foo.html", "Read", "Ran").
Extract ToolChainCards and toolLabelUtils into dedicated files.
Make tool calls full-width, hide result labels, and add context-aware
spacing between tool and prose sections.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… filenames - Distribute artifact candidates per tool call instead of single primary host - Solo tool calls: animated expand with layout transitions for verb/filename in trigger, slide-in content with left border matching grouped style - Grouped items: show just filename with inline open-file arrow link - Extract filenames from tool name, args path keys, or result text - Use "Edited" verb for write operations, inline ArrowUpRight icon for open - Artifact actions render as clickable label+arrow, not separate link below Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Grouping now keys on both tool type and status, so failed or executing calls are never collapsed with completed ones. This prevents "Edited 2 files" from hiding a failure in the group. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only show the filename label below expanded content when there's a filename detail or artifact candidate. Labels like "Ran" or "Delegate" that just repeat the trigger text are now hidden. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ction - toolLabelUtils: 20 tests covering getToolType, getToolDetail, getToolVerb, getToolLabel, and extractFileDetail (from name, args, and result text) - MessageBubble: groups consecutive same-type calls, splits by outcome, verb labels with filenames, filename extraction from args path keys - ToolCallAdapter: redundant label hidden when no detail, filename shown below content when displayDetail is provided Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lCallTrigger Extracts a shared ToolCallTrigger component so styling changes (like foreground color) apply to both single and grouped tool calls at once. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25aa644 to
39c5a2a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39c5a2a4d2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <ToolCallTrigger | ||
| label={label} | ||
| expanded={expanded} | ||
| onClick={() => setExpanded((prev) => !prev)} |
There was a problem hiding this comment.
Surface grouped tool-call status in collapsed headers
When multiple tool calls are grouped, the collapsed row renders only label={label} and never passes a status badge, so a group of failed or still-running calls is shown as a success-like label such as “Edited 2 files” until the user expands it. This hides error/running state in the default view (especially in long tool chains) and undermines the commit’s goal of keeping failures visible; please compute the group status and pass an appropriate badge (e.g. via getStatusBadge) into ToolCallTrigger for grouped rows.
Useful? React with 👍 / 👎.
…on grouped rows - Pick the first allowed candidate as primaryCandidate per tool call instead of blindly using candidates[0], so file-open actions work even when the top-ranked path is out of scope. - Compute worst-case status across grouped tool calls and pass the badge to ToolCallTrigger so errors/running state are visible in collapsed group headers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ArtifactPolicyContext: verify first allowed candidate becomes primary when top-ranked candidate is outside allowed roots - ToolChainCards: verify error/running badges surface on collapsed group headers, and successful groups show no badge Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
ToolCallTriggercomponent used by both single and grouped tool calls — styling changes (foreground color, chevron, animations) only need to happen in one placeToolChainCardsandtoolLabelUtilsinto dedicated filesScreen.Recording.2026-04-07.at.1.38.33.PM.mov
Test plan
🤖 Generated with Claude Code