Skip to content

fix(tui): collapse single shell calls into working blocks - #882

Merged
mdev34-lab merged 4 commits into
dev-vibecodedfrom
arena/49dacd94-silvercode
Dec 1, 2026
Merged

mdev34-lab merged 4 commits into
dev-vibecodedfrom
arena/49dacd94-silvercode

Conversation

@mdev34-lab

@mdev34-lab mdev34-lab commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Issue for this PR

Closes #884

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A shell command that is the only tool call in an activity run now renders as its own collapsed Running command... working block. This applies to both the legacy bash tool name and the shell tool name.

The block can be expanded to reveal the command output. Shell calls separated by assistant text remain separate blocks, while other singleton tool calls keep their existing inline rendering. Multi-call activity grouping is unchanged.

The regression test covers both shell names, collapsed output, expansion, and separation across an assistant-text boundary.

The Photon patch hunk is also corrected so Bun can install the locked dependencies and resolve the embedded WASM asset in the compiled binary.

How did you verify your code works?

  • Activity-group TUI tests: 42 passed.
  • TUI typecheck passed.
  • git diff --check passed.
  • CI: Nix evaluation passed; Windows unit tests passed; Linux unit tests failed in five @opencode-ai/core ReadTool image tests, followed by a Turbo SIGBUS. A comparison against the exact base revision has not established whether those Linux failures are pre-existing.

Screenshots / recordings

Not included. This is a terminal UI change covered by the activity-group rendering test harness; no standalone screenshot or recording was attached.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@mdev34-lab
mdev34-lab changed the base branch from dev to dev-vibecoded November 30, 2026 17:48
@kilo-code-bot

kilo-code-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/tui/test/cli/tui/shell-line-cap.test.tsx 173 activityExpanded: () => true contradicts test expectations of collapsed initial state
Files Reviewed (2 files)
  • packages/tui/test/cli/tui/shell-line-cap.test.tsx - 1 issue (carried forward from previous review; re-verified on unchanged code)
  • patches/@silvia-odwyer%[email protected] - 0 issues (generated patch artifact, excluded from review scope)

Fix these issues in Kilo Cloud

Previous Review Summaries (3 snapshots, latest commit 0e97f4f)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 0e97f4f)

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/tui/test/cli/tui/shell-line-cap.test.tsx 173 activityExpanded: () => true contradicts test expectations of collapsed initial state
Files Reviewed (2 files)
  • packages/tui/test/cli/tui/shell-line-cap.test.tsx - 1 issue (carried forward from previous review; re-verified on unchanged code)
  • patches/@silvia-odwyer%[email protected] - 0 issues (generated patch artifact, excluded from review scope)

Fix these issues in Kilo Cloud

Previous review (commit 8fda31a)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/tui/test/cli/tui/shell-line-cap.test.tsx 173 activityExpanded: () => true contradicts test expectations of collapsed initial state
Files Reviewed (3 files)
  • packages/tui/test/cli/tui/activity-padding.test.tsx
  • packages/tui/test/cli/tui/layout-states.test.tsx
  • packages/tui/test/cli/tui/shell-line-cap.test.tsx - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit 3abe100)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/tui/src/routes/session/index.tsx
  • packages/tui/test/cli/tui/activity-group.test.tsx
  • patches/@silvia-odwyer%[email protected]

Reviewed by free · Input: 75K · Output: 5K · Cached: 249.9K

@github-actions

Copy link
Copy Markdown

Thanks for updating your PR! It now meets our contributing guidelines. 👍

activity: () => activity(),
activityAllExpanded: () => false,
activityExpanded: () => false,
activityExpanded: () => true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: activityExpanded: () => true contradicts test expectations of collapsed initial state

The tests in this file explicitly wait for "Click to expand" and click it:

await app.waitForFrame((frame: string) => frame.includes("Click to expand"))
await app.mockMouse.click(5, rowOf(await frameOf(app), "Click to expand"))

If activityExpanded: () => true, the activity block would start expanded, showing "Click to collapse" instead. The first waitForFrame would timeout waiting for "Click to expand" which would never appear.

Either the test expectations need updating (wait for "Click to collapse" first), or activityExpanded should remain false to match the test's assumed initial state.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The harness expands the outer shell activity block so its ToolPart row is visible. “Click to expand” is the nested shell-output panel disclosure, which remains collapsed initially; the activity header is “− Ran 1 command”. I made that distinction explicit in the fixture comment and wait predicate. Verified the focused shell-line-cap suite: 4/4 passed.

@mdev34-lab
mdev34-lab merged commit cb4ec05 into dev-vibecoded Dec 1, 2026
7 checks passed
@mdev34-lab
mdev34-lab deleted the arena/49dacd94-silvercode branch December 1, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant