Skip to content

fix(ui): highlight inherited Full Access on initial load - #134732

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
fix/full-access-default-highlight
Sep 1, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
fix/full-access-default-highlight

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

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.
  • The inherited-Full-Access regression assertion failed against the pre-fix expression (expected true, received false) and passed after the fix.
  • Production LOC: +1/-1. Test LOC: +10/-1.
  • git diff --check passed.

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

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Sep 1, 2026
@Patrick-Erichsen
Patrick-Erichsen marked this pull request as ready for review September 1, 2026 03:29
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 1, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 11:36 PM ET / September 1, 2026, 03:36 UTC.

ClawSweeper review

What this changes

The 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 maintainer label and current CI is still running.

Priority: P3
Reviewed head: aa7f55f9acb47ec4d50a77b19fbb0b8a9023fafa

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, owner-local, source-proven rendering repair with focused regression coverage and no identified defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The PR body supplies before/after recordings from a mocked-Gateway fixture and focused test results; with the MEMBER association supplied in the repository state, the external-contributor proof gate does not apply. Those recordings remain useful supplemental visual evidence for the picker change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR body supplies before/after recordings from a mocked-Gateway fixture and focused test results; with the MEMBER association supplied in the repository state, the external-contributor proof gate does not apply. Those recordings remain useful supplemental visual evidence for the picker change.
Evidence reviewed 6 items Introduced owner-boundary fix: The PR changes the picker’s full-access styling predicate to use the effective mode, so an absent session override falls back to the supplied default.
Current-main manifestation: The fetched current-main version styles only an explicit mode === "full", although the displayed label already incorporates defaultMode; this is the source-level mismatch repaired by the PR.
Caller and sibling coverage: The chat pane passes the selected agent’s default into the picker, and the new-session page uses the same picker with its own default and absent override; locating the derivation in the shared component covers both without duplicating caller policy.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +9. Total +9 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 1 10 1 +9
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 11 2 +9

Review metrics

Metric Value Why it matters
Production versus test LOC production +1/-1 (net 0); tests +10/-1 (net +9) The bug fix is a net-neutral replacement in the rendering owner; added test assertions cover the previously unstyled inherited Full Access state.

Technical review

Best 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 defaultMode: "full" produces the Full Access label but the source-level styling predicate remains false; the focused table test encodes this exact deterministic input, though it was not executed in this read-only review.

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.

Labels

Label changes:

  • add P3: This is a narrow visual correctness repair with no demonstrated availability, security, session-state, or message-delivery impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR body supplies before/after recordings from a mocked-Gateway fixture and focused test results; with the MEMBER association supplied in the repository state, the external-contributor proof gate does not apply. Those recordings remain useful supplemental visual evidence for the picker change.

Label justifications:

  • P3: This is a narrow visual correctness repair with no demonstrated availability, security, session-state, or message-delivery impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR body supplies before/after recordings from a mocked-Gateway fixture and focused test results; with the MEMBER association supplied in the repository state, the external-contributor proof gate does not apply. Those recordings remain useful supplemental visual evidence for the picker change.

Evidence

What I checked:

Likely related people:

  • unknown: The blamed commit carries this line unchanged from a recorded parent; no introducing author is attributed. (role: carried-forward source line; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@Patrick-Erichsen
Patrick-Erichsen merged commit a005070 into main Sep 1, 2026
221 of 223 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the fix/full-access-default-highlight branch September 1, 2026 03:40
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant