Skip to content

fix(ui): keep tool-only turn details visible - #106791

Merged
steipete merged 4 commits into
mainfrom
codex/tool-only-tool-details
Jul 13, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/tool-only-tool-details

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users completing a tool-only turn in Control UI would see only a generic Worked for rollup when no assistant text followed. The tool call was the turn's only useful result, but it was hidden by default; compact generic rows also gave little clue what message, prompt, task, or query the tool handled.

Why This Change Was Made

Reply-less completed turns now keep their tool rows visible, while turns that end with assistant text retain the existing work rollup. Generic compact tool rows use a redacted, bounded first meaningful line from common intent arguments; expanding the row still reveals the full tool details.

User Impact

Tool-only outcomes remain immediately visible. A message call now reads like Message Hello Molty, first claw-to-claw hello. instead of disappearing behind Worked for 3s, and the same one-line context works for prompt-, task-, query-, text-, and description-style tools.

Evidence

  • Regression proof before the fix: the focused suite failed 3 assertions covering reply-less completed/failed turns and the compact message preview.
  • Testbox tbx_01kxejcag2qpcw3r5nq7ybbr2a: corepack pnpm tsgo:ui passed.
  • Testbox tbx_01kxejcag2qpcw3r5nq7ybbr2a: focused chat/tool-card suite passed 134/134 tests.
  • Testbox tbx_01kxejcag2qpcw3r5nq7ybbr2a: real Chromium tool-turn suite passed 4/4 scenarios, including collapsed one-line preview and expanded full arguments.
  • corepack pnpm check:changed: conflict markers, TypeScript LOC ratchet, changelog attribution, export guards, duplicate coverage, dependency pins, formatting, package patches, and temp-report gates passed. The subsequent core-test typecheck is currently blocked on latest main by two pre-existing status fixture errors in src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts; this branch does not change that file.
  • Source-blind behavior validation: pass 5, fail 0, blocked 0.

AI-assisted: Codex.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f23ddd0b08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CHANGELOG.md Resolved
@steipete
steipete force-pushed the codex/tool-only-tool-details branch from 9b1be72 to abdee5c Compare July 13, 2026 21:00
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 13, 2026, 5:21 PM ET / 21:21 UTC.

Summary
The PR keeps completed tool-only Control UI turns expanded and adds a redacted, bounded first-line argument preview to compact generic tool rows.

PR surface: Source +21, Tests +97. Total +118 across 6 files.

Reproducibility: yes. The pre-fix focused assertions reproduced completed and failed reply-less turns collapsing incorrectly, and the real Chromium scenarios exercise the same visible Control UI path after the fix.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] Several exact-head CI jobs remain in progress after the latest force-push; merge readiness still depends on the required checks completing successfully.

Maintainer options:

  1. Decide the mitigation before merge
    Land the owner-boundary fix after exact-head checks pass: keep reply-less tool turns visible at the turn-collapse layer and derive compact context through the existing redaction and truncation utilities.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair is needed; a maintainer should review the protected PR and wait for required exact-head checks to finish.

Security
Cleared: The patch adds no dependencies or execution paths and sanitizes newly surfaced compact payload text through the existing browser redactor before rendering.

Review details

Best possible solution:

Land the owner-boundary fix after exact-head checks pass: keep reply-less tool turns visible at the turn-collapse layer and derive compact context through the existing redaction and truncation utilities.

Do we have a high-confidence way to reproduce the issue?

Yes. The pre-fix focused assertions reproduced completed and failed reply-less turns collapsing incorrectly, and the real Chromium scenarios exercise the same visible Control UI path after the fix.

Is this the best way to solve the issue?

Yes. The turn-collapse decision is corrected where the unwanted rollup is created, while preview text reuses existing redaction and truncation utilities; changing Gateway transcripts or globally disabling work rollups would be broader and less maintainable.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e2d605537142.

Label changes

Label justifications:

  • P2: This fixes a limited-blast-radius Control UI regression that hides useful tool-only results but does not block the core runtime or lose messages.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR supplies after-fix real Chromium coverage for tool-only visibility, collapsed one-line previews, and expanded arguments, backed by a successful exact-head proof check.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies after-fix real Chromium coverage for tool-only visibility, collapsed one-line previews, and expanded arguments, backed by a successful exact-head proof check.
Evidence reviewed

PR surface:

Source +21, Tests +97. Total +118 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 45 24 +21
Tests 3 105 8 +97
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 150 32 +118

