Skip to content

fix: request missing macOS permissions and simplify permission status - #153263

Merged
steipete merged 9 commits into
mainfrom
openclaw/debug-why-if-i-click-on-permissions-this-app-is-not-showing-up
Sep 20, 2026
Merged

steipete merged 9 commits into
mainfrom
openclaw/debug-why-if-i-click-on-permissions-this-app-is-not-showing-up

Conversation

@steipete

@steipete steipete commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes OpenClaw being absent from macOS Screen Recording settings after clicking its permission action, and makes the Permissions page easier to scan without colored status dots.

User Impact

Grant now requests access for ungranted macOS permissions. The unused Automation (Terminal) setting and its native permission probe are removed. Screen Recording and Accessibility also retain an explicit System Settings recovery action; confirmed denials still open System Settings. The approved Quiet text design uses neutral labels, a small checkmark for granted access, and aligned action buttons on desktop and narrow layouts.

No permission grants are changed automatically, and no migration or manual reset is required.

Why This Change Was Made

macOS's binary permission checks cannot distinguish a first request from a prior denial. Mapping every missing grant to denied skipped the native request and opened a settings pane with no app entry. Preserve requestable states using the existing notDetermined wire value, which shipped Gateway dashboards understand. Keep explicit iOS denial handling unchanged. New dashboards accept and discard the retired automation entry from shipped native apps at the input boundary, without restoring its row or command.

Evidence

  • 69 focused UI/bridge tests pass, including request dispatch, grant refresh, and iOS denied/limited states.
  • Native app and test bundle build passed; all 7 sandboxed permission-contract tests passed for the unchanged native patch.
  • Actual Control UI with synthetic native bridge and mock Gateway: inspected light/dark desktop, 390px Mac, and iOS layouts; no horizontal overflow. Verified Screen Recording/Accessibility Grant and denied Camera Open System Settings dispatch the right native messages. The earlier capture included the now-removed Terminal row; updated removal evidence is below.
  • Independent P0–P2 review: no actionable findings.
  • Repository checks passed for the permission repair; incremental formatting, UI typechecking, dead-export, and style/lint checks passed for the final design. Exact-head hosted CI must pass before landing; see the validation status below.
  • The original redesign screenshots below use real components with a synthetic native bridge. Separate signed-app evidence from Megaclaw is recorded below; the installed OpenClaw app is unchanged.

Before

Visual baseline, with the permission-state fix already applied:

Permissions before: colored dots and uneven action columns

After

Permissions after: quiet text, granted checkmarks, aligned actions

Narrow layout

Permissions after at 390 pixels

CI follow-up

The first CI run exposed an unrelated transcript fixture startup race: a one-second polling deadline expired before the shared SQLite worker reached provider startup. The fixture now awaits its existing provider event while retaining exact-once, routed ownership, status, and summary assertions. A temporary 1.1-second worker delay reproduced both failures before the repair and passed both afterward; that diagnostic delay is not part of the patch. All 19 transcript tests, targeted lint/typechecks, and fresh independent review pass.

The same run also reported a Chromium page crash during a chat context-menu right-click, without a crash dump. All nine unchanged chat-action browser tests pass locally. No retry logic, timeout increases, skipped tests, or weaker assertions were added. The updated head requires fresh hosted CI.

Additional CI investigation

The rebased main context exposed a responsive-layout test defect: inline button baseline offsets (0.34375 pixels) were rounded into two rows even though the flex items shared one row. Row classification now measures the actual layout item; button touch size, viewport containment, and overlap assertions remain unchanged. The original failure reproduces, all five repaired cases pass, and a deliberate extra-row mutation still fails. Independent P0–P2 review and targeted lint pass. No production layout change is included.

Shared-worker fixture follow-up

The next CI run exposed another unrelated fixture isolation failure: a preceding test initialized a process-global worker owner whose captured transport survived module reset and bypassed the cleanup test's mock. The fixture now mocks its immediate cleanup-store opening boundary, retaining every schema-policy and close assertion. The original fails and the repair passes in the same pinned predecessor order (4 tests). Deliberately removing production context forwarding still fails both policy observations; that diagnostic mutation was restored. The final cleanup test and two real shared-worker schema tests, targeted lint/typechecks, and independent P0–P2 review all pass. No production change, skipped test, or retry was added.

Signed macOS proof (Megaclaw)

  • Developer ID-signed task bundle ai.openclaw.mac.pr153263.debug, built from 7478002a92c08fb93d8ab0c93c1bb11115ab3ee8, passed deep/strict signature verification on Megaclaw. It runs at a fixed separate path with task-owned profile/state and a loopback Gateway; the installed app is preserved. No Studio was used for the permission flow.
  • Actual Dashboard → Settings → Permissions initially showed Screen Recording Not granted / Grant. Clicking Grant produced a non-preflight kTCCServiceScreenCapture request attributed to this signed bundle. macOS then added OpenClaw-Permissions-153263 to Screen & System Audio Recording; the entry was absent beforehand.
  • Enabling that task entry reaches the standard macOS authentication sheet. Authentication has not completed, so granted status and granted-state refresh are not claimed. Explicit denial/retry remains unverified; an ungranted request and successful registration are verified.
  • The signed source is not whole-tree identical to the subsequently integrated main. The Screen Recording and Accessibility request implementations and request dispatch remain unchanged. The mapping now uses the shipped five-state vocabulary, the Terminal path is removed, and the current page adds explicit Settings recovery; these later edits have separate contract/UI proof below. Inherited surrounding changes include Dashboard initial refresh, Chrome-status bridge additions, and debug-extras gating.

Signed app before Grant: Screen Recording is Not granted

Registered test entry in macOS; enabling it is awaiting authentication

Latest CI recovery

The Gateway lifecycle fixture used a single ephemeral port even though startup claims five derived ports. A deterministic same-order witness reproduced the claimed-port failure. It now uses the existing block-aware test allocator; production code and assertions are unchanged, and all eight lifecycle cases pass.

The palette fixture raced the legitimate debounced search at 59 characters. Both viewports reproduced the extra request under the valid interleaving. Main landed an equivalent repair while this work was in progress; the real merge conflict was resolved using main's canonical palette file unchanged. Integrated Gateway, palette, native-bridge, and device-page proof passes 96 tests, selected repository checks pass, and independent P0–P2 fixture review is clean.

Current landing validation

  • Actual v2026.9.5 decoder and native fixture reproduce both pre-fix mixed-version failures. Six diagnostic cells verify the repaired input boundary in both upgrade directions, snapshot update events, and exact request-permission dispatch. This is real decoder boundary proof, not a live mixed-version app claim.
  • Current native-bridge and device-page suites pass 75 tests, including retired-entry filtering, request dispatch, explicit Settings recovery, granted-state UI refresh, and unchanged iOS behavior.
  • The submenu fixture now waits for actionability before taking pointer coordinates. Replaying an early frame of its real opening animation reproduced the prior header failure; the same schedule passes after repair, and the uninstrumented full suite passes 10/10. No timeout, retry, or assertion relaxation.
  • A test added after the prepared-runtime factory moved still imported its retired owner. It now imports the existing lifecycle owner; all four focused cases and the canonical agents-root typecheck pass. No production alias was restored.
  • The regenerated native inventory contains only the revised Automation usage sentence. Native i18n verification and all 19 Apple localization tooling cases pass; the exact Mac fixture no longer expects the removed Terminal entry.
  • Historical head 10dea8e macOS CI ran 1,794 tests with one issue: that exact stale fixture. Earlier presence failures did not recur. Its UI11 job also passed. The known native-i18n/tooling failures share the corrected inventory cause, and core-types/Node12 share the corrected import cause. Fresh exact-head CI is still required after publication.
  • Signed macOS initial request and registration are proven as above. Authentication-dependent granted-state refresh and explicit TCC denial/retry remain unverified. An explicit Settings route is retained rather than relying on an unverified repeated prompt.
  • Inspected before/after recovery screenshots are attached in chat and render in GitHub. Real Control UI, synthetic native bridge: desktop light/dark and narrow layouts; Grant and Settings dispatch independently.

Current head: e146f0006e08e2a71f790e5b92b87c9f02ff9158. Fresh independent P0–P2 review passed with no actionable findings. All 108 focused tests, six mixed-version diagnostic cells, UI types/i18n/stylelint, native i18n, and canonical macOS lint pass. All 24 selected repository checks passed, and exact-head CI completed successfully, including macOS Swift tests and iOS smoke. Required CI and dependency-review gates are green. Native preparation and merge completed successfully. Landed as 0a0909158896573253978ddcbb4eb9d0b901cc7c; remote main ancestry verified.

Remove unused Terminal permission

The Terminal-specific permission had no feature callers beyond its own probe and settings wiring. Removed the row, native owner, bridge enum, and obsolete tests; updated the shared iOS switch and fixtures. Generic Apple Events signing support remains because approved native-host commands can control other apps (for example the Apple Notes skill). No existing OS grants or operator settings are modified.

Focused UI tests: 74 passed. UI typecheck, i18n verification, Swift formatting and canonical macOS lint passed. Independent P0–P2 review is scoped-clean. The local native build stalled in a filesystem atomic rename before compilation; it is not a compiler-failure result. Exact-head hosted macOS Swift CI subsequently passed; interactive grant/denial limitations remain as stated above. These screenshots use the real Control UI with a synthetic native bridge.

Before

Unused Terminal permission before removal

After

Seven used Mac permissions after removing Terminal

@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 19, 2026 23:45
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui size: S maintainer Maintainer-authored PR agents Agent runtime and tooling labels Sep 19, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 2:55 AM ET / 06:55 UTC (Revision 9).

ClawSweeper review

What this changes

The PR restores macOS permission requests, simplifies permission presentation, removes the unused Terminal permission, preserves mixed-version settings compatibility, and repairs validation fixtures.

Merge readiness

✅ Ready for maintainer review

The fix remains necessary on current main. Both prior compatibility blockers are resolved, and this review found no additional actionable defects.

Priority: P2
Reviewed head: e146f0006e08e2a71f790e5b92b87c9f02ff9158

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with sufficient registration evidence and both earlier compatibility defects addressed.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Signed-app observations and inspected screenshots demonstrate Grant reaching the existing native request owner and registering the app in macOS Screen Recording settings. Updated UI captures show removal and explicit recovery; reported decoder checks supplement upgrade coverage. Completed native authorization and denial/retry remain outside the demonstrated scope.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Signed-app observations and inspected screenshots demonstrate Grant reaching the existing native request owner and registering the app in macOS Screen Recording settings. Updated UI captures show removal and explicit recovery; reported decoder checks supplement upgrade coverage. Completed native authorization and denial/retry remain outside the demonstrated scope.
Evidence reviewed 9 items Current main still needs the repair: Current main maps missing binary grants to denied, while its Permissions page sends denied states directly to System Settings instead of requesting access.
Released contract checked: The v2026.9.5 decoder accepts notDetermined among its five permission statuses and includes automation among permission identities. These are the two released contracts implicated by the previous findings.
Both previous findings resolved: The latest commit replaces the proposed new wire statuses with shipped values and accepts then removes legacy automation entries during snapshot parsing. Added coverage checks initial snapshots, update events, request dispatch, and removal of retired command types.
Findings None None.
Security None None.

How this fits together

The native Mac app reads operating-system permissions and sends their status to the Gateway-hosted Settings page. User actions return through the native bridge to request permission or open System Settings.

flowchart LR
  A[macOS permission state] --> B[Native permission owner]
  B --> C[Settings snapshot]
  C --> D[Dashboard Permissions page]
  D --> E{User action}
  E -->|Grant| F[Native permission request]
  E -->|Settings| G[System Settings]
  F --> A
  G --> A
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +54, Tests +71, Docs +6, Other -357. Total -226 across 31 files.

View PR surface stats
Area Files Added Removed Net
Source 4 75 21 +54
Tests 7 90 19 +71
Docs 2 8 2 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 18 17 374 -357
Total 31 190 416 -226

Review metrics

Metric Value Why it matters
Released bridge compatibility 5 wire statuses retained; 1 retired input entry filtered Both upgrade directions now preserve the released permission snapshot contract.

Technical review

Best possible solution:

Keep permission requests with the existing native owner, preserve shipped snapshot vocabulary, and provide explicit in-product System Settings recovery.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: an ungranted binary permission becomes denied on current main, causing the page to open Settings without requesting registration; this review did not execute macOS.

Is this the best way to solve the issue?

Yes. Correcting the native status mapping reuses existing request dispatch, while input-only legacy filtering resolves compatibility without restoring the retired feature.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 025b994448d8.

Labels

Label justifications:

  • P2: This repairs a bounded macOS permission-request workflow and its settings presentation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Signed-app observations and inspected screenshots demonstrate Grant reaching the existing native request owner and registering the app in macOS Screen Recording settings. Updated UI captures show removal and explicit recovery; reported decoder checks supplement upgrade coverage. Completed native authorization and denial/retry remain outside the demonstrated scope.
  • proof: sufficient: Contributor real behavior proof is sufficient. Signed-app observations and inspected screenshots demonstrate Grant reaching the existing native request owner and registering the app in macOS Screen Recording settings. Updated UI captures show removal and explicit recovery; reported decoder checks supplement upgrade coverage. Completed native authorization and denial/retry remain outside the demonstrated scope.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Signed-app observations and inspected screenshots demonstrate Grant reaching the existing native request owner and registering the app in macOS Screen Recording settings. Updated UI captures show removal and explicit recovery; reported decoder checks supplement upgrade coverage. Completed native authorization and denial/retry remain outside the demonstrated scope.

