Skip to content

Don't truncate commands + show running commands#1775

Open
Minigamer42 wants to merge 2 commits into
pingdotgg:mainfrom
Minigamer42:feature/preserve-runtime-tool-details
Open

Don't truncate commands + show running commands#1775
Minigamer42 wants to merge 2 commits into
pingdotgg:mainfrom
Minigamer42:feature/preserve-runtime-tool-details

Conversation

@Minigamer42
Copy link
Copy Markdown
Contributor

@Minigamer42 Minigamer42 commented Apr 6, 2026

What Changed

  • Removed the manual truncateDetail call for tool calls send by the agent (the output is still truncated via css ellipsis in the UI, but can be viewed by hovering)
  • Show the command while it is running with optionally a different label

Why

  • Longer commands got truncated in the UI
  • Sometimes the agent would run a command in the background and get stuck (like an interactive binary or something that takes very long to complete). Currently the UI gives no feedback on that until the command exits or you kill it via taskmgr or similar.

UI Changes

  • State before this PR:
truncated title
  • Longer command string visible:
unformatted title
  • Different label while the command is running:
running command
  • Same command with formatting:
formatted title

PS: Also works with the latest changes to not show the shell wrapper, this PR is unaffected by that.
image

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

Medium Risk
Medium risk because it changes server→web event payload shape (itemId) and rewrites work-log collapsing logic, which could affect timeline ordering/merging for tool lifecycle entries.

Overview
Work log entries now include tool.started so users can see in-progress tool/command execution (with lifecycle-aware titles like “Running command” vs “Ran command”).

Server ingestion and provider mapping propagate itemId into tool lifecycle activity payloads and stop truncating detail for tool.started/tool.completed events, keeping full command/detail text available to the UI.

Web collapsing logic is reworked to merge tool.started/tool.updated/tool.completed into a single row using a stable collapseKey (preferring toolCallId, then itemId, then a normalized fallback), even when lifecycle events are non-adjacent; merged rows retain the original id/createdAt from the first event.

Reviewed by Cursor Bugbot for commit 1b0d1c1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Show running commands in work log and stop truncating command details

  • Command execution items now show "Running command" while in progress and "Ran command" when complete, via a lifecycle-aware itemTitle in CodexAdapter.ts.
  • tool.started events are no longer filtered out of the work log and tool.detail is forwarded without truncation in ProviderRuntimeIngestion.ts.
  • The work log collapse logic in session-logic.ts is reworked to merge tool.started, tool.updated, and tool.completed entries into a single row using a stable collapseKey (preferring toolCallId or itemId), even when entries are non-adjacent.
  • Merged lifecycle rows now retain the original id and createdAt from the first entry rather than the latest event's values.

Macroscope summarized 1b0d1c1.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

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: 35c62905-a045-41a1-9a46-45759920c81a

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 6, 2026
Comment thread apps/web/src/session-logic.ts
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 6, 2026

Approvability

Verdict: Needs human review

This PR changes runtime UI behavior by showing running commands and removing command truncation. An unresolved high-severity review comment identifies a collapse key mismatch bug that would leave phantom 'Running command' entries visible after completion.

You can customize Macroscope's approvability policy. Learn more.

@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from b042087 to 941b722 Compare April 6, 2026 16:40
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated
@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from 941b722 to 74d4e79 Compare April 6, 2026 20:09
@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from 74d4e79 to 7667c93 Compare April 18, 2026 18:49
Comment thread apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from 7667c93 to 0437846 Compare April 20, 2026 09:38
@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from 0437846 to 979f8c0 Compare April 28, 2026 06:38
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 979f8c0. Configure here.

: lifecycle === "item.completed"
? "completed"
: undefined;
const title = itemTitle(itemType, lifecycle === "item.started");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated commands prematurely labeled "Ran command" while still running

Medium Severity

itemTitle receives started = true only when lifecycle === "item.started". For item.updated events — which fire while a command is still executing — started is false, so the title becomes "Ran command". When merged with the tool.started entry, the label prematurely changes from "Running command" to "Ran command", undermining the PR's core feature of indicating running state.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 979f8c0. Configure here.

@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch 3 times, most recently from 9d317d4 to 0258762 Compare May 7, 2026 07:59
- Stop truncating `detail` when ingesting provider runtime tool events
- carry item IDs and payload data through server ingestion
- collapse tool lifecycle rows by stable item IDs
- keep command start rows visible with clearer labels
@Minigamer42 Minigamer42 force-pushed the feature/preserve-runtime-tool-details branch from 0258762 to 1b0d1c1 Compare May 14, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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