Skip to content

Render command and file-change details inline#3043

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

Render command and file-change details inline#3043
Quicksaver wants to merge 15 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-11 at 09 10 34

After:
Screenshot 2026-06-11 at 09 49 39


Open in Devin Review

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-logic now 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). Incremental tool.updated output is merged into completed streams without duplicating cumulative text.

MessagesTimeline replaces 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), inline FileDiff for patches or a path list when no renderable diff exists, and supplemental detail text 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

  • Expanded work entry rows in the chat timeline now show structured command details (command string, exit code, duration, stdout/stderr with tail truncation to 40 lines) and inline file diffs with diff stats, replacing the previous plain preformatted block.
  • New logic in session-logic.ts extracts and normalizes stdout, stderr, exitCode, durationMs, and unified diff patches from heterogeneous provider payloads; incremental output across tool.updated/tool.completed events is merged without duplication.
  • Supplemental detail text is deduplicated against rendered command output so the same content is never shown twice in an expanded row.
  • Long output is truncated to the last 40 lines by default with an accessible expand/collapse toggle.
  • Behavioral Change: SimpleWorkEntryRow now uses hasExpandableWorkEntryDetails to gate expandability, so rows without renderable details are no longer expandable.

Macroscope summarized c7de3c4.

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: 33a49412-d954-4d56-9b7b-9fa58bc51a87

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

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
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
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