Evidence

What I checked:

  • Current main still needs the repair: Current main maps missing binary grants to denied, while its Permissions page sends denied states directly to System Settings instead of requesting access. (apps/macos/Sources/OpenClaw/DeviceSettingsPermissions.swift:29, 025b994448d8)
  • Released contract checked: The v2026.9.5 decoder accepts notDetermined among its five permission statuses and includes automation among permission identities. These are the two released contracts implicated by the previous findings. (ui/src/app/native-device-settings.ts:83, ec9c1a13db89)
  • Both previous findings resolved: The latest commit replaces the proposed new wire statuses with shipped values and accepts then removes legacy automation entries during snapshot parsing. Added coverage checks initial snapshots, update events, request dispatch, and removal of retired command types. (ui/src/app/native-device-settings.ts:79, e146f0006e08)
  • Existing native request owner retained: PermissionManager still requests Screen Recording through its existing permission service and Accessibility through the existing operating-system prompt. The signed-proof revision has the same request implementations; native bridge request dispatch also remains equivalent. (apps/macos/Sources/OpenClaw/PermissionManager.swift:108, 7478002a92c0)
  • Signed native registration proof: The captured PR body records a Developer ID-signed isolated Mac app producing a ScreenCapture request after Grant. Inspected the prepared native screenshot and the linked macOS entry image, which visibly shows the task app registered. Completed authorization, native granted-state refresh, and explicit denial/retry are expressly unclaimed. (7478002a92c0)
  • Updated recovery screenshots inspected: Inspected original desktop/narrow captures and the later before/after recovery images. The final screenshot visibly retains separate Grant and Open System Settings actions for Accessibility and Screen Recording, with the Terminal row removed. The discussion identifies these as real UI components using a synthetic native bridge. (ui/src/pages/device/permissions-page.ts:48, e146f0006e08)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

History

Review history (8 earlier review cycles)
  • reviewed 2026-09-20T00:06:33.313Z sha a60d6e8 :: blocked before merge. :: none
  • reviewed 2026-09-20T00:35:10.940Z sha acc689d :: blocked before merge. :: none
  • reviewed 2026-09-20T00:54:43.055Z sha 668b925 :: blocked before merge. :: none
  • reviewed 2026-09-20T03:36:21.680Z sha bcd9d2e :: blocked before merge. :: none
  • reviewed 2026-09-20T03:55:03.235Z sha 3fa2d97 :: blocked before merge. :: none
  • reviewed 2026-09-20T04:10:39.061Z sha 3fa2d97 :: blocked before merge. :: none
  • reviewed 2026-09-20T06:18:16.742Z sha 1c7b770 :: blocked before merge. :: [P1] Preserve status values understood by shipped Gateway UIs
  • reviewed 2026-09-20T06:36:31.091Z sha 10dea8e :: blocked before merge. :: [P1] Preserve status values understood by shipped Gateway UIs | [P1] Accept legacy automation entries from released Mac apps

@steipete
steipete force-pushed the openclaw/debug-why-if-i-click-on-permissions-this-app-is-not-showing-up branch from a60d6e8 to acc689d Compare September 20, 2026 00:27
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 20, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 20, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Sep 20, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 20, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios size: L and removed size: S labels Sep 20, 2026
@steipete steipete self-assigned this Sep 20, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Permission recovery UI — landing repair in validation

The Terminal permission remains removed. The updated page retains an explicit Open System Settings action alongside Grant for binary macOS Screen Recording and Accessibility states. These are mocked native-bridge captures, not additional TCC grant proof. Browser assertions verified both distinct native messages and no horizontal overflow at desktop and 390px widths.

Before recovery action:

Before recovery action

After recovery action (working candidate; source review and tests in progress):

Permissions with explicit recovery

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Sep 20, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 20, 2026
@steipete
steipete merged commit 0a09091 into main Sep 20, 2026
208 checks passed
@steipete
steipete deleted the openclaw/debug-why-if-i-click-on-permissions-this-app-is-not-showing-up branch September 20, 2026 07:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
…openclaw#153263)

* fix: request missing macOS permissions and simplify permission status

* test: await routed transcript startup event

* test: measure responsive selector layout rows

* test: isolate retired-agent cleanup fixture

* test: settle palette searches and allocate Gateway port blocks

* fix(macos): remove unused Terminal automation permission

* fix(macos): preserve permission compatibility and recovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: ios App: ios app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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