Skip to content

fix(desktop): stop reads and edits vetoing tool-call grouping - #72308

Merged
OutThisLife merged 1 commit into
mainfrom
bb/tool-group-bounding
Jul 27, 2026
Merged

fix(desktop): stop reads and edits vetoing tool-call grouping#72308
OutThisLife merged 1 commit into
mainfrom
bb/tool-group-bounding

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Long runs of adjacent tool calls were supposed to collapse into the bounded .tool-group-scroll window, but in a real coding session they essentially never did.

shouldBoundToolGroup treated hasUnboundable as a run-level veto — a .some() over the whole range — so one exempt row anywhere disabled collapsing for every row in the run. The exempt set was clarify, image_generate, execute_code, read_file, plus every file-edit tool, which is most of what a coding session actually does. Replaying a real transcript: 84 consecutive tool calls, 30 veto-triggering, zero windows rendered.

The code-body entries turn out to be unnecessary. Everything ToolEntry renders carries data-tool-row, and the :has([data-tool-row][data-tool-open]) rule in styles.css already lifts the max-height and the mask. A diff row mounts open (defaultOpen = Boolean(inlineDiff)), so it frees the group the instant it appears; a collapsed row is a one-line status with no body in the DOM, so there is nothing to clip. The CSS path is also strictly better than the veto — collapsing the row drops the group back into a compact window, which the veto could never do.

This narrows the opt-out to the two components that bypass ToolEntry and therefore never emit data-tool-row: clarify and image_generate.

Verification

  • isUnboundableTool / shouldBoundToolGroup unit coverage updated to assert the new contract, including that reads and edits are now boundable.
  • Rendered a read_file row with a 200-line result inside a group: mounts collapsed, no <pre> in the DOM, contents absent — nothing to clip.
  • Rendered a patch row with an inline diff: mounts with data-tool-open, matching the CSS break-out selector immediately.
  • Replayed the real session transcript through the predicate: 30 veto-triggering rows before, 0 after.
  • vitest run src/components/assistant-ui/tool/ src/components/assistant-ui/thread/ — 127 passed.

A run of 3+ adjacent tool calls collapses into the `.tool-group-scroll`
window, but `shouldBoundToolGroup` took `hasUnboundable` as a run-level
veto: a single exempt row anywhere in the range disabled collapsing for
the entire run. The exempt set was clarify, image_generate, execute_code,
read_file and every file-edit tool — which is most of what a coding
session does, so in practice runs never collapsed. Replaying a real
session's transcript: 84 consecutive calls, 30 of them veto-triggering,
zero windows.

The code-body entries were never needed. Everything ToolEntry renders
carries `data-tool-row`, and the `:has([data-tool-row][data-tool-open])`
rule already lifts the cap and the mask. A diff row mounts open, so it
frees the group the moment it appears; a collapsed row is a one-line
status whose body is not in the DOM at all, so there is nothing to clip.
Collapsing the row drops the group back to a compact window, which the
JS veto could not do.

Narrow the opt-out to the two components that bypass ToolEntry and so
can never emit `data-tool-row`: clarify and image_generate.
@OutThisLife
OutThisLife enabled auto-merge July 26, 2026 23:52
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Jul 26, 2026
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 058aa34

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence is publishing...

@OutThisLife
OutThisLife merged commit 2b38d5a into main Jul 27, 2026
37 checks passed
@OutThisLife
OutThisLife deleted the bb/tool-group-bounding branch July 27, 2026 00:13
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…-bounding

fix(desktop): stop reads and edits vetoing tool-call grouping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants