Skip to content

feat(ios): add the Control UI's wording for tool calls - #206463

Merged
vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/ios-tool-words
Nov 27, 2026
Merged

vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/ios-tool-words

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

In iPhone chat, most tool calls show only the tool's title, such as "Session Send" or "Read", with a raw argument or path beside it. The Control UI describes what the call is doing or did, such as "Sent message to Release review" or "Couldn't read Header.swift". Anyone who uses both sees different descriptions of the same work, and on iPhone a collapsed row often leaves out the specific action or outcome until you expand it.

User Impact

The new tool wording is not shown on screen yet. This PR is part of a series that brings the iOS chat in line with the Control UI. It adds the catalog and copy logic, and a later PR wires them into tool rows, the activity group headline, and the step timeline.

One small change is visible right away. When a tool has no display entry in tool-display.json, its fallback title now keeps the capital letters from the tool name, matching the Control UI. For example, listIssues changes from "Listissues" to "ListIssues", and get_URL changes from "Get Url" to "Get URL". Lowercase names such as knowledge_status look the same as before. Because ToolDisplayRegistry is shared, the same fallback casing applies in the macOS app's work activity.

Why This Change Was Made

The Control UI owns this wording. Its English catalogs (en-chat-tool-operations.ts and en-chat-tool-labels.ts) hold about 2,250 strings. Most of them (1,959) are the base, running and completed forms for 206 tools. The rest are shared verbs, launch and delivery states, and activity summaries. The app does not copy them by hand. scripts/tool-operations.ts --write generates tool-operations.json in OpenClawKit from those catalogs, and --check flags when the generated file falls behind.

  • ToolOperationCatalog loads tool-operations.json once from the resource bundle and fills in placeholders such as {name} and {count}.
  • ChatToolOperationCopy ports the web's catalogToolOperation and the named branches of resolveToolOperationLabel. It turns a call (name, arguments, outcome, result receipt, exit code, and addressed chat) into row text.
  • ToolDisplayRegistry.operationCall and operationSummary normalize a call the same way the web does before wording it: they strip only OpenClaw's loopback MCP prefixes, parse arguments that arrive as a JSON string, and unwrap dispatcher calls. displayCall keeps its existing behavior because icon lookup depends on it.

The wording is English only for now, as in the Control UI.

Evidence

  • The iOS app builds for the simulator from this commit on top of main. The build's SwiftFormat lint and strict SwiftLint pass with 0 violations across 566 files.
  • ToolDisplayRegistryTests passed 7 of 7 on an iOS 27.2 simulator, including the new check that operationCall leaves third-party MCP names unchanged. SwiftFormat and strict SwiftLint pass on that test file.
  • pnpm tool-display:check reports the existing tool display snapshot as up to date, and native-app-i18n verify reports changed=false. The i18n sync adds two entries (launch.subagent.limitReached and launch.subagent.namedLimitReached) that the extractor picks up from ChatToolOperationCopy.swift; both are lookup keys and are never shown to users.
  • The wording tests ported from the web's chat-tool-purpose.test.ts assert on chat row titles through the row model, so they land with the later PR that wires up those rows. ChatToolOperationCopy itself is not exercised by unit tests in this PR.
  • scripts/tool-operations.ts --check passes: tool-operations.json matches the web catalogs as of PR fix: clarify sent-message labels and chat activity icons #206048, which removed sessionSend.accepted and sessionSend.acceptedNamed. An accepted send reads "Sent message to …" here too, and ChatToolOperationCopy.sessionSend maps the accepted status to it.
  • Not checked: a macOS app build and the OpenClawKit SwiftPM tests on macOS.

🦞 Made with OpenClaw

@clawsweeper

clawsweeper Bot commented Nov 27, 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 app: ios App: ios app: macos App: macos scripts Repository scripts size: XL labels Nov 27, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head cdafc30f7d8bebb98cdb887d118d93855ef26300, but the PR head is now cc9d7ef66feaf9c44806f28a61dfd7cd791f1450. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-27T07:17:31.290Z sha cdafc30 :: needs changes before merge. :: [P2] Align accepted-send mapping before regenerating the catalog | [P2] Leave the iOS generated locale catalog to its publisher

…does

The Control UI stopped saying "Message accepted for …" in #206048: an accepted send reads "Sent message to …". Regenerate tool-operations.json from the web catalogs and map the accepted status to the same words.
@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 27, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 27, 2026 16:43
@openclaw-barnacle openclaw-barnacle Bot removed app: ios App: ios app: macos App: macos labels Nov 27, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit b3af660 into main Nov 27, 2026
99 of 100 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/ios-tool-words branch November 27, 2026 18:24
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
* feat(ios): add the Control UI's wording for tool calls

* fix(ios): call an accepted send "Sent message to", as the Control UI does

The Control UI stopped saying "Message accepted for …" in openclaw#206048: an accepted send reads "Sent message to …". Regenerate tool-operations.json from the web catalogs and map the accepted status to the same words.

* fix(ios): leave generated tool copy catalogs to locale refresh

Co-authored-by: Vyctor H. Brzezowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant