Render command and file-change details inline#3043
Conversation
- Preserve command output, exit code, duration, and patches - Add expandable timeline detail rows for command and file changes - Document debug browser launch workflow
- Preserve command output whitespace and accessible toggles - Tighten work entry guards and patch extraction behavior - Add regression coverage for reviewed edge cases
- Preserve command stdout stripping across fallback payloads - Keep dynamic and MCP tool details classified by actual metadata - Preserve top-level and nested patch extraction coverage
- Keep changed-file chips only when no inline diff exists - Render inline file diffs expanded so the patch body stays visible
- Merge cumulative command output instead of reappending it - Keep file change details from showing alongside command details - Stop nested patch extraction from overriding the top-level patch
- Keep cumulative output de-dupe without arbitrary overlap trimming - Cover overlapping delta chunks in session logic tests
- Restore command and file detail precedence - Cover incremental output merge edge cases
- Render command and file-change details together - Preserve distinct overlapping command-output chunks
- Render command and file-change details independently - Cover dynamic output-only and command-patch rows
# Conflicts: # apps/web/src/components/chat/MessagesTimeline.tsx
- Restore disclosure behavior for shell-wrapped raw commands
|
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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: Needs human review 1 blocking correctness issue found. This PR introduces a substantial new feature (~1700 lines) for rendering command output and file-change details inline, including new React components and data extraction logic. New user-facing capabilities of this scope warrant human review. Additionally, there is an unresolved review comment identifying a bug where workspaceRoot is not passed through, causing paths to display incorrectly. You can customize Macroscope's approvability policy. Learn more. |
- Render non-command detail alongside command/file sections - Add browser coverage for expanded command rows retaining detail
- Suppress detail text already shown in command output - Add browser coverage for the duplicate-output case
- Deduplicate rendered output only for command rows - Add browser coverage for the file-change detail case
# Conflicts: # apps/web/src/components/chat/MessagesTimeline.tsx
- Reduce left inset for expanded tool detail blocks
Summary
Enhances inline expandable work-log details for file-change and command activities in the conversation timeline.
Rolled #3005 into the newest changes in main.
What Changed
Augmented
main’s redesigned activity rows with richer inline details.Ran command - <command>.Raw commanddisclosure.Added command output rendering helpers.
Added inline file-change details to activity rows.
main’s compact activity box styling and collapsed preview.FileDiffviewer.Extracted richer command and patch metadata from tool activity payloads.
Added coverage for the branch-specific behavior on top of
main.Why
Individual command and diff events are mostly opaque currently. We can somewhat see what the agent is doing, but we don't have a clear picture of what each command actually outputs, or what each file change actually produced.
Usually that's fine, most times we inspect the end result and trust the agent. Sometimes it's good to inspect a little deeper. For commands we can help steer by debugging their output, or just compare the results with manual runs. For diffs we can see better follow along the multiple changes an agent makes, or even inspect changes to git-ignored files (which don't appear on the main diff panel).
UI Changes
Before:

After:

Note
Medium Risk
Large UI and parsing surface in the chat timeline plus heterogeneous tool-payload normalization; mistakes could mis-render output/diffs or show wrong merged command streams, but scope is presentation and read-path extraction with broad tests.
Overview
Expands timeline tool/work rows so command and file-change activities show structured inline details when expanded, instead of a single generic pre block.
Session logic enriches
WorkLogEntrywithoutput,stdout,stderr,exitCode,durationMs, andpatch. NewextractCommandResultandextractToolPatchpull that metadata from varied provider payloads (including Codex-style shapes), strip embedded exit-code footers, and normalize hunk-only or add diffs into unified patches with bounded traversal.mergeTextOutputmerges incrementaltool.updated/tool.completedstreams without duplicating cumulative output.Timeline UI routes expandable rows through
ToolEntryDetails: command blocks (display command, optional raw-command disclosure, exit/duration chips, stdout/stderr/output with last-40-line default and full expand), file-change blocks (FileDiffwhen a patch renders, else path chips), and supplementaldetailonly when it does not repeat command or rendered output. Row expand/collapse uses explicitaria-expanded/ Expand–Collapse labels; non-command tool types (e.g. web search) stay non-expandable for stdout-only metadata.Tests cover output line helpers, extraction/merge/patch normalization in
session-logic, static markup for which rows expand, and browser tests for supplemental detail and deduplication.Reviewed by Cursor Bugbot for commit f7c2462. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Render command output and file-change diffs inline in the chat messages timeline
WorkLogEntryin session-logic.ts withstdout,stderr,exitCode,durationMs, andpatchfields, extracted and normalized from heterogeneous provider payloads.CommandEntryDetailsandFileChangeEntryDetailscomponents in MessagesTimeline.tsx that render command strings, exit code/duration chips, collapsible output streams (truncated to last 40 lines), and inline unified diffs with file stats.aria-expandedand keyboard support.Macroscope summarized f7c2462.