Skip to content

Show native chat tool calls as plain sentences - #25654

Merged
brennanb2025 merged 13 commits into
mainfrom
brennanb2025/native-chat-tool-sentences
Oct 6, 2026
Merged

brennanb2025 merged 13 commits into
mainfrom
brennanb2025/native-chat-tool-sentences

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​573 $\color{#cf222e}{\Huge{\mathbf{−}}}$​33 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​540
Prod 21 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​530 $\color{#cf222e}{\Huge{\mathbf{−}}}$​145 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​385

ELI5

Native chat tool calls were dense and hard to scan: code-style tool names, arguments, and bright output blocks competed with the conversation. Calls now read as short sentences, with quieter command, output, and diff surfaces.

What Changed

  • Tool verbs reflect existing call and result data. Commands say “Running” or “Ran”; failed file/search activity says “Tried to…”, and failed edits never claim “Edited.” Integration names and full accessible paths remain available.
  • Command chips omit duplicate input only for a single plain command. Expanded rows preserve metadata, argument arrays and shell wrappers. A command stored as one string without additional metadata or a shell wrapper retains its complete original text, including whitespace; other input continues to use the existing bounded detail formatter. Rich input formatting stays lazy while collapsed.
  • Expanded runs, successful edit cards, subagent rows, and background tasks use the existing chat tokens and quieter typography. Copying, counts, result pairing, disclosure state, and diff limits remain available.
  • All new labels are translated in the six supported catalogs. Tool activity already on screen now updates when the app language changes, using the existing translation subscription in its owner component. The optional smaller change-count display leaves existing callers unchanged.

Why

Sentences use the existing tool categories, input summaries, and results, so their wording follows the work already recorded. Successful edit cards reuse the existing diff model. This keeps the change in presentation and avoids a second store of execution state.

This PR remains stacked on brennanb2025/native-chat-soft-colors (#25651).

Linked Issue

N/A (maintainer request)

Visual Proof

Real app, rendered headless from the same seeded Claude transcript. Before = the base branch (softer colors, #25651); after = this branch. Only the tool activity changes.

Tool activity expanded (dark)

Before After
Before: Tool activity expanded (dark) After: Tool activity expanded (dark)

Tool activity expanded (light)

Before After
Before: Tool activity expanded (light) After: Tool activity expanded (light)

Earlier hidden M4Air captures at 43fc08818b02d2c8bf0f3f0681f4487cb62b5056 cover dark/light, failed command/read/edit, rich input, exact padded command, diff/copy, accessible backslash tool input and Spanish initialized before mounting. They are earlier-head evidence. The stale-English diagnostic capture is not translation acceptance.

Current-head 97e156f20546a83112bef59d0f867c203458129d M4Air screenshots were captured through hidden CDP with the app's own logged user-data path inside the isolated directory and unchanged hooks. The corrected language check retained the same seven nodes for the run header, failed Read, failed Edit, Subagent, successful edit, Copy diff and failure-count label; all updated from English to Spanish. The raw harness, notes, hashes and images were independently inspected. Raw transcript content remains in its original language.

Current head: dark command failure and rich input Current head: light overview
Current dark failure and rich input Current light overview
English before language change Spanish with the same retained nodes
English retained tool nodes Spanish same tool nodes

The corrected run stopped afterward on a separate long-detail check: a 4,992-character shell-wrapped command expanded to the existing bounded JSON representation, clipped at 4,001 characters. This shared formatting path is also present on the pinned base, but no same-machine baseline run was performed to attribute the visible behavior. The exact original detail requirement remains unmet for that wrapped input, and is deferred as the existing bounded-formatting limit with maintainer approval. Later checks in that corrected run were not reached; the separately captured current-head dark/light images are evidence for those visible surfaces. Native background-task status is untested because the fixture supplies only a command input flag, not an actual background task.

Corrected raw evidence archive · Long wrapped-detail diagnostic

Earlier remote dark: failed command and rich input Earlier remote light: same expanded input
Earlier remote dark failure and rich input Earlier remote light expanded input

Earlier remote dark diff and padded-command disclosure

Failed Read/Edit and backslash tool-input path · Spanish initialized before row mount

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

Review-loop checks at pushed head 97e156f20546a83112bef59d0f867c203458129d (macOS): 205 tests across 12 explicit files, scoped renderer typecheck through the machine-wide queue, anti-slop, changed-code quality, localization, formatting and whitespace passed. The mounted-row regression switches actual language with unchanged props and the same header element. Mechanical restacking onto the repaired #25651 base preserved feature source and translations.

CI run 37403822581 completed successfully after one authorized failed-shard retry: repository guards, static analysis/full typecheck, Linux and Windows packaging, relay integration and four Node 24 test shards passed. The first attempt of shard 5 failed one retained-heap assertion in flatten-retained-slice.test.ts:55 (655,904 bytes versus a 419,430.4-byte threshold); its test and implementation are byte-identical to pinned main and a focused local run passed all three tests. An identical main CI failure has not been observed. No unrelated source patch was made. The single maintainer-authorized retry of the failed shard and the aggregate verification job both passed; all five test shards are successful. No second retry was requested. Mobile Checks and test LoC passed.

Windows/WSL, Linux/SSH and mobile UI runtime flows remain unverified. Packaging establishes builds rather than platform UI acceptance. Draft-skipped jobs remain unverified. No ready, merge or auto-merge action was taken.

Review

Adversarial functional review and an independent architecture/performance review completed. Five P2 fixes preserve rich command input, translate labels, retain full long plain commands, satisfy the property-access audit and subscribe mounted tool sentences to language changes. Fresh eight-area readiness review without counsel found no new proven P0–P3 source issue; mechanical restacking preserved that implementation. No P0/P1 candidate was found. Duplicate input normalization is an unmeasured watchpoint. The corrected language acceptance passed; the existing long wrapped-detail limit is deferred with maintainer approval, and the single authorized failed-shard retry and aggregate verification passed. The PR remains draft.

Agent skill upstream boundary

  • Not applicable.

Notes

No execution, persistence, remote protocol, status-store, or mobile behavior changes. Duplicate input parsing remains an unmeasured performance watchpoint; no slowdown was demonstrated.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots or videos attached for UI changes
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Full lint, typecheck, test, and build pass (remaining checks are described above)

@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-tool-sentences branch 2 times, most recently from ed7fa63 to 17a4eec Compare October 5, 2026 19:32
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-soft-colors branch from 7f2ba8e to ddb25ae Compare October 5, 2026 23:18
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-tool-sentences branch from 17a4eec to fdf80e7 Compare October 5, 2026 23:31
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-soft-colors branch from ddb25ae to 3003c53 Compare October 5, 2026 23:59
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-tool-sentences branch from a2c56f2 to 43fc088 Compare October 6, 2026 00:03
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-soft-colors branch 2 times, most recently from fa517e4 to da2da9d Compare October 6, 2026 00:31
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-tool-sentences branch from 43fc088 to ef73e24 Compare October 6, 2026 00:51
@brennanb2025

brennanb2025 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Native chat tool calls were hard to scan because code-style names, arguments and bright output competed with the conversation. They now read as short sentences with quieter command, output and diff surfaces. Failed file actions use honest wording, and expanded rows preserve command metadata and original input subject to the existing bounded formatter for rich or wrapped commands.

Review fixed five P2 issues at 97e156f20546a83112bef59d0f867c203458129d: lost rich command input, untranslated failure/subagent labels, clipped long padded plain commands, audit-rejected property access and mounted tool rows retaining the previous language. No P0/P1 candidate was found. Duplicate input normalization is deferred as an unmeasured watchpoint.

Verified: 205 tests across 12 explicit files, queued scoped renderer typecheck, code-quality and localization checks, formatting and eight-area source readiness without counsel. Restacking onto the repaired base preserved feature source and translations. Current-head hidden M4Air screenshots are attached in the PR body. The corrected English-to-Spanish run proved that seven existing tool, diff and accessible-label nodes updated without remounting; its raw harness, notes, isolation proof and images were independently inspected.

CI completed successfully after one authorized failed-shard retry. The first attempt failed one retained-heap assertion; the single retry and aggregate verification both passed. Guards, full static analysis/typecheck, Linux/Windows packaging, relay integration, four other test shards, Mobile Checks and test LoC passed. The failed test and implementation match pinned main byte-for-byte and a focused local run passed; an identical main CI failure has not been observed. All five test shards are now successful; no second retry or unrelated source patch was made.

The corrected M4 run stopped after the language proof because a 4,992-character shell-wrapped command expanded to 4,001 characters through the existing bounded JSON formatter. The same source path exists on the base; no same-machine baseline was launched, so no new product cause is assigned. The maintainer approved deferring this existing bounded-formatting limit; later checks in the corrected run were not reached. Native background-task status and Windows/WSL, Linux/SSH and mobile UI runtime flows remain unverified. The PR remains draft.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-soft-colors branch from da2da9d to 7265cbc Compare October 6, 2026 02:10
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-tool-sentences branch from ef73e24 to 97e156f Compare October 6, 2026 02:22
@brennanb2025
brennanb2025 marked this pull request as ready for review October 6, 2026 04:48
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/native-chat-soft-colors to main October 6, 2026 05:04
@brennanb2025
brennanb2025 merged commit 6c693ed into main Oct 6, 2026
72 of 74 checks passed
brennanb2025 added a commit that referenced this pull request Oct 6, 2026
Main squash-merged D1 #24990 (from 320f347) and C1a #25141 (383b0dc). Conflicts:
- #25720 dropped the launch-command override gate from native-chat create support and renamed the
  route input to startsOutsideWorkspaceRoot: main's version, with D3's agent-generic typing and
  host structured-agents input.
- the model catalog store's refresh: D3's agent: string plus main's new lister parameter.
- #25654's tool-run header restyle lands in C5's NativeChatToolRunCallCounts, which holds that span.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant