Skip to content

feat(studio): show additional details for coding agent tool calls - #651

Closed
dmariali wants to merge 6 commits into
mainfrom
coding_agent_show_tool_details
Closed

feat(studio): show additional details for coding agent tool calls#651
dmariali wants to merge 6 commits into
mainfrom
coding_agent_show_tool_details

Conversation

@dmariali

@dmariali dmariali commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-07-13 at 12 33 51 PM

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Subtle tool calls now display a code-styled invocation panel, including exact command text when expanded.
    • Grouped subtle tool actions can be expanded, with nested invocation-specific panels and “Copy invocation” controls.
  • Bug Fixes
    • Expanded views now show the correct invocation/command content (not descriptions), and summary-only variants no longer expose invocation details.
  • Tests
    • Updated and expanded tests to cover subtle rendering, nested expand/collapse behavior, and clipboard copy output.

@dmariali
dmariali requested review from a team as code owners July 13, 2026 16:35
@github-actions github-actions Bot added the feat label Jul 13, 2026
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@dmariali
dmariali force-pushed the coding_agent_show_tool_details branch from 73fd37c to b1a7a2b Compare July 13, 2026 16:37
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 83dfe029-cb9a-46ef-9f42-2d5b99d3bfc3

📥 Commits

Reviewing files that changed from the base of the PR and between ad23c75 and 8c88e07.

📒 Files selected for processing (1)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx

📝 Walkthrough

Walkthrough

Changes

Subtle tool invocation details

Layer / File(s) Summary
Invocation data and grouped actions
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/types.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/helpers.ts
Subtle actions now store individual invocations, derive Bash commands or formatted arguments, and aggregate invocations for repeated actions.
Invocation rendering and propagation
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx
Tool-call rendering passes invocation data to subtle rows, which display expandable invocation panels and copy controls for individual or grouped actions.
Invocation disclosure tests
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.test.tsx
Tests cover Bash command rendering, grouped invocation expansion, nested panel state, clipboard copying, and summary-only Read tool calls.

Sequence Diagram(s)

sequenceDiagram
  participant ClaudeCodeToolCallPart
  participant getToolInvocation
  participant SubtleToolCallRow
  participant navigator.clipboard
  ClaudeCodeToolCallPart->>getToolInvocation: derive invocation from toolName and args
  getToolInvocation-->>ClaudeCodeToolCallPart: return invocation string
  ClaudeCodeToolCallPart->>SubtleToolCallRow: provide invocation or invocations
  SubtleToolCallRow->>navigator.clipboard: copy selected invocation
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: showing additional details for coding agent tool calls in Studio.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch coding_agent_show_tool_details

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 23845/31009 76.9% 61.7%
Integration Tests 13817/29658 46.6% 19.6%

Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx (1)

148-157: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefer a guard over the non-null assertion.

invocations[0]! is safe today only because isExpandable's second disjunct guarantees invocations.length > 0 before reaching this branch — but that's an implicit cross-branch invariant, not something the compiler enforces here. As per coding guidelines: "Use type assertions sparingly. Prefer type guards and narrowing in TypeScript."

♻️ Narrow instead of asserting
               ) : (
                 <Flex direction="col" className="mt-density-xs w-full min-w-0 max-w-full pl-7">
-                  <InvocationPanel
-                    invocation={invocations[0]!}
-                    invocationCount={1}
-                    invocationIndex={0}
-                    toolCallId={action.toolCallId}
-                  />
+                  {invocations[0] && (
+                    <InvocationPanel
+                      invocation={invocations[0]}
+                      invocationCount={1}
+                      invocationIndex={0}
+                      toolCallId={action.toolCallId}
+                    />
+                  )}
                 </Flex>
               )}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx`
around lines 148 - 157, Replace the non-null assertion on invocations[0] in the
SubtleToolCallRow render branch with an explicit guard or narrowed conditional
that verifies invocations contains an item before rendering InvocationPanel.
Preserve the existing single-invocation props and ensure the empty-invocations
case cannot access an undefined element.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx`:
- Around line 148-157: Replace the non-null assertion on invocations[0] in the
SubtleToolCallRow render branch with an explicit guard or narrowed conditional
that verifies invocations contains an item before rendering InvocationPanel.
Preserve the existing single-invocation props and ensure the empty-invocations
case cannot access an undefined element.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 34f5d6c0-b095-41f1-b69d-ac4a0d39c4a4

📥 Commits

Reviewing files that changed from the base of the PR and between b1a7a2b and ad23c75.

📒 Files selected for processing (2)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.test.tsx

dmariali added 2 commits July 14, 2026 09:09
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@dmariali
dmariali enabled auto-merge July 14, 2026 13:11
@dmariali
dmariali requested a review from a team as a code owner July 14, 2026 13:44
@github-actions

Copy link
Copy Markdown
Contributor

This reverts commit 31dc4ee, reversing
changes made to 8c88e07.

Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants