Repository navigation
chore(ui): cover native approval finalization - #137259
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 8:31 PM ET / September 4, 2026, 00:31 UTC. ClawSweeper reviewWhat this changesThe branch adds a real-Gateway Control UI regression test for native approval completion across reloads and routes changes to that test through Chromium UI CI. Merge readiness⛔ Blocked before merge - 3 items remain Keep this maintainer-labelled PR open for the remaining exact-head CI/maintainer gate. The focused real-Gateway regression covers a distinct two-phase system-agent approval lifecycle; no introduced correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI receives approval and chat-final events from the Gateway and renders a native approval card while a delegated configuration change awaits an operator decision. Once the decision settles, the Gateway records the tool result and the UI restores it across session reloads. flowchart LR
A[Delegated configuration request] --> B[Gateway approval owner]
B --> C[Approval events]
C --> D[Control UI native card]
D --> E[Operator decision]
E --> F[Settled tool result]
F --> G[Reloaded chat transcript]
Decision needed
Why: The patch has no source-level blocker, but the protected maintainer label requires explicit maintainer handling and the supplied check projection cannot establish completion of every UI shard. Before merge
Agent review detailsSecurityNone. PR surfaceTests +302, Other 0. Total +302 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the focused real-Gateway regression and its exact-path CI routing, then merge only after the exact current-head UI matrix is complete and a listed maintainer accepts the protected review. Do we have a high-confidence way to reproduce the issue? Not applicable: this is regression-coverage work, not a proposed production repair. The source-defined browser scenario is clear, but this read-only review did not execute it. Is this the best way to solve the issue? Yes. Existing mock UI E2E tests cover generic queue behavior, while this scenario exercises the actual Gateway's system-agent two-phase lifecycle and reload hydration without adding a production seam. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cd8c74889d21. LabelsLabel 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
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
…9-prep * commit '407a8f453c0f0306af1ddc0aafa8697c1d49a9e7': (312 commits) perf(ui): coalesce automation event refreshes (#138065) fix: reject incomplete Skill Workshop directory reads (#138082) test(ui): decouple rendering checks from generated wording (#138283) perf: avoid temporary entries in bounded JSON traversal (#138017) fix(irc): render complete messages before splitting (#138328) perf: prepare worker trajectory payloads only for recorded events (#138086) fix(mcp): paginated listings no longer time out after a forward clock step (#137206) fix(codex): page native transcripts and bound UI previews (#136282) feat(gateway): apply more settings without restarting (#138112) fix(docs): preserve mirrored ClawHub maturity links (#138241) fix(test): own UI animation and legacy database setup (#138296) fix(tts): preserve literal directives in Markdown code (#138319) fix: load chat widgets behind authenticated gateways (#138074) chore(ui): cover native approval finalization (#137259) fix(cron): cancel conditions before main-session handoff (#138313) fix(backup): preserve text after embedded NUL characters (#138327) fix(android): align composer control sheets (#137442) fix(ci): wait for replacement PR runs instead of stale failures (#138307) fix(sessions): keep Gateway responsive with long transcripts (#138094) fix(computer): map window inputs to delivered image coordinates (#138271) ... # Conflicts: # scripts/release-check.ts # test/release-check.test.ts
* test(ui): cover native approval finalization * test(ci): route approval gateway coverage * test(ui): fix native approval gateway coverage * test(ui): ignore retiring approval socket events * test(ui): model two-phase approval completion * test(ui): prove settled approval result without DOM ordering * test(ui): allow concurrent approval cleanup events * test(ui): assert settled result after reload * test(ui): expand settled work after reload
Related: #137017
What Problem This Solves
Resolves a coverage gap where the default Control UI WebChat path could regress from an event-owned native approval card to duplicated fallback text during stream finalization or session hydration.
Why This Change Was Made
The production fix already keeps delegated OpenClaw tool calls pending until approval settles. This change adds a real-Gateway browser regression that locks in the ownership boundary: approval events own the actionable card, and only the settled tool result enters transcript history.
User Impact
No new user-facing behavior. This protects the shipped approval flow from losing the native card, duplicating fallback text, or dropping the settled result across reloads.
Evidence
system-agent:*approval card./approvefallback,needsApproval, orproposalId.Verified locally:
node scripts/run-vitest.mjs src/scripts/ci-changed-scope.control-ui.test.ts --run— 54 passednode scripts/check-changed.mjs -- extensions/qa-lab/src/control-ui-openclaw-delegation.real-gateway.e2e.test.ts scripts/ci-changed-scope.mjs src/scripts/ci-changed-scope.control-ui.test.ts— passedThe Playwright browser case could not execute on this host because Chromium requires
libnspr4.so; the exact-head hosted real-Gateway job is the browser proof.View the OpenClaw team session