Skip to content

Conversation

Patrick-Erichsen
Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen commented Sep 16, 2025

Resolves #7768


Summary by cubic

Make tool call status text clickable to open the tool’s output in a virtual file. This lets users quickly view full tool output without expanding the UI.

  • Bug Fixes
    • Clicking the tool call message opens a "Tool Output" virtual file with rendered output (when available).
    • Applies to both SimpleToolCallUI and ToolCallDisplay; shows pointer/hover states when clickable.
    • Only clickable when the call is done, canceled, or errored; in-progress calls are not clickable.

@Patrick-Erichsen Patrick-Erichsen requested a review from a team as a code owner September 16, 2025 20:37
@Patrick-Erichsen Patrick-Erichsen requested review from sestinj and removed request for a team September 16, 2025 20:37
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 16, 2025
Copy link

⚠️ PR Title Format

Your PR title doesn't follow the conventional commit format, but this won't block your PR from being merged. We recommend using this format for better project organization.

Expected Format:

<type>[optional scope]: <description>

Examples:

  • feat: add changelog generation support
  • fix: resolve login redirect issue
  • docs: update README with new instructions
  • chore: update dependencies

Valid Types:

feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

This helps with:

  • 📝 Automatic changelog generation
  • 🚀 Automated semantic versioning
  • 📊 Better project history tracking

This is a non-blocking warning - your PR can still be merged without fixing this.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 16, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 5 files

Prompt for AI agents (all 3 issues)

Understand the root cause of the following 3 issues and fix them.


<file name="gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx">

<violation number="1" location="gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx:88">
Click on status text will also trigger the parent container&#39;s onClick due to event bubbling, leading to both actions firing. Stop propagation in the child click handler to avoid unintended toggling.</violation>
</file>

<file name="gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx">

<violation number="1" location="gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx:25">
Guard should require non-empty output. Checking array truthiness allows empty output to open a blank virtual file; use output?.length instead.</violation>

<violation number="2" location="gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx:46">
Attaching onClick leads to a clickable div without keyboard/role support in ToolCallStatusMessage, causing accessibility issues. Prefer a button or add role, tabIndex, and key handlers.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 17, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 17, 2025
Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

I think SimpleToolCall already has this functionality (see openContextItem), this approach duplicates for SimpleToolCall

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Sep 17, 2025
@sestinj sestinj removed their request for review September 19, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants