Skip to content

feat(terminal): add default command output collapse setting - #2042

Draft
bigyao25 wants to merge 2 commits into
Zoo-Code-Org:mainfrom
bigyao25:feat/collapse-command-output-by-default
Draft

bigyao25 wants to merge 2 commits into
Zoo-Code-Org:mainfrom
bigyao25:feat/collapse-command-output-by-default

Conversation

@bigyao25

@bigyao25 bigyao25 commented Oct 13, 2026 •

Copy link
Copy Markdown

Related GitHub Issue

Related to #605.

The author has posted Claiming on the issue. Maintainer assignment is pending.

Description

Verbose Inline Terminal output can fill the chat. Add an independent Collapse command output by default setting under Terminal.

  • Keep the setting off by default to preserve existing behavior.
  • When enabled, start command output collapsed in both terminal modes. Keep manual expand and collapse controls.
  • Respect the preference during shell integration fallback. Preserve output that the user has manually expanded.
  • Buffer edits until Save. Persist the value through ContextProxy and return it to the webview.
  • Add an optional boolean schema, shared default, and import/export support.
  • Add labels and descriptions for all 18 supported languages.

This supports Enhanced User Experience. Command execution, output collection, and the selected terminal backend stay unchanged.

This PR implements the independent preference requested in #605. It does not add a last-lines preview or a new exit-code summary.

Test Procedure

Passed locally:

  • Shared setting schema suite: 10 tests.
  • Extension persistence and webview state suites: 293 tests.
  • Command output and SettingsView suites: 80 tests.
  • Full workspace type checks through the push hook.
  • Full workspace lint through the commit hook, focused lint, formatting, and git diff --check.
  • Translation completeness check for all supported locales.
  • Four TerminalSettings visual comparisons in the repository-pinned Playwright Docker image.

Repeat the focused tests:

pnpm --dir packages/types exec vitest run src/__tests__/global-settings.test.ts
pnpm --dir src exec vitest run core/webview/__tests__/ClineProvider.spec.ts core/webview/__tests__/webviewMessageHandler.spec.ts
pnpm --dir webview-ui exec vitest run src/components/chat/__tests__/CommandExecution.collapse.spec.tsx src/components/chat/__tests__/CommandExecution.spec.tsx src/components/settings/__tests__/SettingsView.spec.tsx

Manual review:

  1. Keep Use Inline Terminal enabled.
  2. Enable Collapse command output by default and click Save.
  3. Run a command with verbose output. Verify the output starts collapsed and can be expanded manually.
  4. Reopen settings. Verify the saved preference remains enabled.
  5. Disable the preference and save. Verify a new inline command starts expanded.

Local tools: macOS, Node 24.21.0, pnpm 10.8.1. The repository requests Node 22.23.1.

Pre-Submission Checklist

  • Issue Linked: Maintainer approval and assignment are pending for [ENHANCEMENT] Collapsible command output #605.
  • Scope: One independent command output display preference.
  • Self-Review: Automated implementation review completed. Human review is pending.
  • Writing Style: Short sentences and plain words.
  • Testing: Focused regression tests cover the complete setting round trip.
  • Visual Snapshot: Gallery test and four container-generated theme baselines are included.
  • Documentation Impact: The setting description explains behavior and compatibility.
  • Contribution Guidelines: Read the repository contribution and agent guidance.

Visual Snapshots

TerminalSettings.visual.tsx covers the production settings screen in dark, light, high-contrast, and high-contrast-light themes.
The four baselines were generated and compared in the repository-pinned Playwright Docker image.
The temporary container path contains Corepack pnpm shims. Lockfile dependencies include Linux native packages for the container run.
No repository dependency files changed.

Documentation Updates

The setting contains translated help text. No separate documentation change is required for this PR.

Additional Notes

Codex helped implement and test this change. Human review and maintainer assignment are required before marking this draft ready.
The PR keeps existing users on the current display behavior until they enable the preference.

Keep terminal execution independent from output visibility. Preserve existing behavior until users enable the setting.

Refs Zoo-Code-Org#605
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review-active

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: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d39a5b5b-f945-4d47-a789-646bca08c983

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Generate and compare all four VS Code theme snapshots in the pinned Playwright container.

Refs Zoo-Code-Org#605
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Review status

Thanks for contributing. This comment tracks the review sequence and the next action.

Current step: Mark the PR ready. Required CI must pass before CodeRabbit starts.

Review-state labels are managed by this workflow; do not edit them manually. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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.

1 participant