Skip to content

fix(web): stop repeating Bash commands in tool rows - #7713

Closed
ishaanko wants to merge 1 commit into
pingdotgg:mainfrom
ishaanko:fix/claude-bash-detail-dedup
Closed

fix(web): stop repeating Bash commands in tool rows#7713
ishaanko wants to merge 1 commit into
pingdotgg:mainfrom
ishaanko:fix/claude-bash-detail-dedup

Conversation

@ishaanko

@ishaanko ishaanko commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • extractToolCommand now reads data.input.command, which is where Claude's completed tool activity carries the command.
  • The detail redundancy check in extractToolDetail now treats a detail that repeats the command with a ToolName: prefix, or with the server's ... truncation, as redundant and drops it.
  • Added regression tests built from a real Claude Bash lifecycle (tool.updated + tool.completed).

Why

Claude puts the command into detail as Bash: <command>. The web compared detail to the command with exact equality, so every expanded Bash row showed the command and then Bash: <command> again. The completed activity also only carries the command in data.input.command, which the web never read, so it fell back to the prefixed (and for long commands, truncated) detail as the command.

Fixing this in the web presentation layer also cleans up already-persisted threads. Mobile has the same symptom with a separate derivation path (apps/mobile/src/lib/threadActivity.ts) and is left for a follow-up to keep this PR small.

Closes #7711

UI Changes

Before:

before

After:

after

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Changes made by Claude Fable 5 running in Claude Code.


Note

Low Risk
Presentation-only change to work-log derivation; no auth, persistence, or command-execution behavior is affected.

Overview
Stops Claude Bash work-log rows from showing the command twice (command plus Bash: <command>).

extractToolCommand now reads data.input.command from completed Claude activities, so the real command is used instead of the prefixed/truncated detail. Redundant details that only repeat the command (including ToolName: prefixes and server ... truncation) are dropped. Regression tests cover a Claude tool.updated + tool.completed lifecycle.

Reviewed by Cursor Bugbot for commit 54baa11. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix repeated Bash commands in tool rows by improving extractToolDetail

  • extractToolCommand now also reads data.input.command from Claude-style completed payloads so the command is found in more cases.
  • New detailRepeatsCommand helper detects when a detail string only repeats the command, including tool-name prefixes and truncated details ending with ... or .
  • extractToolDetail uses this helper to drop details that merely restate the command, instead of only checking for exact equality.
  • Risk: extractToolDetail now returns null in more cases in session-logic.ts; callers that relied on detail text being present for command tools will see fewer populated rows.

Macroscope summarized 54baa11.

Claude puts the command into `detail` as `Bash: <command>` and the server
truncates long details with `...`. The web dedup compared `detail` to the
command with exact equality, so the row showed the command and then
`Bash: <command>` again. The completed activity also only carried the command
in `data.input.command`, which the web never read, so it fell back to the
prefixed and truncated detail as the command.

Read `data.input.command` for the command and treat a detail that repeats the
command with a tool-name prefix or a truncated `...` suffix as redundant.

Closes pingdotgg#7711
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4fcaf0e9-03e7-4dc9-a1a1-2054d9e1a1c5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 20, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 54baa11

Macroscope's review found this PR approvable — Self-contained bug fix preventing duplicate command text in tool rows. Adds a well-tested pure helper function; changes isolated to UI presentation with no runtime behavior impact.

You can add or adjust custom eligibility rules. Learn more.

@t3dotgg

t3dotgg commented Aug 28, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

We are keeping OPEN #7989 as the review path for repeated OpenCode Bash rows. The focused command-output test here remains useful reference.

If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.

@t3dotgg t3dotgg closed this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Bash command shown twice in tool-call activity — dedup check doesn't strip the "Bash: " prefix baked into detail

2 participants