Skip to content

Render command and file-change details inline#3043

Open
Quicksaver wants to merge 17 commits into
pingdotgg:mainfrom
Quicksaver:file-change-command-activity-boxes
Open

Render command and file-change details inline#3043
Quicksaver wants to merge 17 commits into
pingdotgg:mainfrom
Quicksaver:file-change-command-activity-boxes

Conversation

@Quicksaver

@Quicksaver Quicksaver commented Jun 11, 2026

Copy link
Copy Markdown

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.

    • Command-like rows keep the compact collapsed preview, e.g. Ran command - <command>.
    • Expanded command details show the display command, exit code, duration, and any stdout/stderr/output streams.
    • Differing raw shell-wrapped commands are available behind a collapsed Raw command disclosure.
  • Added command output rendering helpers.

    • Empty output streams are hidden.
    • Output streams trim only outer empty lines and preserve intentional blank lines inside output.
    • Long streams show the last 40 lines by default and can be toggled to the full stream.
  • Added inline file-change details to activity rows.

    • File-change rows keep main’s compact activity box styling and collapsed preview.
    • Expanded rows render available patches through the existing FileDiff viewer.
    • When no renderable patch is available, expanded rows list changed paths inline.
  • Extracted richer command and patch metadata from tool activity payloads.

    • Command metadata now supports stdout, stderr, fallback output, exit code, duration, and shell-wrapped raw commands.
    • Patch metadata now supports unified diffs, hunk-only diffs, content-only add diffs, bounded nested patch data, top-level patches, and gitignored file patches when the provider emits patch data.
    • Incremental command output chunks are merged without duplicating completed cumulative output.
  • Added coverage for the branch-specific behavior on top of main.

    • Timeline rendering coverage locks in expandable command/file-change details and non-command output exclusion.
    • Output helper coverage locks in empty-stream hiding and outer-empty-line trimming.
    • Session activity coverage locks in command metadata extraction, incremental output merging, and inline patch normalization.

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:
Screenshot 2026-06-12 at 16 55 22

After:
Screenshot 2026-06-12 at 16 53 39


Open in Devin Review

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 WorkLogEntry with output, stdout, stderr, exitCode, durationMs, and patch. New extractCommandResult and extractToolPatch pull 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. mergeTextOutput merges incremental tool.updated / tool.completed streams 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 (FileDiff when a patch renders, else path chips), and supplemental detail only when it does not repeat command or rendered output. Row expand/collapse uses explicit aria-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

  • Extends WorkLogEntry in session-logic.ts with stdout, stderr, exitCode, durationMs, and patch fields, extracted and normalized from heterogeneous provider payloads.
  • Adds CommandEntryDetails and FileChangeEntryDetails components 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.
  • De-duplicates supplemental detail text against rendered command output and command strings to avoid showing the same content twice.
  • Tool rows without any expandable details are no longer interactive; rows with details gain proper aria-expanded and keyboard support.
  • Risk: command output display behavior changes for all tool entries — previously a raw pre-block, now structured with truncation and collapsing by default.

Macroscope summarized f7c2462.

Quicksaver added 12 commits June 8, 2026 19:52
- 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
@coderabbitai

coderabbitai Bot commented Jun 11, 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

Run ID: c2374b1e-7b86-4a8d-8ac8-01e51569b193

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Jun 11, 2026
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
@macroscopeapp

macroscopeapp Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
- Suppress detail text already shown in command output
- Add browser coverage for the duplicate-output case
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
- Deduplicate rendered output only for command rows
- Add browser coverage for the file-change detail case
# Conflicts:
#	apps/web/src/components/chat/MessagesTimeline.tsx
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
- Reduce left inset for expanded tool detail blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 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.

1 participant