Skip to content

improve: native tool rows show Tool Search calls and every client shares tool icons - #165095

Merged
steipete merged 5 commits into
mainfrom
steipete/kind-bhaskara-b90d02
Oct 4, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/kind-bhaskara-b90d02

Conversation

@steipete

@steipete steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: native chat (iOS, macOS, Android) shows Tool Search calls as a bare "Tool Call" row, and tool rows look different on every client because each picks icons its own way while channels still prefix tool emoji.

User Impact

User impact: with Tool Search on, native tool rows now name the called tool and its detail ("Web Search · OpenClaw release notes"), matching the Control UI since #163829. Web, iOS/macOS, and Android show the same icon for the same tool, and about 45 tools that showed a generic puzzle on the web now get real icons (message → mail, cron → calendar clock, images → image, spawn → bot, …).

Visible text change: channel progress lines (Telegram, Slack, Discord, Matrix, Feishu, …), ACP tool summaries, and the TUI drop the leading emoji: 🛠️ Exec: pnpm test becomes Exec: pnpm test. Status reactions are unchanged and keep their per-tool reaction emoji. The plugin SDK ChannelProgressDraftLine.icon field is unchanged; core simply no longer fills it, so plugins that set their own icon still render it.

Why This Change Was Made

  • Tool Search on native. The same presentation-only unwrap as unwrapToolCallForDisplay now runs at each native display owner: ToolDisplayRegistry.displayCall in OpenClawKit (used for the row title, detail, icon, diff, result formatting, macOS work-activity kind, and the iOS Live Activity name) and the Android ChatToolActivity projection (history and live rows). Execution identity stays raw: toolCallId, stored names, pending live calls, merge keys, outcomes, approvals, browser-tab and web_search source extraction. The Swift transcript cache keeps only the dispatcher id (plus inner patch input) so cache-restored rows still render the called tool.
  • One icon owner. src/agents/tool-display-config.ts now gives every tool a semantic icon (a Control UI icon name) and drops emoji; tool-display.json is regenerated. The web reads it directly (the emoji→icon and name-override tables are gone), Swift and Android each map it through one glyph table with the web's row-kind precedence, and each platform has a test that fails if a config icon has no glyph. This is a static bundled resource; there is no Gateway protocol change.
  • Reactions decoupled. Status reactions are emoji by nature, so their exact per-tool emoji moved to a reaction-owned table instead of reading tool display.

Evidence

Tool Search rows (synthetic transcript: tool_call → web_search, tool_call → mcp:github:search_issues, and a tool_call without an id, which correctly stays "Tool Call"):

Before After
iOS toolcall ios before toolcall ios after
Android toolcall android before toolcall android after

Shared icons (synthetic transcript with exec, read, edit, web_search, web_fetch, message, cron, memory_search, image_generate, sessions_spawn, browser, and an unknown MCP tool):

Before After
Web (Control UI mock) icons web before icons web after
iPad icons ipad before icons ipad after
Android icons android before icons android after

Rebased onto main at 7ecc80a457366091dd61448bcc319cf1a82a5da9 (721 commits beyond the original base). The Swift cache resolution preserves main's copy-and-strip shaping and applies the dispatcher argument projection at that existing owner. Feishu retains main's consolidated test cases with the plain Web Search expectation. Two additional isolated-Gateway E2E expectations were migrated to the plain tool text. No new tool registrations or stale display-emoji consumers remained.

All requested checks passed on the rebased source plus the two-line follow-up: 252 Vitest tests across 10 files, 96 selected Swift tests, and 62 Android tests. No pre-existing code/test failures were observed. No new test cases were added in the follow-up.

Rebased validation and measured wall times
Check Result Wall time
pnpm install --frozen-lockfile Pass 12.80 s
pnpm tool-display:check Pass 0.82 s
pnpm tsgo:core Pass 66.73 s
pnpm tsgo:extensions Pass 113.39 s
pnpm tsgo:extensions:test Pass 70.45 s
pnpm tsgo:ui Pass 44.10 s
pnpm tsgo:test:ui Pass 2134.69 s
pnpm tsgo:test:src Pass 746.83 s
pnpm test src/agents/tool-display.test.ts --maxWorkers=1 Pass 14.78 s
pnpm test src/auto-reply/tool-meta.test.ts --maxWorkers=1 Pass 5.53 s
pnpm test src/channels/streaming.test.ts --maxWorkers=1 Pass 15.33 s
pnpm test src/channels/progress-draft-lines.test.ts --maxWorkers=1 Pass 3.61 s
pnpm test src/channels/status-reactions.test.ts --maxWorkers=1 Pass 4.53 s
pnpm test src/auto-reply/reply/acp-projector.test.ts --maxWorkers=1 Pass 67.23 s
pnpm test extensions/feishu/src/reply-dispatcher.test.ts --maxWorkers=1 Pass 68.13 s
pnpm test ui/src/lib/chat/tool-display-icon.node.test.ts --maxWorkers=1 Pass 4.43 s
pnpm test ui/src/lib/chat/tool-display.node.test.ts --maxWorkers=1 Pass 6.53 s
pnpm test test/e2e/qa-lab/runtime/channel-progress-presentation.e2e.test.ts --maxWorkers=1 Pass 3323.14 s
Swift: ToolDisplayRegistryTests, ChatToolIconTests, ChatTranscriptCacheStoreTests Pass 114.12 s
Android: ToolActivityIconsTest, ToolActivityPresentationTest, ChatMessageContentParsingTest, ChatUnifiedToolActivityTest Pass 102.72 s
pnpm native:i18n:verify Pass 10.57 s
pnpm exec oxfmt --check test/e2e/qa-lab/runtime/channel-progress-presentation.e2e.test.ts Pass 0.73 s
git diff --check Pass 0.41 s
git diff --check 7ecc80a457366091dd61448bcc319cf1a82a5da9 HEAD Pass 0.66 s

Times include wrapper preparation and contention on this loaded host. The extra isolated-Gateway E2E command includes 30m 39s for the full private-QA build and 17m 47s in Vitest. UI test typechecking waited behind that build; its individual shards took 32–48 seconds. CI seconds are pending because this publication phase stops after run attachment.

Swift used Node's executable directory on PATH. Android used ANDROID_HOME=/opt/homebrew/share/android-commandlinetools and --max-workers=1.

Independent full-candidate Codex autoreview completed at P1. Its sole finding claimed a nullable Kotlin access would not compile; rejected because the exact-source Android run freshly executed compilePlayDebugKotlin and passed all 62 targeted tests. No accepted/actionable findings remain. Earlier reviewer startup/authentication failures produced no verdict and are not counted as clean reviews.

The screenshots above are the inspected synthetic captures from before the rebase. Existing pre-rebase proof also included 42 focused Vitest files / 1,252 tests, iOS simulator and macOS builds, Android ktlint, and independent review of both original commits.

No live Telegram/Slack account was used; progress text is covered at formatter/channel boundaries and the isolated-Gateway test uses mock channel transports. Plugin-provided tool icons remain web-only, and web_search source cards for a Tool Search-dispatched search still key on the raw name (result extraction intentionally stays raw); both are follow-ups. CI timing will be available from the attached head run; this phase stops once CI is attached, before completion or merge.

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: slack Channel integration: slack channel: telegram Channel integration: telegram app: android App: android app: macos App: macos app: web-ui App: web-ui agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: qa-lab extensions: codex extensions: clickclack size: XL labels Oct 4, 2026
@steipete
steipete marked this pull request as ready for review October 4, 2026 20:34
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 4, 2026, 6:06 PM ET / 22:06 UTC (Revision 3).

ClawSweeper review

What this changes

The branch names Tool Search calls in native chat, shares semantic tool icons across graphical clients, and removes emoji prefixes from text progress summaries.

Merge readiness

✅ Ready for maintainer review

The PR remains useful: current main still lacks the native Tool Search presentation fix. No blocking introduced defect was found, and the repository admin explicitly accepted boundary validation instead of the previously requested live Telegram run.