What I checked:

  • Turn-collapse fix: When a completed turn has no final assistant reply, the branch now preserves its tool groups instead of replacing the only useful result with a generic work-duration rollup. (ui/src/pages/chat/chat-thread.ts:1847, 7b0fd513eab5)
  • Safe compact preview: The preview helper selects the first meaningful line from common intent arguments, applies the existing browser payload redactor, and passes the result through the existing bounded UTF-16-safe preview formatter. (ui/src/lib/chat/tool-cards.ts:262, 7b0fd513eab5)
  • Rendering integration: Generic tool rows prefer the sanitized argument preview without changing expanded full-detail rendering, while failed rows retain their existing failure-oriented summary behavior. (ui/src/pages/chat/components/chat-tool-cards.ts:476, 7b0fd513eab5)
  • Regression coverage: Focused unit coverage checks completed and failed reply-less turns, common preview keys, multiline selection, redaction, and bounded display; the browser suite covers the collapsed preview and expanded arguments. (ui/src/pages/chat/components/chat-tool-cards.test.ts:489, 7b0fd513eab5)
  • Real behavior proof: The PR reports Testbox tbx_01kxejcag2qpcw3r5nq7ybbr2a passing 134 focused tests and four real Chromium scenarios, and the exact-head Real behavior proof check completed successfully. (ui/src/e2e/chat-tool-turn-outcome.e2e.test.ts:188, 7b0fd513eab5)
  • Re-review continuity: The previous review found no functional blockers. The sole inline finding requested removal of a release-owned CHANGELOG entry; the current file list no longer includes CHANGELOG.md, and the final commit records that cleanup. (7b0fd513eab5)

Likely related people:

  • BunsDev: Recent shipped Control UI work credited this contributor for collapsed tool-row readability and preserving expanded raw tool details, directly adjacent to this rendering behavior. (role: adjacent feature owner; confidence: medium; files: ui/src/lib/chat/tool-cards.ts, ui/src/pages/chat/components/chat-tool-cards.ts)
  • jason-allen-oneal: Recent merged WebChat work addressed message-tool source-reply presentation and duplicate visible output, making this contributor relevant to message-tool rendering semantics. (role: adjacent behavior contributor; confidence: medium; files: ui/src/pages/chat/chat-thread.ts, ui/src/pages/chat/components/chat-tool-cards.ts)
  • vincentkoc: Recent release history shows repeated work across Control UI chat and navigation surfaces, making this a useful secondary routing candidate for UI behavior review. (role: recent Control UI contributor; confidence: low; files: ui/src/pages/chat/chat-thread.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-13T21:11:26.086Z sha abdee5c6a1526e5679011969016d1408c2a8e428 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/tool-only-tool-details branch from abdee5c to 7b0fd51 Compare July 13, 2026 21:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b0fd513ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1852 to 1854
if (finalReplyIndex === -1) {
result.push(...turn);
continue;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Don’t return hidden tool-only turns as empty groups

When tool calls are hidden (showToolCalls=false) and a completed turn has only an assistant tool-call message plus its tool result, buildChatItems drops the toolResult but leaves the assistant tool-call group (ui/src/pages/chat/chat-thread.ts:1347), and renderGroupedMessage later suppresses tool cards and returns nothing (ui/src/pages/chat/components/chat-message.ts:2138). This new reply-less branch returns that group unchanged instead of the previous rollup, so renderMessageGroup still emits the assistant wrapper/footer with no bubble content, leaving a blank assistant row after tool-only turns; please keep/filter these groups for hidden-tool mode rather than exposing them unchanged.

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 7b0fd513eab58f386e027eb8cfbff4d4d6a51093:

  • corepack pnpm tsgo:ui — passed on Testbox tbx_01kxejcag2qpcw3r5nq7ybbr2a.
  • corepack pnpm test ui/src/pages/chat/chat-thread.test.ts ui/src/pages/chat/components/chat-tool-cards.test.ts — 134/134 passed on the same Testbox.
  • OPENCLAW_CONTROL_UI_E2E_ARTIFACT_DIR=.artifacts/control-ui-e2e/tool-only-turn-land corepack pnpm test ui/src/e2e/chat-tool-turn-outcome.e2e.test.ts — 4/4 passed in real Chromium, including compact Message preview, no reply-less work rollup, and full argument disclosure.
  • Source-blind behavior validation — 5 passed, 0 failed, 0 blocked.
  • Hosted CI — run 29285716662, attempt 2 passed on the exact PR head after rerunning one unrelated flaky agents-core shard.

Known proof gaps: none for the touched Control UI behavior.

@steipete
steipete merged commit 908230a into main Jul 13, 2026
134 of 135 checks passed
@steipete
steipete deleted the codex/tool-only-tool-details branch July 13, 2026 21:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
* fix(ui): keep tool-only turn details visible

* refactor(ui): keep tool card component size neutral

* style(ui): format tool turn e2e test

* chore: leave release notes to release automation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant