fix(webui): keep tool activity paired without model calls#103821
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2ef5b1e4d
ℹ️ 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".
| continue; | ||
| } | ||
| const operation = readOperation(record.kind); | ||
| const section = startSection(collector, operation, sourcePath); |
There was a problem hiding this comment.
Avoid reporting zero stats when Codex omits diffs
When a structured Codex changes entry has a path/kind but no diff or stat (the projector explicitly preserves that shape when change.diff is absent), this still creates a section with the default {added: 0, removed: 0}. Once the paired result marks the card succeeded, the row renders a misleading +0 -0 stat even though the counts are unknown; omit the stat or require a real diff/stat before surfacing it.
Useful? React with 👍 / 👎.
|
Land-ready proof for exact head
Known proof gap: split-pane overflow was not separately screenshot-validated; the 1200px rendered artifact plus DOM/CSS regressions cover the changed rows. No open review findings. |
|
Codex review: stale review; fresh review needed. Summary Next step |
|
Merged via squash.
|
Restores the chat.toolTitles path removed in #103821, gated behind the new gateway.controlUi.toolTitles opt-in (default false) so tool rendering stays fully deterministic with no background model calls unless an operator enables it. Disabled gateways answer { titles: {}, disabled: true } without loading the completion runtime, and clients stop asking for the session. When enabled, titles use canonical utility-model routing: an explicit utilityModel (operator-chosen provider, like every utility task), else the session provider's declared small-model default, honoring per-session model overrides and auth profiles; utilityModel "" disables titles and malformed refs fail closed — never the primary model. Tool inputs are redacted with the tools-mode redactor before cache keys or prompts, caller ids are bounded and never reach the model, and results cache in the per-agent SQLite cache_entries so repeat views never re-bill. Also completes two crestodian model-input mock factories that leaked into sibling tests under shared-registry CI shards. Fixes #103987
…3989) * feat(webui): reintroduce opt-in AI purpose titles for tool calls Restores the chat.toolTitles path removed in #103821, gated behind the new gateway.controlUi.toolTitles opt-in (default false) so tool rendering stays fully deterministic with no background model calls unless an operator enables it. Disabled gateways answer { titles: {}, disabled: true } without loading the completion runtime, and clients stop asking for the session. When enabled, titles use canonical utility-model routing: an explicit utilityModel (operator-chosen provider, like every utility task), else the session provider's declared small-model default, honoring per-session model overrides and auth profiles; utilityModel "" disables titles and malformed refs fail closed — never the primary model. Tool inputs are redacted with the tools-mode redactor before cache keys or prompts, caller ids are bounded and never reach the model, and results cache in the per-agent SQLite cache_entries so repeat views never re-bill. Also completes two crestodian model-input mock factories that leaked into sibling tests under shared-registry CI shards. Fixes #103987 * fix(webui): redact tool-title inputs before truncation
…03821) * fix(webui): make tool activity rendering deterministic * fix(protocol): remove stale tool-title models * fix(i18n): translate tool activity labels * fix(i18n): translate tool activity labels
…nclaw#103989) * feat(webui): reintroduce opt-in AI purpose titles for tool calls Restores the chat.toolTitles path removed in openclaw#103821, gated behind the new gateway.controlUi.toolTitles opt-in (default false) so tool rendering stays fully deterministic with no background model calls unless an operator enables it. Disabled gateways answer { titles: {}, disabled: true } without loading the completion runtime, and clients stop asking for the session. When enabled, titles use canonical utility-model routing: an explicit utilityModel (operator-chosen provider, like every utility task), else the session provider's declared small-model default, honoring per-session model overrides and auth profiles; utilityModel "" disables titles and malformed refs fail closed — never the primary model. Tool inputs are redacted with the tools-mode redactor before cache keys or prompts, caller ids are bounded and never reach the model, and results cache in the per-agent SQLite cache_entries so repeat views never re-bill. Also completes two crestodian model-input mock factories that leaked into sibling tests under shared-registry CI shards. Fixes openclaw#103987 * fix(webui): redact tool-title inputs before truncation
Closes #103554.
Follow-up to #103748, which merged while its review fixups were still being prepared.
What Problem This Solves
Fixes an issue where Control UI users could still get duplicated or orphaned tool-result rows for parallel and repeated tool calls, incomplete multi-file diffs, and misleading success/edit labels. The merged implementation also added a view-triggered model RPC for decorative titles, which could send tool arguments to a provider, spend utility-model tokens, and persist a new cache solely to label activity rows.
Why This Change Was Made
This keeps the useful redesign deterministic: call-ID-indexed pairing, semantic rows, bounded per-file diffs, truthful running/success/failure outcomes, and preserved edit details across history reloads. It removes the
chat.toolTitlesprotocol, gateway, cache, and UI path; tool activity no longer needs background model egress or spend.Codex compatibility was checked against the upstream raw freeform
apply_patchcontract and structured app-server file-change contract before implementing the parser/projector paths. AI-assisted by Codex; I reviewed the resulting behavior, source boundaries, tests, and rendered output.User Impact
Visual baseline
Evidence
tbx_01kx6bf52wd5bbyab8rkj4yc09: 601 focused assertions passed across UI, gateway, Codex event projection, and edit-diff paths.8241ab08773d68db2ae1ee41967e0ef036c19ad9175e6ee854c502043a1d7113.check:changedplus production build passed on Blacksmith Testbox. Exact PR-head CI is green: 55 jobs, zero failures (run 29110107026).No changelog edit: release notes are release-owned in the current prepare flow.