fix(web): avoid duplicate command details - #6498
Conversation
|
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 4610025 Straightforward bug fix that prevents duplicate command details from appearing in the UI. Changes are limited to display logic, include unit tests, and have no backend/schema impact. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Why
Codex command activities can contain the same shell-wrapped command in both
rawCommandanddetail. The expanded renderer displayed both fields without deduplication, making it look like every command ran twice.Deduplicating display blocks in the presentation layer fixes existing and active sessions without changing provider data or command execution behavior. It also matches the existing mobile implementation.
UI Changes
Before
After
Checklist
Note
Low Risk
UI-only presentation change in the messages timeline with no backend or execution impact; behavior is covered by new unit tests.
Overview
Expanded chat tool-call rows no longer repeat the same command when Codex activities put an identical shell-wrapped string in both
rawCommandanddetail.buildToolCallExpandedBodyis moved fromMessagesTimeline.tsxintoMessagesTimeline.logic.tsand builds the expanded body from ordered, deduplicated blocks (MCP payload, command/raw command, detail, changed files). Distinct output—e.g.pwdvs its cwd—is still shown on separate lines. Regression tests cover duplicate metadata and legitimate multi-block output.Provider data and command execution are unchanged; this is presentation-only and aligns with the mobile
appendUniqueBlockpattern.Reviewed by Cursor Bugbot for commit 4610025. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix duplicate command details in tool call expanded body
Extracts
buildToolCallExpandedBodyandworkEntryRawCommandfrom MessagesTimeline.tsx into MessagesTimeline.logic.ts and adds de-duplication logic so that identicalcommandanddetailblocks are not both rendered in the expanded tool call view.Macroscope summarized 4610025.