fix(web): stop repeating Bash commands in tool rows - #7713
Conversation
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
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Approved at 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. |
|
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. |
What Changed
extractToolCommandnow readsdata.input.command, which is where Claude's completed tool activity carries the command.detailredundancy check inextractToolDetailnow treats a detail that repeats the command with aToolName:prefix, or with the server's...truncation, as redundant and drops it.tool.updated+tool.completed).Why
Claude puts the command into
detailasBash: <command>. The web compareddetailto the command with exact equality, so every expanded Bash row showed the command and thenBash: <command>again. The completed activity also only carries the command indata.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:
After:
Checklist
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 (
commandplusBash: <command>).extractToolCommandnow readsdata.input.commandfrom completed Claude activities, so the real command is used instead of the prefixed/truncateddetail. Redundant details that only repeat the command (includingToolName:prefixes and server...truncation) are dropped. Regression tests cover a Claudetool.updated+tool.completedlifecycle.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
extractToolDetailextractToolCommandnow also readsdata.input.commandfrom Claude-style completed payloads so the command is found in more cases.detailRepeatsCommandhelper detects when a detail string only repeats the command, including tool-name prefixes and truncated details ending with...or….extractToolDetailuses this helper to drop details that merely restate the command, instead of only checking for exact equality.extractToolDetailnow returnsnullin 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.