Repository navigation
fix(ui): highlight inherited Full Access on initial load - #134732
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 11:36 PM ET / September 1, 2026, 03:36 UTC. ClawSweeper reviewWhat this changesThe PR makes the chat permission control highlight inherited Full Access immediately on initial load and adds regression assertions for inherited defaults. Merge readiness✅ Ready for maintainer review No introduced correctness or security defect was found. The PR remains open for normal maintainer handling because it carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe Control UI passes a session override and an agent default permission mode into the shared chat permission picker. The picker labels and styles the effective access level shown before a user changes it. flowchart LR
A[Session permission override] --> C[Chat permission picker]
B[Agent default permission] --> C
C --> D[Effective permission mode]
D --> E[Permission label]
D --> F[Full Access highlight]
E --> G[Chat composer]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +9. Total +9 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the effective-mode calculation in the shared picker, then land after exact-head CI and normal maintainer review complete. Do we have a high-confidence way to reproduce the issue? Yes. On current main, passing no session mode and Is this the best way to solve the issue? Yes. The shared picker owns the visual state and already receives both the override and default, so deriving the highlight from their effective value fixes the chat pane and new-session sibling without duplicating policy in callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 09a71580645f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Fixes an issue where users starting a session that inherits Full Access from the default saw a neutral permission pill on initial load, even though Full Access was effective. The highlighted color appeared only after choosing Full Access explicitly.
Why This Change Was Made
The permission picker now derives its highlighted state from the effective permission mode (
mode ?? defaultMode) while preserving the applying-state behavior. Regression coverage exercises every inherited default and verifies that only inherited Full Access receives the highlighted styling.User Impact
The permission pill now immediately communicates that Full Access is active, including before the user interacts with the picker.
Evidence
Before — inherited Full Access is neutral on initial load
full-access-default-before.mp4
After — inherited Full Access is highlighted immediately
full-access-default-after.mp4
Both recordings use the same deterministic mocked-Gateway fixture; only the pre-fix and fixed code differ.
node scripts/run-vitest.mjs ui/src/pages/chat/chat-pane-session-controls.test.ts— 23/23 tests passed.node scripts/check-changed.mjs -- ui/src/pages/chat/components/chat-permission-picker.ts ui/src/pages/chat/chat-pane-session-controls.test.ts— passed the UI and core-test changed-file gates.expected true, received false) and passed after the fix.git diff --checkpassed.Automated autoreview did not return a verdict: the isolated Codex reviewer received HTTP 401, and the supported Claude fallback was not logged in. No automated-review success is claimed; the complete diff was reviewed manually.
Worked on by