Repository navigation
fix(ui): Tool Search tool calls render as blank rows in chat - #163829
Conversation
With Tool Search enabled, the model invokes tools through the `tool_call`
dispatcher (`{ id, args }`). Its display spec has no detail keys, and the
collapsed row hides a label that equals the tool label, so these calls
rendered as an icon with no text and activity groups fell back to
"N other operations".
Add one presentation-only helper, unwrapToolCallForDisplay, that maps a
`tool_call` to the called tool (catalog ids `source:sourceName:toolName`
resolve to the tool name; plain names pass through). Shared tool display,
tool-call view classification, Control UI card rendering, transcript lines,
work summaries, and agent activity projection (live and history) use it.
Card extraction, toolCallIds, outcomes, and sidebar retrieval keep the raw
dispatcher identity.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 7:39 PM ET / 23:39 UTC (Revision 4). ClawSweeper reviewWhat this changesTool Search calls now show the called tool’s inputs and icon in Control UI chat and count toward the appropriate activity category. Merge readiness✅ Ready for maintainer review This PR remains useful on current main. The prior plugin compatibility finding is fixed, the visual proof demonstrates the intended improvement, and no remaining blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherTool Search wraps tool invocations before their calls and results reach chat. The display layer turns those records into readable tool rows and activity summaries while preserving execution identity for plugins and result retrieval. flowchart TD
A[Tool Search invocation] --> B[Raw call and result records]
B --> C[Presentation projection]
C --> D[Chat tool rows]
C --> E[Activity summaries]
B --> F[Plugin result rendering and retrieval]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +61, Tests +230, Docs +2. Total +293 across 17 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one shared presentation projection while preserving raw invocation records for execution, plugins, and result retrieval. Do we have a high-confidence way to reproduce the issue? Yes: current main formats the outer tool_call invocation, whose display specification has no detail keys, and hides the repeated label. The inspected before screenshot demonstrates the resulting blank rows; this reviewer did not execute a reproduction. Is this the best way to solve the issue? Yes: a shared presentation helper repairs the display consumers while retaining original invocation props at plugin and retrieval boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3059a884501a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
…cycle Importing the dispatcher name from tool-search-types pulled session types into the display leaf that agent activity projection imports, closing a Madge import cycle. Use the literal like tool-replay-safety and tool-mutation already do.
…acements Plugin tool-result surfaces receive toolName, input, and output as one invocation contract. Pass the original dispatcher card so a projected inner name and args are never paired with the dispatcher's wrapped output.
|
Merged via squash.
|
…w#163829) * fix(ui): show Tool Search tool_call rows as the called tool With Tool Search enabled, the model invokes tools through the `tool_call` dispatcher (`{ id, args }`). Its display spec has no detail keys, and the collapsed row hides a label that equals the tool label, so these calls rendered as an icon with no text and activity groups fell back to "N other operations". Add one presentation-only helper, unwrapToolCallForDisplay, that maps a `tool_call` to the called tool (catalog ids `source:sourceName:toolName` resolve to the tool name; plain names pass through). Shared tool display, tool-call view classification, Control UI card rendering, transcript lines, work summaries, and agent activity projection (live and history) use it. Card extraction, toolCallIds, outcomes, and sidebar retrieval keep the raw dispatcher identity. * fix(agents): keep tool_call display helper out of the session import cycle Importing the dispatcher name from tool-search-types pulled session types into the display leaf that agent activity projection imports, closing a Madge import cycle. Use the literal like tool-replay-safety and tool-mutation already do. * fix(ui): keep raw Tool Search invocations for tool-result plugin replacements Plugin tool-result surfaces receive toolName, input, and output as one invocation contract. Pass the original dispatcher card so a projected inner name and args are never paired with the dispatcher's wrapped output.
…ve chat
With Tool Search enabled, the model invokes tools through the `tool_call`
dispatcher (`{ id, args }`). #163829 taught the Control UI and shared TS
display to render these as the called tool; the native apps still showed
a bare "Tool Call" row with no detail.
Apply the same presentation-only unwrap at each native display owner:
- Swift: ToolDisplayRegistry.displayCall (OpenClawKit) maps tool_call to
the called tool (catalog ids openclaw|mcp|client:<source>:<tool> resolve
to the tool name; plain names pass through; inner args only when they are
an object). resolve() applies it, and the chat row uses it for title,
detail, icon, diff, and result formatting. macOS work-activity kind and
the iOS Live Activity tool name use the display name. The transcript cache
keeps only the dispatcher id (plus inner patch input) so cache-restored
rows still render the called tool.
- Android: unwrapToolCallForDisplay projects ChatToolActivity name, detail,
and arguments for history rows and live rows.
Execution identity stays raw: toolCallId, stored transcript names, pending
live call state, merge/presentation keys, outcomes, approvals, and result
extraction (browser tabs, web_search source previews). tool-display.json is
unchanged.
…res tool icons (#165095) * fix(apps): show Tool Search tool_call rows as the called tool in native chat With Tool Search enabled, the model invokes tools through the `tool_call` dispatcher (`{ id, args }`). #163829 taught the Control UI and shared TS display to render these as the called tool; the native apps still showed a bare "Tool Call" row with no detail. Apply the same presentation-only unwrap at each native display owner: - Swift: ToolDisplayRegistry.displayCall (OpenClawKit) maps tool_call to the called tool (catalog ids openclaw|mcp|client:<source>:<tool> resolve to the tool name; plain names pass through; inner args only when they are an object). resolve() applies it, and the chat row uses it for title, detail, icon, diff, and result formatting. macOS work-activity kind and the iOS Live Activity tool name use the display name. The transcript cache keeps only the dispatcher id (plus inner patch input) so cache-restored rows still render the called tool. - Android: unwrapToolCallForDisplay projects ChatToolActivity name, detail, and arguments for history rows and live rows. Execution identity stays raw: toolCallId, stored transcript names, pending live call state, merge/presentation keys, outcomes, approvals, and result extraction (browser tabs, web_search source previews). tool-display.json is unchanged. * refactor(tools): replace tool emoji with shared semantic icons Graphical clients had already moved from tool emoji to icons, but the emoji stayed the source of truth: the Control UI picked its SVG by mapping each tool's emoji through a hand-written table (about 45 of 71 tools fell through to the puzzle), Swift guessed SF Symbols from name substrings, and Android showed a generic list glyph for most tools. Text surfaces still prefixed emoji. The shared tool display config now owns tool iconography: every tool and the fallback carry an `icon`, a semantic name from the Control UI icon set, and `emoji` is gone. tool-display.json is regenerated from the config. - Web reads `icon` directly; the emoji-to-icon and name-override tables are deleted (five foreign alias names translate to canonical tools). Row-kind icons and plugin activity icons keep their precedence. 45 tools that showed a puzzle now get real icons; existing visuals are unchanged. - Swift (OpenClawKit/ChatUI) decodes `icon` and maps it through one SF Symbol table with the web row-kind precedence, replacing the substring heuristic. Android reads the bundled asset once and maps it through one Material table. Each platform has a test asserting every config icon has a glyph. - Text surfaces drop the pictograph: channel progress drafts (Telegram, Slack, Discord, Matrix, Feishu, ...), ACP summaries, tool-meta aggregates, and the TUI now read like `Exec: pnpm test`. The plugin SDK ChannelProgressDraftLine.icon field is unchanged; core no longer sets it, so plain renderers use their existing bullet. - Status reactions are emoji by nature and keep their exact per-tool reaction emoji through a reaction-owned table, no longer coupled to tool display. Docs updated for the plain progress rows and semantic icons. * test(channels): align gateway progress assertions with plain tool labels * test(discord): align consolidated progress expectations Preserve the plain tool labels when main consolidates progress cases into the final-draft suite. * fix(ui): narrow shared tool icon names with a type guard
…res tool icons (openclaw#165095) * fix(apps): show Tool Search tool_call rows as the called tool in native chat With Tool Search enabled, the model invokes tools through the `tool_call` dispatcher (`{ id, args }`). openclaw#163829 taught the Control UI and shared TS display to render these as the called tool; the native apps still showed a bare "Tool Call" row with no detail. Apply the same presentation-only unwrap at each native display owner: - Swift: ToolDisplayRegistry.displayCall (OpenClawKit) maps tool_call to the called tool (catalog ids openclaw|mcp|client:<source>:<tool> resolve to the tool name; plain names pass through; inner args only when they are an object). resolve() applies it, and the chat row uses it for title, detail, icon, diff, and result formatting. macOS work-activity kind and the iOS Live Activity tool name use the display name. The transcript cache keeps only the dispatcher id (plus inner patch input) so cache-restored rows still render the called tool. - Android: unwrapToolCallForDisplay projects ChatToolActivity name, detail, and arguments for history rows and live rows. Execution identity stays raw: toolCallId, stored transcript names, pending live call state, merge/presentation keys, outcomes, approvals, and result extraction (browser tabs, web_search source previews). tool-display.json is unchanged. * refactor(tools): replace tool emoji with shared semantic icons Graphical clients had already moved from tool emoji to icons, but the emoji stayed the source of truth: the Control UI picked its SVG by mapping each tool's emoji through a hand-written table (about 45 of 71 tools fell through to the puzzle), Swift guessed SF Symbols from name substrings, and Android showed a generic list glyph for most tools. Text surfaces still prefixed emoji. The shared tool display config now owns tool iconography: every tool and the fallback carry an `icon`, a semantic name from the Control UI icon set, and `emoji` is gone. tool-display.json is regenerated from the config. - Web reads `icon` directly; the emoji-to-icon and name-override tables are deleted (five foreign alias names translate to canonical tools). Row-kind icons and plugin activity icons keep their precedence. 45 tools that showed a puzzle now get real icons; existing visuals are unchanged. - Swift (OpenClawKit/ChatUI) decodes `icon` and maps it through one SF Symbol table with the web row-kind precedence, replacing the substring heuristic. Android reads the bundled asset once and maps it through one Material table. Each platform has a test asserting every config icon has a glyph. - Text surfaces drop the pictograph: channel progress drafts (Telegram, Slack, Discord, Matrix, Feishu, ...), ACP summaries, tool-meta aggregates, and the TUI now read like `Exec: pnpm test`. The plugin SDK ChannelProgressDraftLine.icon field is unchanged; core no longer sets it, so plain renderers use their existing bullet. - Status reactions are emoji by nature and keep their exact per-tool reaction emoji through a reaction-owned table, no longer coupled to tool display. Docs updated for the plain progress rows and semantic icons. * test(channels): align gateway progress assertions with plain tool labels * test(discord): align consolidated progress expectations Preserve the plain tool labels when main consolidates progress cases into the final-draft suite. * fix(ui): narrow shared tool icon names with a type guard
What Problem This Solves
Fixes: chat tool rows render as a bare icon with no text when the agent calls tools through Tool Search, and the activity group falls back to "N other operations".
User Impact
User impact: Tool Search calls now read like direct calls in the Control UI chat — a web search shows its query, a read shows the file, and the activity summary counts reads/searches — with skipped/failed/completed outcomes unchanged.
Why This Change Was Made
With Tool Search enabled, the model invokes tools through the
tool_calldispatcher with{ id, args }. That dispatcher has no display detail keys, and the collapsed row hides a label that just repeats the tool name, so nothing was left to show. A single presentation-only helper now maps atool_callto the tool it calls (catalog idssource:sourceName:toolNameresolve to the tool name; plain names pass through). Shared tool display, call-view classification, Control UI card rendering, transcript lines, work summaries, and agent activity projection (live and history) use it. Execution identity is untouched: card extraction, toolCallIds, outcome pairing, persisted transcripts, sidebar retrieval, and plugin tool-result replacements (which get toolName/input/output as one contract) keep the raw dispatcher call. The helper keeps a localtool_callliteral, liketool-replay-safety.ts, so the display leaf does not import Tool Search session types (Madge cycle).Native app tool rows (OpenClawKit) still use the dispatcher name; that is a separate follow-up.
Evidence
Synthetic mock-Gateway fixture (Control UI e2e harness, dark theme, 1200×850): one
tool_callwrappingweb_search(completed) and one wrappingread(skipped by steering).Before — blank rows and "2 other operations":
After — "1 read · 1 search · 1 skipped", the search query and file name visible, the skip still marked Skipped:
Focused tests (
pnpm test <file> --maxWorkers=1, local):src/agents/tool-display-call.test.tssrc/agents/tool-display.test.tssrc/infra/agent-activity-events.test.tsui/src/lib/chat/tool-display.node.test.tsui/src/lib/chat/tool-call-view.test.tsui/src/pages/chat/components/chat-tool-cards.test.tsThe new chat-tool-cards regression fails on the base commit (both query assertions), the historical-activity regression fails without the history fix, and the plugin-replacement regression fails when tool-result surfaces receive the projected card.
pnpm check:import-cyclesandpnpm check:madge-import-cyclesreport 0 cycles. Core and UI typechecks, scoped lint/format, andgit diff --checkpass. Codex autoreview at P2 threshold is scoped-clean on every commit (a P2 about historical metadata pairing and ClawSweeper's P1 about plugin replacement props were fixed and covered).