Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): show command output in work log #4083

MergedLikoKiko(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/4083/headmerged by juliusmarminge View on GitHub

What Changed

Fixes #4076.

Updated command work-log entries so they display:

  • The executed command once
  • The actual command output underneath it

The fix supports output from Codex and ACP-based providers such as Claude.

It also preserves the existing Cursor behavior when stdout is available but the original command input is missing.

Added focused regression tests covering:

  • Codex command output
  • Claude ACP stdout
  • Commands with no output
  • Cursor events without command metadata

Why

Command execution entries were sometimes showing the command twice instead of showing the command followed by its output.

This happened because the command text could be stored as both the command and detail, while the real provider output was not being selected for the expanded work-log entry.

The updated logic extracts the actual output only when the original command is available, preventing duplicated command text and avoiding misleading output-only rows.

UI Changes

This changes the content shown when expanding a command work-log entry:

Before

printf hello

printf hello

After

printf hello

hello

There are no visual styling or layout changes.

Testing

  • vp test apps/web/src/session-logic.command-output.test.ts — 3 tests passed
  • vp test apps/web/src/session-logic.test.ts — 59 tests passed
  • vp check — completed with 0 errors
  • git diff --check — passed
  • vp run test — attempted, but unrelated oxlint-plugin-t3code tests could not spawn the local Windows oxlint executable (ENOENT)

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk Display and payload-slimming only; no auth or persistence changes, with behavior covered by new unit tests.

Overview Fixes work-log command rows that showed the command twice instead of command + output by teaching deriveWorkLogEntries / extractToolDetail to pull real stdout-style text from Codex (aggregatedOutput), Claude (rawOutput), and ACP (content arrays), and to omit detail when it would only repeat the command or there is no output.

On the wire path, projectActivityPayload now summarizes and bounds the same command-output fields (including Codex aggregatedOutput, result content, stderr, and ACP text folded into rawOutput) so clients still get usable previews without huge payloads.

Adds focused regression tests in session-logic.command-output.test.ts and ActivityPayloadProjection.test.ts.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6c35fbda526d709bbe55ca89993fff34a1960824. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Show command output in work log entries for command execution activities

  • Adds extractToolOutput in session-logic.ts to pull command output from multiple payload shapes: aggregatedOutput, result.content, rawOutput (string or object), stdout/stderr, and ACP content arrays.
  • Updates extractToolDetail to prefer actual tool output as the detail for command tools, and suppresses detail entirely when output is absent or duplicates the command string.
  • Extends ActivityPayloadProjection.ts to project bounded summaries of aggregatedOutput, result.content, stderr, and ACP content arrays into the activity payload.
  • Behavioral Change: command execution work log entries now show output as detail instead of echoing the command; entries with no output omit detail entirely.
Macroscope summarized 6c35fbd.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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 Plus

      Run ID: 1ba33f49-a993-414e-904a-f5b8e2a1d885

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      This PR adds new user-facing functionality (displaying command output in work log) with ~280 lines of new extraction logic across server and client. The author has no prior commit history in this repository, suggesting human review is appropriate for this feature addition.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Hope this can be merged, one of the only things stopping me from adopting T3 as my primary tool.

    5. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      There are 2 total unresolved issues (including 1 from previous review).

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).

      Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f607ebc4fb1e446bee85bf57db45f77ae9c923ed. Configure [here](https://www.cursor.com/dashboard/bugbot).
    6. juliusmarminge merged this143f713

    7. juliusmarminge closed this

Sign in to join this conversation.