Skip to content

fix(webui): keep tool activity paired without model calls#103821

Merged
steipete merged 5 commits into
mainfrom
codex/fix-tool-activity-rendering
Jul 10, 2026
Merged

fix(webui): keep tool activity paired without model calls#103821
steipete merged 5 commits into
mainfrom
codex/fix-tool-activity-rendering

Conversation

@steipete

@steipete steipete commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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.toolTitles protocol, 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_patch contract 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

  • Parallel calls and their results stay paired, including repeated snapshots, batches larger than the old scan window, and bundled typed results.
  • Reads, writes, edits, searches, and shell calls remain scannable; failed edits stay failed even if a later turn recovers.
  • Codex and unified patches render bounded, separated per-file sections with line numbers and accurate stats where the source is complete.
  • Opening a chat no longer triggers a decorative title-generation RPC, provider egress, token spend, or title-cache write.

Visual baseline

Before Deterministic activity view
before after

Evidence

  • Blacksmith Testbox tbx_01kx6bf52wd5bbyab8rkj4yc09: 601 focused assertions passed across UI, gateway, Codex event projection, and edit-diff paths.
  • Browser E2E: 2/2 passed for persistent failure state and canonical parallel read plus multi-file patch rendering.
  • Source-blind behavior validation: semantic counts/details/raw output, parallel pairing without orphan rows, and sticky failure state all passed. Rendered artifact SHA-256: 8241ab08773d68db2ae1ee41967e0ef036c19ad9175e6ee854c502043a1d7113.
  • Authenticated localization sync: all 20 locales clean with zero English fallback keys; the exact prior CI failure now passes 7/7 on Testbox.
  • check:changed plus production build passed on Blacksmith Testbox. Exact PR-head CI is green: 55 jobs, zero failures (run 29110107026).
  • Final full-fix, generated-protocol, and generated-locale autoreviews are clean; two translation semantics found during review were corrected before push.

No changelog edit: release notes are release-owned in the current prepare flow.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: codex size: XL maintainer Maintainer-authored PR labels Jul 10, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android extensions: diagnostics-otel Extension: diagnostics-otel scripts Repository scripts commands Command implementations docker Docker and sandbox tooling extensions: anthropic extensions: openai extensions: qa-lab channel: sms Channel integration: sms labels Jul 10, 2026
@openclaw-barnacle openclaw-barnacle Bot removed app: android App: android extensions: diagnostics-otel Extension: diagnostics-otel scripts Repository scripts commands Command implementations docker Docker and sandbox tooling extensions: anthropic extensions: openai labels Jul 10, 2026
@openclaw-barnacle openclaw-barnacle Bot removed extensions: qa-lab channel: sms Channel integration: sms labels Jul 10, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 4c39015398a1b6651d91a9162ba036352e5301c6:

  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 103821 passed; remote PR tree matches the prepared tree.
  • Exact-head CI: 55 jobs, zero failures — https://github.com/openclaw/openclaw/actions/runs/29110107026
  • Focused Testbox proof: 601 assertions across UI, gateway, Codex projection, and edit-diff paths.
  • Browser proof: 2/2 scenarios for canonical parallel pairing/multi-file patches and persistent failure state.
  • Source-blind rendered validation passed semantic counts/details/raw output, no orphan result rows, and sticky failure state.
  • i18n repair: authenticated sync produced zero fallback keys across 20 locales; test/scripts/control-ui-i18n.test.ts passes 7/7 on Testbox; final generated-locale autoreview is clean.
  • Direct Codex contract inspection: ../codex/codex-rs/core/src/tools/handlers/apply_patch_spec.rs:9-26, ../codex/codex-rs/core/src/tools/handlers/apply_patch.rs:253-259,343-370, ../codex/codex-rs/app-server-protocol/src/protocol/v2/item.rs:1045-1062, and ../codex/codex-rs/app-server-protocol/src/protocol/item_builders.rs:328-365.

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.

@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

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

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@steipete
steipete merged commit 5aea34a into main Jul 10, 2026
111 of 115 checks passed
@steipete
steipete deleted the codex/fix-tool-activity-rendering branch July 10, 2026 17:21
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Jul 11, 2026
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
steipete added a commit that referenced this pull request Jul 11, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 11, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 11, 2026
…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
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: web-ui App: web-ui docs Improvements or additions to documentation extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: tool calls render as opaque JSON cards — no diffs, no purpose, unpaired parallel calls

1 participant