Priority: P2
Reviewed head: 4d193093f0aa77e2d6aff81b414a84987148686b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, coherent presentation repair with inspected native proof, focused compatibility coverage, and no blocking findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected iOS and Android renderer captures demonstrate named dispatcher rows, inner details, and the missing-ID fallback. Channel text has supplemental formatter, HTTP-payload, and isolated-Gateway coverage; the repository admin explicitly accepted the absence of a live Telegram run. Existing cache compatibility is source-verified through the unchanged optional decoder and preserved fallback.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected iOS and Android renderer captures demonstrate named dispatcher rows, inner details, and the missing-ID fallback. Channel text has supplemental formatter, HTTP-payload, and isolated-Gateway coverage; the repository admin explicitly accepted the absence of a live Telegram run. Existing cache compatibility is source-verified through the unchanged optional decoder and preserved fallback.
Evidence reviewed 10 items Pinned introduced changes: Reviewed the merge-base-to-head changes rather than endpoint drift. The stale test merge was not used to infer removal of current-main behavior.
Still necessary on main: Current main's Swift display registry resolves the raw name directly and has no dispatcher projection; the web icon resolver still derives icons from emoji.
Release check: The v2026.9.8 Swift source also lacks displayCall and resolves the raw name. The native fix is not already supplied by the latest release.
Findings None None.
Security None None.

How this fits together

Tool presentation turns live activity and transcript records into chat rows and channel progress text. It displays the called tool while preserving the raw identity used for execution and result pairing.

flowchart TD
 A[Live calls and transcript records] --> B[Called-tool presentation]
 B --> D[Graphical chat rows]
 C[Shared semantic icons] --> D
 B --> E[Plain tool summaries]
 E --> F[Channels and terminal UI]
 A --> G[Reaction emoji table]
 G --> H[Status reactions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +53, Tests +227, Docs +10, Other +405. Total +695 across 76 files.

View PR surface stats
Area Files Added Removed Net
Source 14 216 163 +53
Tests 39 403 176 +227
Docs 5 22 12 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 18 540 135 +405
Total 76 1181 486 +695

Review metrics

Metric Value Why it matters
Production and test growth production net +304 lines; tests and test support net +381 lines Production growth is explained by native dispatcher adapters and glyph tables; documentation and generated resources are excluded.

Technical review

Best possible solution:

Use shared semantic metadata at each platform's presentation owner while preserving execution identities, optional plugin icons, and existing cache readability.

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

Yes, from source: current main passes the raw tool_call name into native display resolution, explaining the generic rows shown in the supplied before captures. No current-main runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes. Extending the existing native presentation owners follows the merged web approach, and centralized semantic metadata replaces competing icon-selection tables without changing tool execution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 55a664a40278.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: The SDK-exported formatter intentionally changes visible output to omit emoji; that presentation tradeoff is documented and covered by the admin's current landing decision.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected iOS and Android renderer captures demonstrate named dispatcher rows, inner details, and the missing-ID fallback. Channel text has supplemental formatter, HTTP-payload, and isolated-Gateway coverage; the repository admin explicitly accepted the absence of a live Telegram run. Existing cache compatibility is source-verified through the unchanged optional decoder and preserved fallback.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected iOS and Android renderer captures demonstrate named dispatcher rows, inner details, and the missing-ID fallback. Channel text has supplemental formatter, HTTP-payload, and isolated-Gateway coverage; the repository admin explicitly accepted the absence of a live Telegram run. Existing cache compatibility is source-verified through the unchanged optional decoder and preserved fallback.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This repairs native tool-row presentation and improves cross-client consistency without an urgent execution or delivery regression.
  • merge-risk: 🚨 compatibility: The SDK-exported formatter intentionally changes visible output to omit emoji; that presentation tradeoff is documented and covered by the admin's current landing decision.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected iOS and Android renderer captures demonstrate named dispatcher rows, inner details, and the missing-ID fallback. Channel text has supplemental formatter, HTTP-payload, and isolated-Gateway coverage; the repository admin explicitly accepted the absence of a live Telegram run. Existing cache compatibility is source-verified through the unchanged optional decoder and preserved fallback.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected iOS and Android renderer captures demonstrate named dispatcher rows, inner details, and the missing-ID fallback. Channel text has supplemental formatter, HTTP-payload, and isolated-Gateway coverage; the repository admin explicitly accepted the absence of a live Telegram run. Existing cache compatibility is source-verified through the unchanged optional decoder and preserved fallback.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected iOS and Android renderer captures demonstrate named dispatcher rows, inner details, and the missing-ID fallback. Channel text has supplemental formatter, HTTP-payload, and isolated-Gateway coverage; the repository admin explicitly accepted the absence of a live Telegram run. Existing cache compatibility is source-verified through the unchanged optional decoder and preserved fallback.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Plain tool-progress labels are Telegram-visible, although the admin explicitly accepted landing this scope without Test Server proof.

Evidence

What I checked:

  • Pinned introduced changes: Reviewed the merge-base-to-head changes rather than endpoint drift. The stale test merge was not used to infer removal of current-main behavior. (4d193093f0aa)
  • Still necessary on main: Current main's Swift display registry resolves the raw name directly and has no dispatcher projection; the web icon resolver still derives icons from emoji. (apps/shared/OpenClawKit/Sources/OpenClawKit/ToolDisplay.swift:42, 55a664a40278)
  • Release check: The v2026.9.8 Swift source also lacks displayCall and resolves the raw name. The native fix is not already supplied by the latest release. (apps/shared/OpenClawKit/Sources/OpenClawKit/ToolDisplay.swift, fc23bc864e45)
  • Inspected native screenshots: Inspected prepared images 1–4: iOS and Android change valid dispatcher rows from Tool Call to Web Search and Search Issues with details, while the missing-ID row remains Tool Call. These are synthetic-transcript renderer captures from before the rebase, not live-channel evidence. Additional shared-icon attachments were absent from the prepared manifest, and browser fetches returned Cache miss; those images were not independently inspected.
  • Accepted Telegram proof disposition: improve: native tool rows show Tool Search calls and every client shares tool icons #165095 (comment) explicitly accepts landing this text-only change without a live Test Server run, citing formatter, channel, Telegram HTTP, and isolated-Gateway coverage. GitHub independently reports steipete's repository permission as admin. This resolves the prior review's sole rank-up request for the current presentation-only scope. (4d193093f0aa)
  • Existing-cache compatibility: The cache retains dispatcher metadata inside the existing optional arguments field. The unchanged decoder uses decodeIfPresent, and displayCall preserves calls without an ID, so older cached rows remain readable without migration. Existing direct-patch shaping is retained; focused new assertions verify dispatcher IDs, bounded inner patch input, and discarded ordinary arguments. (apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatModels.swift:298, 4d193093f0aa)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-04T20:40:23.108Z sha e8adbc508157416710f9bc319a4d4c5f098a6ef3 :: needs changes before merge. :: none
  • reviewed 2026-10-04T21:19:59.970Z sha 0d109db :: needs changes before merge. :: none

…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.
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.
Preserve the plain tool labels when main consolidates progress cases into the final-draft suite.
@steipete
steipete force-pushed the steipete/kind-bhaskara-b90d02 branch from e8adbc5 to 0d109db Compare October 4, 2026 21:11
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer decision on the Telegram Test Server item: landing without a live Test Server run.

The Telegram-visible change is text only. Core no longer fills the progress line icon, so tool rows read like "Exec: pnpm test" instead of carrying the old tool emoji prefix. That output is proven at the boundaries that produce it:

  • formatter level: tool-meta and tool-display tests
  • channel level: streaming and progress-draft-lines tests
  • Telegram plugin level: the Telegram HTTP preview and progress-command-detail suites plus draft-stream, all exercising the real Telegram send/edit payloads against a mocked Bot API
  • end to end: the isolated-Gateway channel-progress presentation e2e

All of these pass on this branch. The live userbot run was attempted on this host but stopped before leasing a credential: the Convex QA broker credentials were not available here. A live Test Server pass stays a follow-up rather than a merge gate for this presentation-only change.

The latest head 4d19309 only adds a type guard in the web icon resolver, fixing the assertion-safety ratchet.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 4, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 4, 2026
@steipete
steipete enabled auto-merge (squash) October 4, 2026 22:16
@steipete
steipete merged commit 42ebb9d into main Oct 4, 2026
152 checks passed
@steipete
steipete deleted the steipete/kind-bhaskara-b90d02 branch October 4, 2026 22:23
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

MarMarLabs added a commit to MarMarLabs/openclaw that referenced this pull request Oct 5, 2026
17 upstream commits. Upstream's new X mentions channel (openclaw#165138) adds 60
channel and 21 plugin config entries. openclaw#165095 drops the search emoji from
a tool label in two Feishu tests, reply-dispatcher.test.ts and
streaming-card.test.ts. Both merged cleanly, and this branch has no other
copy of those lines.

Three generated files conflicted, docs/.generated/config-baseline.counts.json,
config-baseline.sha256 and src/config/bundled-channel-config-metadata.generated.ts.
All three were regenerated from this merge rather than hand-merged.
build:docker ran in a separate detached checkout of this commit. Counts are
core 2502, channel 3848 and plugin 4490, which is upstream's counts plus
this branch's two channel entries. The core and plugin hashes match
upstream/main and the channel hash is new, as predicted. The three
generated-file checks pass there.

Feishu: 102 files and 1521 tests in the extension project, 17 files and 241
tests in the database-workers project, all passing. The forwarder test and
the routing guards pass, 503 tests. tsgo:core, tsgo:extensions,
tsgo:extensions:test, tsgo:test:root, the line-cap, max-lines,
assertion-safety, database-worker, test-timeout-race and test-mock-exports
ratchets against upstream/main, oxlint and oxfmt on the 43 changed code
files all pass.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
…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
obviyus added a commit to keshavbotagent/openclaw that referenced this pull request Oct 9, 2026
Core owns one text-glyph table keyed by the semantic tool icon from
openclaw#165095 and fills ChannelProgressDraftLine.icon where draft lines are
built, only for channels that pass toolIcons to the progress compositor.
Telegram opts in; Slack and other channels keep plain rows. Replaces the
Telegram-local status-reaction table lookup.
obviyus pushed a commit that referenced this pull request Oct 9, 2026
…ows (#167392)

## What Problem This Solves

Fixes: Telegram progress drafts lost the leading per-tool emoji on tool-log rows (`🛠️ Exec`, `📖 Read`) after #165095 moved tool display metadata to semantic icons.

## User Impact

User impact: Telegram tool-log rows show a per-tool glyph again, in standard and rich-message previews. Slack and every other channel keep plain rows, and graphical clients are unchanged. No config changes.

## Why This Change Was Made

#165095 (42ebb9d) replaced each tool's `emoji` with one semantic `icon` and moved status-reaction emoji to a reaction-only table. As a side effect, core stopped setting `ChannelProgressDraftLine.icon`, so Telegram's renderer no longer had a glyph to show. Removing the glyph was not the goal of #165095.

Core now owns the text presentation of those icons, following the native-client pattern from #165095:

- **One table.** `src/channels/progress-tool-glyphs.ts` maps each semantic tool icon to a text emoji. A coverage test fails if a configured icon has no glyph, like the Swift and Android tables.
- **One producer.** `buildNamedProgressLine`, where draft lines are built, fills `line.icon` only when the caller passes `toolIcons`. Plan and approval rows stay plain, commentary/reasoning rows are unchanged, and lines a plugin builds with its own `icon` keep it.
- **Per-channel opt-in.** Tool emoji look out of place on some channels, Slack especially, so the default is plain. A channel opts in with one optional SDK field, `toolIcons?: boolean`, on `createChannelProgressDraftCompositor` (next to the existing `reasoningLinePrefix`/`commentaryLinePrefix` lane markers) and on the `buildChannelProgressDraftLine` options. Telegram opts in; nothing else does.

This PR began as a Telegram-only fix by @keshavbotagent that reused the status-reaction emoji table inside the Telegram plugin. Per maintainer direction it now uses a core owner. That reaction-table use is gone, and Keshav's commit and credit remain.

Follow-up for a maintainer decision: Discord already passes the 🧠/💬 lane markers and could opt in with `toolIcons: true`. This PR leaves Discord unchanged.

## Bounded cost

- When a channel opts in, each core-built tool row costs one static `Record` lookup. Channels that don't opt in skip it.
- No new config keys, protocol fields, network calls, or extra Telegram sends or edits. In the live runs below, before and after each sent one progress message, six edits, and one final reply.
- Production: +63/−1 lines (47 of them are the glyph table). Tests: +50. Docs: +5/−2.

## Evidence

**Regression tests (each failed on clean `origin/main` and passes on this head):**

- `src/channels/progress-draft-compositor.test.ts`, the `prefixes generated tool rows with text glyphs…` case. With `toolIcons` it renders `💬 _Checking_\n🛠️ Exec: running\n🧪 Read: running`. By default it renders `• Exec: running`. In both cases commentary is unchanged and an explicit plugin icon (`🧪`) wins. On main: `- 🛠️ Exec: running / + • Exec: running`.
- `src/channels/progress-tool-glyphs.test.ts`: every icon in `TOOL_DISPLAY_CONFIG` (tools and fallback) has a glyph.
- `extensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.ts`: real Telegram dispatch over HTTP Bot API. The progress card keeps `🛠️ Exec` through the failure edit. On main: `expected '<b>Working</b>\n<b>Exec</b> <i>failed…' to contain '🛠️ Exec'`.
- These suites also pass: the focused channel, streaming, and tool-display suites, plus the Telegram dispatch suites (preview, progress-card, final-delivery-lifecycle, reply-targets, draft-stream).

**Telegram Test Server, live `gpt-6-astra` (real-user DM, `streaming.progress.toolProgress: true`).** Prompt: run `printf glyph-check > note.txt` with exec, read `note.txt`, then reply `OPENCLAW_E2E_OK`. Each run made 5 `gpt-6-astra` requests, all 200.

| | Progress card, last edit | Final |
| --- | --- | --- |
| Before (`origin/main` aa60a5f) | `Working ⏎ Skill Search write read local text file ⏎ … ⏎ Exec ⏎ Read lines 1-10 from note.txt ⏎ Exec` | `OPENCLAW_E2E_OK`; card deleted |
| After (this PR, 126e5c3; later commits change tests only) | `Working ⏎ 🔎 Skill Search write and read a local text file shell printf ⏎ … ⏎ 🛠️ Exec ⏎ 📖 Read lines 1-10 from note.txt ⏎ 🛠️ Exec` | `OPENCLAW_E2E_OK`; card deleted |

**Slack stays plain (isolated formatter check).** Core progress lines from the real compositor, built with Slack's flags (no `toolIcons`) and rendered through Slack's real `formatSlackProgressDraftLine`, `buildSlackProgressTextBlocks`, and `buildSlackProgressCardBlocks`:

```
Slack flags:          draft "• Exec: running\n• Read: note.txt"; card "Exec — running\nRead — note.txt · running"; glyphs: none
control toolIcons:    draft "🛠️ Exec: running\n📖 Read: note.txt"; card unchanged (Slack cards ignore icon)
```

The existing Slack dispatch suite still asserts plain `Bash` / `Apply Patch` task titles.

**CI:** Everything is green on c6a2d40 except one test, `extensions/whatsapp/src/send.delivery-recovery.test.ts` ("preserves long styles and quotes only the first chunk"), in `checks-node-changed-extensions-bundle`; `openclaw/ci-gate` fails only because of it. This PR doesn't touch WhatsApp, and the same test fails the same way on clean `origin/main` aa60a5f (`expected [ …(3) ] to deeply equal [ …(5) ]`).
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
…ows (openclaw#167392)

## What Problem This Solves

Fixes: Telegram progress drafts lost the leading per-tool emoji on tool-log rows (`🛠️ Exec`, `📖 Read`) after openclaw#165095 moved tool display metadata to semantic icons.

## User Impact

User impact: Telegram tool-log rows show a per-tool glyph again, in standard and rich-message previews. Slack and every other channel keep plain rows, and graphical clients are unchanged. No config changes.

## Why This Change Was Made

openclaw#165095 (0b22a3e) replaced each tool's `emoji` with one semantic `icon` and moved status-reaction emoji to a reaction-only table. As a side effect, core stopped setting `ChannelProgressDraftLine.icon`, so Telegram's renderer no longer had a glyph to show. Removing the glyph was not the goal of openclaw#165095.

Core now owns the text presentation of those icons, following the native-client pattern from openclaw#165095:

- **One table.** `src/channels/progress-tool-glyphs.ts` maps each semantic tool icon to a text emoji. A coverage test fails if a configured icon has no glyph, like the Swift and Android tables.
- **One producer.** `buildNamedProgressLine`, where draft lines are built, fills `line.icon` only when the caller passes `toolIcons`. Plan and approval rows stay plain, commentary/reasoning rows are unchanged, and lines a plugin builds with its own `icon` keep it.
- **Per-channel opt-in.** Tool emoji look out of place on some channels, Slack especially, so the default is plain. A channel opts in with one optional SDK field, `toolIcons?: boolean`, on `createChannelProgressDraftCompositor` (next to the existing `reasoningLinePrefix`/`commentaryLinePrefix` lane markers) and on the `buildChannelProgressDraftLine` options. Telegram opts in; nothing else does.

This PR began as a Telegram-only fix by @keshavbotagent that reused the status-reaction emoji table inside the Telegram plugin. Per maintainer direction it now uses a core owner. That reaction-table use is gone, and Keshav's commit and credit remain.

Follow-up for a maintainer decision: Discord already passes the 🧠/💬 lane markers and could opt in with `toolIcons: true`. This PR leaves Discord unchanged.

## Bounded cost

- When a channel opts in, each core-built tool row costs one static `Record` lookup. Channels that don't opt in skip it.
- No new config keys, protocol fields, network calls, or extra Telegram sends or edits. In the live runs below, before and after each sent one progress message, six edits, and one final reply.
- Production: +63/−1 lines (47 of them are the glyph table). Tests: +50. Docs: +5/−2.

## Evidence

**Regression tests (each failed on clean `origin/main` and passes on this head):**

- `src/channels/progress-draft-compositor.test.ts`, the `prefixes generated tool rows with text glyphs…` case. With `toolIcons` it renders `💬 _Checking_\n🛠️ Exec: running\n🧪 Read: running`. By default it renders `• Exec: running`. In both cases commentary is unchanged and an explicit plugin icon (`🧪`) wins. On main: `- 🛠️ Exec: running / + • Exec: running`.
- `src/channels/progress-tool-glyphs.test.ts`: every icon in `TOOL_DISPLAY_CONFIG` (tools and fallback) has a glyph.
- `extensions/telegram/src/bot-message-dispatch.preview.telegram-http.test.ts`: real Telegram dispatch over HTTP Bot API. The progress card keeps `🛠️ Exec` through the failure edit. On main: `expected '<b>Working</b>\n<b>Exec</b> <i>failed…' to contain '🛠️ Exec'`.
- These suites also pass: the focused channel, streaming, and tool-display suites, plus the Telegram dispatch suites (preview, progress-card, final-delivery-lifecycle, reply-targets, draft-stream).

**Telegram Test Server, live `gpt-6-astra` (real-user DM, `streaming.progress.toolProgress: true`).** Prompt: run `printf glyph-check > note.txt` with exec, read `note.txt`, then reply `OPENCLAW_E2E_OK`. Each run made 5 `gpt-6-astra` requests, all 200.

| | Progress card, last edit | Final |
| --- | --- | --- |
| Before (`origin/main` 46635f6) | `Working ⏎ Skill Search write read local text file ⏎ … ⏎ Exec ⏎ Read lines 1-10 from note.txt ⏎ Exec` | `OPENCLAW_E2E_OK`; card deleted |
| After (this PR, 126e5c3; later commits change tests only) | `Working ⏎ 🔎 Skill Search write and read a local text file shell printf ⏎ … ⏎ 🛠️ Exec ⏎ 📖 Read lines 1-10 from note.txt ⏎ 🛠️ Exec` | `OPENCLAW_E2E_OK`; card deleted |

**Slack stays plain (isolated formatter check).** Core progress lines from the real compositor, built with Slack's flags (no `toolIcons`) and rendered through Slack's real `formatSlackProgressDraftLine`, `buildSlackProgressTextBlocks`, and `buildSlackProgressCardBlocks`:

```
Slack flags:          draft "• Exec: running\n• Read: note.txt"; card "Exec — running\nRead — note.txt · running"; glyphs: none
control toolIcons:    draft "🛠️ Exec: running\n📖 Read: note.txt"; card unchanged (Slack cards ignore icon)
```

The existing Slack dispatch suite still asserts plain `Bash` / `Apply Patch` task titles.

**CI:** Everything is green on c6a2d40 except one test, `extensions/whatsapp/src/send.delivery-recovery.test.ts` ("preserves long styles and quotes only the first chunk"), in `checks-node-changed-extensions-bundle`; `openclaw/ci-gate` fails only because of it. This PR doesn't touch WhatsApp, and the same test fails the same way on clean `origin/main` 46635f6 (`expected [ …(3) ] to deeply equal [ …(5) ]`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: macos App: macos app: web-ui App: web-ui channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: matrix Channel integration: matrix channel: slack Channel integration: slack channel: telegram Channel integration: telegram docs Improvements or additions to documentation extensions: clickclack extensions: codex extensions: qa-lab merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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