Repository navigation
fix(ui): label created files accurately in tool activity - #122287
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
c9e1b5e to
f9e1449
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 6:07 PM ET / 22:07 UTC. ClawSweeper reviewWhat this changesThe PR carries parsed patch add, update, and delete operations into Control UI activity rows and grouped summaries so created and deleted files are not reported as edits. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessThe branch is a focused repair of an operator-visible Control UI mislabel; no patch defect was found, but this member-authored, maintainer-labeled PR still needs the upstream Codex contract confirmed from a permitted sibling checkout before merge. Priority: P2 Review scores
Verification
How this fits togetherThe Codex app-server projector records file-change metadata in transcript tool calls, which the Control UI parses into activity rows and collapsed work-group summaries. This PR changes that final presentation layer, not gateway or provider behavior. flowchart LR
A[Codex file-change event] --> B[Transcript tool call]
B --> C[Control UI patch parser]
C --> D[Activity view model]
D --> E[Activity row verb]
D --> F[Work-group summary]
Decision needed
Why: Repository policy requires direct sibling-source inspection for this Codex-dependent claim, which this read-only environment cannot perform because ../codex is absent and network access is unavailable. Before merge
Agent review detailsSecurityNone. PR surfaceSource +59, Tests +187. Total +246 across 9 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the parser as the sole source of operation metadata and merge only after direct upstream-contract verification; no net-neutral alternative is evident because accurate create/delete/mixed states require new presentation keys while the grouping refactor already removes the previous duplicated counters. Do we have a high-confidence way to reproduce the issue? Yes—source inspection shows that current main receives structured add/delete/update facts but flattens parsed patches to the edit presentation kind; the supplied browser scenario targets that exact path. Is this the best way to solve the issue? Yes, subject to direct Codex-contract confirmation: preserving the producer-recorded operation through the existing patch view model is narrower and more maintainable than changing the projector or inferring operations in the renderer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bc030544ee7e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Pre-merge review complete for
Ready for the native landing flow. |
|
Merged via squash.
|
|
Landed as Exact-head CI passed on Issue #122267 was closed by the merge. |
* origin/main: (1725 commits) fix(agents): preserve reply cleanup when cancellation throws (#122252) fix(ui): render disallowed link schemes as plain text (#122311) fix(test): isolate gateway helper env stubs (#122319) fix(ui): keep chat Markdown block rhythm consistent (#122289) test(cli): trim duplicate Hooks process cases (#122278) fix(ui): retain identity while agent roster loads fix(ui): preserve configured agent labels fix(plugins): keep startup convergence read-only (#122330) fix: preserve WebChat reply context after reloads (#122169) fix(ui): make DONE moves visibly reversible (#122303) fix(ui): keep inline-code punctuation attached (#122291) fix(google-meet): publish exports atomically (#122306) fix(channels): preserve failed agent run reactions (#122009) fix(ui): label patch file operations accurately (#122287) fix(windows): preserve Unicode LAN route aliases (#122263) test(media): synchronize transcode pool completion (#122279) fix(android): keep completed subagent activity visible for sixty seconds (#122089) fix(ui): humanize bare GitHub item links (#122285) refactor(qqbot): install plugin from Tencent package (#107295) chore: scope SQLite session lifecycle CI (#121917) ...
Closes #122267
What Problem This Solves
Fixes an issue where users reviewing a successful Codex file creation in Control UI would see
Editedeven though the recorded operation wasadd. Mixed patch activity was also collapsed into an all-edits count.Why This Change Was Made
The producer already records the authoritative operation: OpenClaw's Codex projector preserves each
change.kind, matching upstream Codex'sPatchChangeKind::{Add, Delete, Update}contract. The loss happened in the Control UI projection, which treated every parsed patch as an edit.This PR carries those existing operations through the patch view model. Tool rows derive
Created,Edited,Deleted, orChangedfrom that fact, and grouped activity counts file operations separately. It does not change gateway, protocol, config, storage, or provider behavior.Dependency contract checked directly in the required sibling
../codexcheckout atopenai/codex@f344a80a3b4a2e9a3f70f04526c77c6a979f5fb4(the links below are citations, not substitutes for that inspection):codex-rs/app-server-protocol/src/protocol/v2/item.rs:1053defines the serialized add/delete/update variants.codex-rs/tui/src/diff_render.rs:428renders single-file add/delete/update outcomes distinctly.User Impact
Operators can trust the activity row to say what happened: a newly created file now appears as
Created, and mixed patch summaries no longer report creations or deletions as edits.Evidence
The same realistic turn runs on both sides: the user requests a release-helper change, the agent explains the plan, applies one mixed patch containing add/update/delete operations, runs a focused command, and reports the result. Before the production change, the regression test captures both themes and then fails because the group says
Ran a command, edited 3 filesinstead of preserving the three recorded operation kinds.Light
Dark
Validated on
f9e14495d6732ede6875a30744923aa609254e08:pnpm ui:i18n:verifynode scripts/run-vitest.mjs ui/src/lib/chat/tool-call-view.test.ts ui/src/lib/chat/tool-call-grouping.test.ts ui/src/pages/chat/components/chat-tool-cards.test.ts— 118 passednode scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-tool-turn-outcome.e2e.test.ts -t "preserves mixed producer"— 1 passed; the same fixture fails onmainafter capturing the before imagesautoreview --mode branch --base origin/main— clean, no accepted/actionable findingsThe Blacksmith Testbox changed gate did not start because its lease remained queued without a host;
tbx_01kzsby65vs1wr968hq479bzchwas stopped. Exact-head PR CI run31540614502completed successfully, includingcheck-dependencies,checks-ui, Control UI E2E, andopenclaw/ci-gate.Production delta is +141/-82 (net +59); tests are +191/-4. The production growth is the operation fact carried through the existing view model plus the visible verb states. The grouped-count owner was refactored to absorb per-operation counting at net +2. No runtime path was duplicated or retained for compatibility.