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 This PR introduces a new user-facing feature for rendering command outputs and file-change diffs inline in the timeline UI, with ~1700 lines of new components and extraction logic. New feature capability of this scope warrants human review. 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
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
Touches timeline UI and broad provider payload parsing for commands and patches; mistakes could mis-render output or show wrong diffs, but changes are scoped to display and extraction with heavy test coverage.
Overview
Expands chat timeline work-log rows so users can inspect what commands actually ran and what file changes produced, without leaving the conversation.
session-logicnow pulls richer metadata from heterogeneous tool activity payloads: stdout/stderr, exit code, duration, raw shell-wrapped commands, and unified patches (including Codex-style hunk-only and add diffs). Incrementaltool.updatedoutput is merged into completed streams without duplicating cumulative text.MessagesTimelinereplaces the old single pre block with structured expand/collapse details: command sections (metadata, optional raw command disclosure, tail-truncated output defaulting to the last 40 lines), inlineFileDifffor patches or a path list when no renderable diff exists, and supplementaldetailtext that is deduped when it repeats command or output. Expandability is gated on meaningful detail; non-command tools like web search stay non-expandable.Tests cover extraction, output trimming helpers, static markup for row types, and browser interactions for expand behavior and deduplication.
Reviewed by Cursor Bugbot for commit c7de3c4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Render command output and inline file diffs in expanded tool entry rows
stdout,stderr,exitCode,durationMs, and unified diff patches from heterogeneous provider payloads; incremental output acrosstool.updated/tool.completedevents is merged without duplication.SimpleWorkEntryRownow useshasExpandableWorkEntryDetailsto gate expandability, so rows without renderable details are no longer expandable.Macroscope summarized c7de3c4.