feat(ui): add standalone operator approval links#103698
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 9:39 PM ET / July 12, 2026, 01:39 UTC. Summary Reproducibility: yes. for the review defects: current source deterministically shows the misordered token-helper arguments, inconsistent locale generation, and stale docs map. The feature itself is new rather than a current-main bug reproduction. Review metrics: 3 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Restack the standalone approval segment onto current main, fix the token-helper call and generated locale/docs outputs, obtain explicit acceptance of the reserved plugin-route namespace, and publish redacted mobile and desktop browser proof from that exact head. Do we have a high-confidence way to reproduce the issue? Yes for the review defects: current source deterministically shows the misordered token-helper arguments, inconsistent locale generation, and stale docs map. The feature itself is new rather than a current-main bug reproduction. Is this the best way to solve the issue? Yes in architecture: a Gateway-owned authenticated document backed by canonical approval RPCs is the narrowest maintainable cross-device solution, but this implementation is not merge-ready until the defects, proof gap, conflict, and namespace decision are resolved. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7a456e362d0b. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
9966705 to
6f6f1fc
Compare
2316b1a to
72e8289
Compare
6f6f1fc to
27b821f
Compare
72e8289 to
fdad6d7
Compare
|
Land-ready update: the ClawSweeper P1 is fixed — ephemeral approval-document login no longer persists the serving gateway over a saved remote selection ( Validation: gateway-store 9/9, plugin-http-auth reservation suite, control-ui http suite, UI approval page suites green on Testbox ( |
27b821f to
7776776
Compare
fdad6d7 to
12ec1bc
Compare
7776776 to
d5ed331
Compare
12ec1bc to
548cca6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 548cca69b7
ℹ️ 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".
| return { | ||
| ...settings, | ||
| gatewayUrl: effectiveUrl, | ||
| token: resolveGatewayTokenForUrlEdit(settings.gatewayUrl, settings.token, effectiveUrl), |
There was a problem hiding this comment.
Pass the serving gateway URL when retargeting tokens
When a standalone approval document overrides a persisted remote gateway selection, this call passes settings.token as nextGatewayUrl and effectiveUrl as currentToken, but resolveGatewayTokenForUrlEdit(currentGatewayUrl, nextGatewayUrl, currentToken) uses its second argument to load the session-scoped token. In a tab that already has a token for the serving gateway but the full app is currently pointed at a remote gateway, the approval page now looks up sessionStorage under the token string instead of the serving URL, drops the usable token, and sends the operator back through auth on reload/cleaned deep links. Swap the second and third arguments so the standalone page can reuse the serving-gateway token without changing the saved remote selection.
Useful? React with 👍 / 👎.
Squash-rebased #103698 segment onto the typed-actions tip on current main. Adds the tokenless /approve/{id} standalone approval UI served by the gateway control-UI router, gateway-store ephemeral login fix (selectGateway only on changed URL), and approval-page i18n strings. Drift reconciliation: union-merged i18n translation-memory caches and regenerated locale metadata via control-ui-i18n sync (33 approvalPage keys remain English fallbacks in minor locales, as on the original branch). (cherry picked from commit c82f56011bfe9f0debb8ebe052f14590c187340d) (cherry picked from commit 80f5636a8b67a3d6a5f330620541a39d4ef3fe6f) (cherry picked from commit a3e300d337a92bf1b593a0bb52b7ec4549910a21) (cherry picked from commit 860ad01f9658bba54cb3d59644e5e1a032c0bb3f) (cherry picked from commit d8b697b28a847950a1797da07fc0ae4c24928492) (cherry picked from commit 8a654e3271fd5721358812f961a7a7bb386d6726) (cherry picked from commit 2f776d2e7bf910271fcbd9697597f6f5478b0f30) (cherry picked from commit 14e64e6e4d763be830830801eeec1a6f17441688) (cherry picked from commit 4df9ec828d0034fdc76540ff0fe341e599b0f281) (cherry picked from commit e52968f) (cherry picked from commit 7214fc25013966f99ff4b2d506aa2f5f789e2113) (cherry picked from commit c6259ff79787c759c136086e1a54c9ead8e89539) (cherry picked from commit a58d9f271d27481615f0c94a828704c563d5354f) (cherry picked from commit dcf1cb6)
Squash-rebased #103698 segment onto the typed-actions tip on current main. Adds the tokenless /approve/{id} standalone approval UI served by the gateway control-UI router, gateway-store ephemeral login fix (selectGateway only on changed URL), and approval-page i18n strings. Drift reconciliation: union-merged i18n translation-memory caches and regenerated locale metadata via control-ui-i18n sync (33 approvalPage keys remain English fallbacks in minor locales, as on the original branch). (cherry picked from commit c82f56011bfe9f0debb8ebe052f14590c187340d) (cherry picked from commit 80f5636a8b67a3d6a5f330620541a39d4ef3fe6f) (cherry picked from commit a3e300d337a92bf1b593a0bb52b7ec4549910a21) (cherry picked from commit 860ad01f9658bba54cb3d59644e5e1a032c0bb3f) (cherry picked from commit d8b697b28a847950a1797da07fc0ae4c24928492) (cherry picked from commit 8a654e3271fd5721358812f961a7a7bb386d6726) (cherry picked from commit 2f776d2e7bf910271fcbd9697597f6f5478b0f30) (cherry picked from commit 14e64e6e4d763be830830801eeec1a6f17441688) (cherry picked from commit 4df9ec828d0034fdc76540ff0fe341e599b0f281) (cherry picked from commit e52968f) (cherry picked from commit 7214fc25013966f99ff4b2d506aa2f5f789e2113) (cherry picked from commit c6259ff79787c759c136086e1a54c9ead8e89539) (cherry picked from commit a58d9f271d27481615f0c94a828704c563d5354f) (cherry picked from commit dcf1cb6) (cherry picked from commit 7f72cbf)
7f72cbf to
1bf6791
Compare
1bf6791 to
115acda
Compare
|
Land-ready review complete on Improvements made before landing:
Proof:
The red |
|
Merged via squash.
|
Related: #103505
Stacked on #103679. Review this branch from
codex/approval-typed-actions.What Problem This Solves
Approval prompts currently require the operator to remain on the surface that raised them. Even after the durable approval registry and typed channel actions, OpenClaw has no stable, mobile-friendly document that can be opened directly and refreshed to recover canonical approval state.
Why This Change Was Made
This adds a standalone authenticated
${controlUiBasePath}/approve/{approvalId}Control UI document backed byapproval.getandapproval.resolve. The Gateway reserves the one-segment approval namespace before plugins and static-file heuristics, including asset-like IDs, and fails closed with 404 when Control UI serving is disabled.The document is bound to the Gateway that served it. It does not copy or overwrite the full app's saved remote-Gateway selection; URL/session authentication remains ephemeral until an operator explicitly confirms a different Gateway. Approval IDs are decoded once, credentials never enter the approval URL, and terminal state always comes from the SQLite-backed canonical record.
Resolution returns committed SQLite truth before best-effort channel, push, and legacy-event follow-up. A slow or failed secondary surface therefore cannot delay the winning response or replace its result.
User Impact
Operators can open a stable approval link on a phone or desktop, authenticate, inspect the sanitized command or plugin preview, and approve or deny. Concurrent answers show
Approved hereon the winner andResolved elsewherewith the recorded canonical decision on losers. Reload, reconnect, expiry, cancellation, malformed data, and unavailable approvals all fail closed without usable decision controls.Evidence
pnpm check:changedpassed every changed lane, structural guard, typecheck, core/extensions/scripts lint, and runtime import-cycle check in 4m51s (run).