Skip to content

fix(ui): batch completed read-only tools into ReadOnlyBatch, unify card body styles#4059

Merged
esengine merged 2 commits into
esengine:main-v2from
CVEngineer66:fix/transcript-clean-merge
Jun 12, 2026
Merged

fix(ui): batch completed read-only tools into ReadOnlyBatch, unify card body styles#4059
esengine merged 2 commits into
esengine:main-v2from
CVEngineer66:fix/transcript-clean-merge

Conversation

@CVEngineer66

Copy link
Copy Markdown
Contributor

Summary

Three related UI improvements to the transcript, focused on compact/minimal display modes in the desktop app.

Changes

1. ReadOnly batch for completed read-only tools

  • Compact/minimal modes: running read-only tools (read_file, grep, web_fetch, etc.) render individually so the user sees progress; completed ones fold into a "Read N files · Search N files" fold line (ReadOnlyBatch component)
  • Extracted to standalone ReadOnlyBatch.tsx to break circular dependencies
  • Same batching applied in TurnCollapse (folded steps), WarmTurnItems (expanded history), and final step rendering
  • Uses isReadOnlyTool(name) for tool identification to work around readOnly being false in session restore data

2. Sub-agent card nesting visuals

  • Added tool--subagent class: left border on tool__body for task/explore/research/review/run_skill cards with ⊞N count
  • tool__nested styling with recursive nesting border for deeper sub-agent levels
  • Removed dead .tool__summary CSS (outcome line + "⎿ " prefix)

3. Code copy button placement

  • Moved CopyButton inside <pre> element so it renders within the code block background, not outside it
  • Replaced Tooltip/portal (broken by <pre> overflow:auto) and native title (1s browser delay) with CSS max-width inline label

4. Cleanup

  • Unify reasoning__body, notice__body, warm-turn__body padding/font to match tool__body
  • Remove dead graphite theme overrides for body sections
  • Skip partial tool_dispatch events so tool name + args appear at once

Files changed

File Change
ReadOnlyBatch.tsx New — standalone batch fold component
ToolCard.tsx Subagent class + nested count
Transcript.tsx Read-only batching logic
CopyButton.tsx Inline label, removed Tooltip
HljsCode.tsx CopyButton inside
styles.css Unified body styles, subagent border, copy hover
locales/en.ts, zh.ts tool.otherReadCount i18n key
App.tsx Removed unused showLabel prop

Test status

  • go test ./... passes (one pre-existing failure TestSaveToScopesUserAndProjectFiles — permission issue on dev machine, unrelated to changes)
  • gofmt -l . clean
  • pnpm build succeeds

wufengfan added 2 commits June 11, 2026 23:31
…gent nesting

- ReadOnlyBatch: extract to standalone component, fix JS reference bug
  (items={[...roBatch]} instead of items={roBatch})
- Skip partial tool_dispatch events so tool name + args appear at once
- WarmTurnItems + TurnCollapse: use isReadOnlyTool(name) for read-only
  batching instead of it.readOnly boolean (which is false for history)
- Running tools render directly (not folded) in compact/minimal mode
- TurnCollapse body: group completed read-only tools into ReadOnlyBatch
- Add .tool--subagent border-left on body for task/explore/research cards
- Add ⊞N nested count indicator on sub-agent tool heads
- Remove dead .tool__summary CSS and related selectors
- Unify reasoning__body, notice__body, warm-turn__body padding/font
- Clean up .tool__nested styling with recursive nesting border
- Add isReadOnlyTool() for session restore (useController.ts)
- i18n: add tool.otherReadCount key
…th inline label

- Move CopyButton from CodeViewer wrapper into HljsCode's <pre> so it
  renders inside the code block's grey background, not outside it
- Remove Tooltip/portal (broken by <pre> overflow:auto) and native title
  (1s browser delay), replace with .copybtn__label-inline: zero-delay
  CSS hover that slides the Copy text inside the button via max-width
- Remove unused showLabel prop from CopyButton type
- Remove unused CopyButton import from CodeViewer.tsx
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 11, 2026

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks — extracting ReadOnlyBatch into its own file (breaking the circular dep) and the sub-agent nesting visuals (⊞N + tool--subagent) are a clean improvement, and the session-restore readOnly fix is the right call. CI is green across the board. Merging.

Follow-up on our side: consolidate the duplicated isReadOnlyTool list (it lives in both useController.ts and Transcript.tsx and mirrors the Go ReadOnly() classification, so it'll drift), and improve live-thinking + writer-output visibility in minimal mode.

@esengine esengine merged commit 8ec1130 into esengine:main-v2 Jun 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants