Skip to content

Default bash tool output to expanded in chat#6349

Merged
markijbema merged 3 commits intomainfrom
mark/terminal-expanded-default
Feb 26, 2026
Merged

Default bash tool output to expanded in chat#6349
markijbema merged 3 commits intomainfrom
mark/terminal-expanded-default

Conversation

@markijbema
Copy link
Contributor

@markijbema markijbema commented Feb 25, 2026

Summary

  • Changes the default state of the bash/shell tool output block in the chat UI to be expanded (not folded) by default
  • Previously it defaulted to collapsed; now it defaults to open so terminal execution output is immediately visible
  • Callers can still pass defaultOpen={false} explicitly to override the new default

The change is a one-liner in packages/ui/src/components/message-part.tsx: defaultOpen={props.defaultOpen ?? true} in the bash tool's BasicTool render.

Before After
CleanShot 2026-02-25 at 16 33 59@2x CleanShot 2026-02-25 at 16 33 31@2x

@markijbema markijbema marked this pull request as ready for review February 25, 2026 15:37
@markijbema markijbema enabled auto-merge February 25, 2026 15:38
@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Feb 25, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

CRITICAL

File Line Issue

WARNING

File Line Issue
packages/ui/src/components/message-part.tsx 1522 Hardcoded defaultOpen overrides tool-level default behavior and can force all bash tool outputs open, bypassing existing expansion preferences and increasing UI/render load for large output.

SUGGESTION

File Line Issue
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
Files Reviewed (1 files)
  • packages/ui/src/components/message-part.tsx - 1 issue

return (
<BasicTool
{...props}
defaultOpen // kilocode_change
Copy link
Contributor

Choose a reason for hiding this comment

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

WARNING: Hardcoded defaultOpen overrides tool-level default behavior

Setting defaultOpen unconditionally here overrides any props.defaultOpen value passed from the message part pipeline. This can silently bypass existing shell expansion preferences/flags and force all bash tool outputs open, which risks UI noise and unnecessary rendering cost for large command outputs. Consider deriving this from props.defaultOpen (or a dedicated feature flag) instead of hardcoding it.

@markijbema markijbema merged commit 33a285b into main Feb 26, 2026
10 checks passed
@markijbema markijbema deleted the mark/terminal-expanded-default branch February 26, 2026 12:45
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.

3 participants