close
Skip to content

fix(terminal): keep running-command tooltips concise - #6991

Merged
icecrasher321 merged 1 commit into
stagingfrom
fix/oversized-terminal-tooltips
Aug 23, 2026
Merged

fix(terminal): keep running-command tooltips concise#6991
icecrasher321 merged 1 commit into
stagingfrom
fix/oversized-terminal-tooltips

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • Show the terminal working directory and a concise foreground program name in terminal-tab tooltips.
  • Keep the literal running command unchanged in terminal state and scrollback, where it remains selectable and copyable.
  • Add regression coverage for the long compound heredoc command reported in Slack and the existing idle-terminal fallbacks.

Slack issue: https://sim-ai.slack.com/archives/C093DF8MA21/p1786758187764159

The oversized tooltip was caused by passing the complete literal command into a short, non-interactive tooltip. Its existing width cap then wrapped document-length commands into a viewport-height column. This fixes the semantic input at the terminal call site by reusing describeRunningCommand; it does not change the shared tooltip primitive or affect browser/resource-tab tooltip behavior.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Testing

  • Focused terminal-session test: 10 passed.
  • @sim/terminal-protocol tests: 9 passed.
  • Full monorepo test suite: 18 workspace tasks passed; Sim app reported 2,166 passing test files and 30,775 passing tests.
  • Full monorepo type-check passed.
  • Full monorepo lint check passed with one unrelated existing unused-suppression warning in lib/workspace-files/shell-layout.test.ts.
  • API-validation audit passed.
  • Source-built Electron manual QA against the local renderer:
    • Ran a 900-character multiline heredoc in one of two terminal tabs.
    • Keyboard-focused the running tab and verified the tooltip was /Users/billleoutsakos — python3 rather than the literal heredoc.
    • Verified the tooltip remained compact in a narrow split terminal pane and in both dark and light themes.
    • Verified the full command remained visible in terminal scrollback and that selecting it enabled the existing Copy action.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

The original oversized-tooltip screenshot is in the linked Slack thread. Manual QA was completed in both dark and light themes using the source-built desktop app.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
Image docs Skipped Skipped Aug 22, 2026 10:18pm

Request Review

@cursor

cursor Bot commented Aug 22, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only tooltip formatting reuse of existing describeRunningCommand; no protocol, PTY, or data-handling changes.

Overview
Terminal tab hover text no longer dumps the full running command. It now shows the working directory plus a short foreground-program name from describeRunningCommand, so long heredocs and compound shell lines do not wrap into a huge tooltip.

Idle tabs still show cwd (or Terminal if cwd is missing). The literal command is unchanged in terminal state and scrollback. Adds tests for the heredoc case and idle fallbacks.

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

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR keeps terminal-tab tooltips compact by describing the foreground program instead of displaying the complete running command.

  • Reuses describeRunningCommand when constructing active-terminal tooltips.
  • Preserves working-directory and generic fallbacks for idle terminals.
  • Adds regression coverage for a long compound heredoc command and idle states.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or quality issues identified.

The changed tooltip path uses an existing non-throwing, bounded command-description helper, preserves idle behavior, and has focused regression coverage for the reported long-command case.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/terminal-session/terminal-session.tsx Replaces literal running-command tooltip text with an existing bounded command-description helper while retaining idle fallbacks.
apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/terminal-session/terminal-session.test.ts Adds focused coverage for concise heredoc-command tooltips and existing idle-terminal behavior.

Reviews (1): Last reviewed commit: "fix(terminal): keep running-command tool..." | Re-trigger Greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author
oversized-terminal-tooltip-fixed

@icecrasher321
icecrasher321 merged commit 6f919ef into staging Aug 23, 2026
30 checks passed
@icecrasher321
icecrasher321 deleted the fix/oversized-terminal-tooltips branch August 23, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants