Repository navigation
fix(ui): clarify permission changes apply to the next run - #126893
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 23, 2026, 12:26 PM ET / 16:26 UTC. ClawSweeper reviewWhat this changesThe PR adds a Control UI confirmation that a permission change made during an active run applies to the next run, with shared toast and transcript-anchor updates. Merge readinessKeep open. The Gateway lifecycle boundary is verified, but the prior P2 blocker remains: the picker does not expose the active-run scope before selection, while the notice appears only after saving. A maintainer should confirm the intended interaction contract. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe Control UI permission picker sends a session update to the Gateway. The Gateway stores that preference, and subsequent run admission copies it into the run’s permission policy without mutating an already admitted run. flowchart LR
A[Operator changes permissions] --> B[Control UI picker]
B --> C[Gateway session update]
C --> D[Saved session preference]
D --> E[Next run admission]
E --> F[Run permission policy]
G[Active run] --> H[Existing admitted policy]
Decision needed
Why: The PR deliberately skips the prior pre-selection recommendation, but the available public record does not establish that post-save-only disclosure is an approved product decision. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +203, Tests +95. Total +298 across 11 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: Show the next-run boundary inside the opened picker when a run is active, retain the toast as confirmation, and cover the pre-selection keyboard and touch path. Do we have a high-confidence way to reproduce the issue? Not applicable as a new interaction contract; current main source confirms that permission changes are persisted without a timing notice. Is this the best way to solve the issue? No: a post-save toast confirms the result but does not prevent an operator from selecting a mode under an incorrect active-run expectation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ae9a72a4fed4. 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
HistoryReview history (6 earlier review cycles)
|
360d86e to
3f482d0
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
bc58b55 to
0e11889
Compare
a56947c to
df590ad
Compare
|
Land-ready verification on head
|
|
Merged via squash.
|
…26893) * fix(ui): clarify permission changes apply to next run * fix(ui): show next-run permission toast * fix(ui): polish permission toast motion * fix(ui): match permission toast transitions * fix(ui): preserve global toast dismissal * fix(ui): stabilize widget disclosure geometry * fix(ui): preserve disclosure anchor geometry * fix(ui): preserve toast dismissal reason * fix(ui): defer disclosure reconciliation
What Problem This Solves
Operators can change a session permission mode while work is already running, but the UI did not explain when that change takes effect. The saved mode applies when the next run is admitted; it does not replace the permission context already owned by the active run.
Fixes #126888.
Why This Change Was Made
The permission picker remains compact and free of a persistent footer. After a successful permission change during an active run, the Control UI now shows one dismissible notice: “New permissions apply to the next run.” Idle-session changes remain silent.
The lifecycle boundary is explicit in current Codex: thread permission settings apply to subsequent turns (
codex-rs/app-server-protocol/src/protocol/v2/thread.rs:223-242), steering exposes no permission mutation (codex-rs/app-server-protocol/src/protocol/v2/turn.rs:175-197), and the active turn retains its existing context (codex-rs/core/src/session/turn_input.rs:129-137).The closeout also keeps virtualized transcript disclosures stable when a widget menu closes: the controller captures the interacted row before the top-layer menu changes geometry, then reconciles after the control queues its render.
User Impact
operator.admingates are unchanged.Evidence
Captured against the real Control UI
/chatroute with the repository mock Gateway. The flow asserted an active run, thesessions.patchrequest, the visible next-run notice, completion of the current run, a newchat.send, andWorkspaceselected for that next run. The final rebase preserved the UI diff and reran the focused proof on headdf590ad339f50f0ea563178bd9478ded3672e578.Desktop
Mobile
Full Flow
approval-mode-next-run-flow.mp4
Validation
OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui.config.ts ui/src/lib/toast.test.ts ui/src/pages/chat/chat-pane-session-controls.test.ts ui/src/lib/session-run-state.test.ts ui/src/pages/chat/components/chat-transcript-invalidation.test.ts ui/src/pages/chat/chat-view.test.ts ui/src/pages/chat/chat-send.test.ts— 563 passed on the rebased head.OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-transcript-disclosure-anchor.e2e.test.ts— 3/3 passed; full-file run passed three consecutive times after the ordering fix.OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/check-changed.mjs— passed, including formatting, typecheck, UI style lint, i18n, dead-export scan, and repository guards.mainfails the anchored exit assertion and both active-run notice cases for the intended missing behavior. The unrelated current-main model refresh assertion was excluded from that proof.codex --dangerously-bypass-approvals-and-sandbox review --base origin/mainconverged to zero actionable findings after fixing dismissal-reason preservation and capture/update ordering.Scope
Production: +222/-19 (net +203). Tests: +96/-1 (net +95). The production growth adds the reusable anchored toast presentation/lifecycle and carries exact disclosure geometry through the existing virtualizer owner; no fixture or demo code is included.
The latest ClawSweeper rank-up suggestion to restore a pre-selection picker note is intentionally skipped. The approved product behavior keeps the picker free of persistent explanatory copy and presents the timing boundary only after a successful mid-run change.