Skip to content

feat(desktop): calm the Permissions settings page - #11525

Merged
Git-on-my-level merged 5 commits into
mainfrom
fix/permissions-settings-ux
Aug 13, 2026
Merged

Git-on-my-level merged 5 commits into
mainfrom
fix/permissions-settings-ux

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The Permissions settings page is now a calm destination: a plain Permissions title, a success banner at the top when everything is granted, and compact granted rows instead of empty dropdowns.
  • Missing grants stay as always-open action cards with a single Not Granted chip. The settings row uses a lock, with an orange mark beside the label only while something is missing.
  • Permissions sits with the other access settings (after Notifications & Privacy). System audio is a capability to grant, not a recording-mode setting.

Test plan

  • Open Settings → Permissions with at least one missing grant: title is Permissions, no subtitle, no warning glyph on the page; orange mark sits immediately after the sidebar label.
  • Grant the missing access and return: the mark disappears, the success banner appears, and granted rows are a compact list with Granted chips.
  • Confirm sidebar order: General, Account & Plan, Transcription, Rewind, Floating Bar, Notifications & Privacy, Permissions, Shortcuts, Advanced, About.
  • VoiceOver on the Permissions row while grants are missing reads "Permissions, permissions required".

Verification

  • Focused Swift tests: PermissionsPagePresentationTests, SettingsSidebarItemLayoutTests, FailLoudConfigTests/testPermissionsPageSurfacesSystemAudioRow, and the settings reachability checks in TopNavigationBarLayoutTests.
  • Exercised the live path in named bundle /Applications/omi-permissions-ux.app (com.omi.omi-permissions-ux) with OMI_AUTOMATION_PORT=47852 ./scripts/omi-ctl navigate settings permissions.
  • make preflight passed (20 local checks).

Made with Cursor

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 13 files

Confidence score: 3/5

  • In desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPageChrome.swift, the Screen Recording state can be shown as fully granted while capture still requires a relaunch, which risks users getting stuck with a non-working setup flow—use screenRecordingNeedsRelaunch in the granted-state branch so the UI reflects the restart requirement.
  • In desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPage.swift, notification authorization and alert-style handling are out of sync with the sidebar logic, so users can see conflicting permission status between views—include banner visibility in the notification action flow so both surfaces compute the same state.
  • In desktop/macos/e2e/flows/screen-recording-permission.yaml, the covers: metadata names PermissionsPageChrome.swift even though the flow never navigates there, which can create a false sense of end-to-end coverage—either update navigation to exercise that page or narrow the declared coverage.
  • In desktop/macos/Desktop/Tests/SettingsSidebarItemLayoutTests.swift, the notice-layout assertion is confounded by a simultaneous selection-state change, so regressions in notice width can be masked—keep selection constant between fixtures to isolate and verify the notice effect.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="desktop/macos/e2e/flows/screen-recording-permission.yaml">

<violation number="1" location="desktop/macos/e2e/flows/screen-recording-permission.yaml:13">
P3: `PermissionsPageChrome.swift` is listed under this flow's `covers:`, but every step only visits the Rewind page, the Rewind settings gear, a screen-recording section inside Settings, and the Dashboard — none navigate to the Permissions settings sidebar page, which is the sole surface that uses `PermissionsPageChrome` (via `PermissionsPage`). This is unexercised/fake coverage; per the repo convention (AGENTS.md: "Don't expand covers: lists as fake coverage") and prior feedback on coverage claims, only list a file in a flow that actually exercises its path.</violation>
</file>

<file name="desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPageChrome.swift">

<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPageChrome.swift:39">
P1: When Screen Recording is granted while Omi is still running, this returns `false` and the page renders a compact Granted row even though capture remains unusable until relaunch. Use `screenRecordingNeedsRelaunch` at the page/policy boundary instead of the deprecated `isScreenRecordingStale` flag, so the row keeps the recovery action until the new grant is active.</violation>
</file>

<file name="desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPage.swift">

<violation number="1" location="desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPage.swift:22">
P2: When notifications are authorized but their alert style is `None`, the sidebar still reports a missing permission while this page shows a Granted row. Include the banner-visibility state in the notification action flow and render the System Settings recovery instructions for it.</violation>
</file>

<file name="desktop/macos/Desktop/Tests/SettingsSidebarItemLayoutTests.swift">

<violation number="1" location="desktop/macos/Desktop/Tests/SettingsSidebarItemLayoutTests.swift:79">
P3: This test compares `noticed` (isSelected: true, with notice) against `plain` (isSelected: false, without notice), so it does not isolate the effect of the notice. Selection changes the font weight/width and therefore the row height, so an apples-to-oranges mismatch could either be masked (selection adds height that hides a wrap) or produce a false pass. Build both rows with the same selection state — the selected row is where the notice actually renders — so the only differing variable is `showsMissingPermissionNotice`.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

static func microphoneNeedsAction(granted: Bool) -> Bool { !granted }

static func screenRecordingNeedsAction(granted: Bool, stale: Bool) -> Bool {
!granted || stale

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: When Screen Recording is granted while Omi is still running, this returns false and the page renders a compact Granted row even though capture remains unusable until relaunch. Use screenRecordingNeedsRelaunch at the page/policy boundary instead of the deprecated isScreenRecordingStale flag, so the row keeps the recovery action until the new grant is active.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPageChrome.swift, line 39:

<comment>When Screen Recording is granted while Omi is still running, this returns `false` and the page renders a compact Granted row even though capture remains unusable until relaunch. Use `screenRecordingNeedsRelaunch` at the page/policy boundary instead of the deprecated `isScreenRecordingStale` flag, so the row keeps the recovery action until the new grant is active.</comment>

<file context>
@@ -0,0 +1,52 @@
+  static func microphoneNeedsAction(granted: Bool) -> Bool { !granted }
+
+  static func screenRecordingNeedsAction(granted: Bool, stale: Bool) -> Bool {
+    !granted || stale
+  }
+
</file context>

}

private var notificationsNeedAction: Bool {
PermissionsPageChrome.notificationsNeedAction(granted: appState.hasNotificationPermission)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When notifications are authorized but their alert style is None, the sidebar still reports a missing permission while this page shows a Granted row. Include the banner-visibility state in the notification action flow and render the System Settings recovery instructions for it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPage.swift, line 22:

<comment>When notifications are authorized but their alert style is `None`, the sidebar still reports a missing permission while this page shows a Granted row. Include the banner-visibility state in the notification action flow and render the System Settings recovery instructions for it.</comment>

<file context>
@@ -6,65 +6,73 @@ import SwiftUI
+  }
+
+  private var notificationsNeedAction: Bool {
+    PermissionsPageChrome.notificationsNeedAction(granted: appState.hasNotificationPermission)
+  }
+
</file context>

- desktop/macos/Desktop/Sources/ScreenRecordingPermissionPolicy.swift
- desktop/macos/Desktop/Sources/Onboarding/PermissionDragGuidance.swift
- desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPage.swift
- desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPageChrome.swift

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: PermissionsPageChrome.swift is listed under this flow's covers:, but every step only visits the Rewind page, the Rewind settings gear, a screen-recording section inside Settings, and the Dashboard — none navigate to the Permissions settings sidebar page, which is the sole surface that uses PermissionsPageChrome (via PermissionsPage). This is unexercised/fake coverage; per the repo convention (AGENTS.md: "Don't expand covers: lists as fake coverage") and prior feedback on coverage claims, only list a file in a flow that actually exercises its path.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/e2e/flows/screen-recording-permission.yaml, line 13:

<comment>`PermissionsPageChrome.swift` is listed under this flow's `covers:`, but every step only visits the Rewind page, the Rewind settings gear, a screen-recording section inside Settings, and the Dashboard — none navigate to the Permissions settings sidebar page, which is the sole surface that uses `PermissionsPageChrome` (via `PermissionsPage`). This is unexercised/fake coverage; per the repo convention (AGENTS.md: "Don't expand covers: lists as fake coverage") and prior feedback on coverage claims, only list a file in a flow that actually exercises its path.</comment>

<file context>
@@ -10,6 +10,7 @@ covers:
   - desktop/macos/Desktop/Sources/ScreenRecordingPermissionPolicy.swift
   - desktop/macos/Desktop/Sources/Onboarding/PermissionDragGuidance.swift
   - desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPage.swift
+  - desktop/macos/Desktop/Sources/MainWindow/Pages/PermissionsPageChrome.swift
   - desktop/macos/Desktop/Sources/AppState/AppState+SystemActions.swift
   - desktop/macos/Desktop/Sources/AppState/AppState+Permissions.swift
</file context>


func testPermissionsRowWithMissingNoticeStaysOnOneLine() {
let plain = itemHeight(section: .permissions, isSelected: false, showsMissingPermissionNotice: false)
let noticed = itemHeight(section: .permissions, isSelected: true, showsMissingPermissionNotice: true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This test compares noticed (isSelected: true, with notice) against plain (isSelected: false, without notice), so it does not isolate the effect of the notice. Selection changes the font weight/width and therefore the row height, so an apples-to-oranges mismatch could either be masked (selection adds height that hides a wrap) or produce a false pass. Build both rows with the same selection state — the selected row is where the notice actually renders — so the only differing variable is showsMissingPermissionNotice.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Tests/SettingsSidebarItemLayoutTests.swift, line 79:

<comment>This test compares `noticed` (isSelected: true, with notice) against `plain` (isSelected: false, without notice), so it does not isolate the effect of the notice. Selection changes the font weight/width and therefore the row height, so an apples-to-oranges mismatch could either be masked (selection adds height that hides a wrap) or produce a false pass. Build both rows with the same selection state — the selected row is where the notice actually renders — so the only differing variable is `showsMissingPermissionNotice`.</comment>

<file context>
@@ -74,12 +74,30 @@ final class SettingsSidebarItemLayoutTests: XCTestCase {
 
+  func testPermissionsRowWithMissingNoticeStaysOnOneLine() {
+    let plain = itemHeight(section: .permissions, isSelected: false, showsMissingPermissionNotice: false)
+    let noticed = itemHeight(section: .permissions, isSelected: true, showsMissingPermissionNotice: true)
+    XCTAssertEqual(
+      noticed, plain, accuracy: 0.5,
</file context>

Git-on-my-level and others added 5 commits August 13, 2026 18:09
The page always looked like an incident. Granted access is now a compact list, the nav uses a lock with a mark only while something is missing, and Permissions sits with the other access settings.

Co-authored-by: Cursor <[email protected]>
Thread appState into the settings sidebar without adding a line the oversized-file freeze would reject.

Co-authored-by: Cursor <[email protected]>
The settings-sidebar appState thread landed without growing the file, so the oversized-file freeze has to follow it down.

Co-authored-by: Cursor <[email protected]>
…flow

The presentation policy lives in its own file now, and the e2e coverage check requires a flow to name it.

Co-authored-by: Cursor <[email protected]>
A clone-local user.email minted PR commits as Ratchet Test, so GitHub could not attribute them. Fail those identities at commit and preflight time.

Co-authored-by: Cursor <[email protected]>
@Git-on-my-level
Git-on-my-level force-pushed the fix/permissions-settings-ux branch from 4316db1 to e729e44 Compare August 13, 2026 22:12
@Git-on-my-level
Git-on-my-level merged commit 2d6b4ec into main Aug 13, 2026
28 of 29 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/permissions-settings-ux branch August 13, 2026 22:17
Git-on-my-level added a commit that referenced this pull request Aug 26, 2026
* fix(repo): reject Git identities that can never be attributed

PR #12239 was authored entirely by `r <r@r>` from a stale clone-local
`user.email`. This guard ran on every one of those commits — 66 over five days —
and printed "OK: Git author identity is not a test fixture" each time.

It was enumerating the previous incident rather than the invariant. After
#11525 minted `Ratchet Test <[email protected]>`, the check learned
that exact display name, that exact local-part, and three reserved TLDs. `r@r`
is none of those, so it passed: `email_tld("r@r")` returns `"r"`, because the
domain has no dot to split on.

The rule is now the property that makes an identity wrong. An address whose
domain cannot resolve can never be delivered or attributed to anyone, whatever
it is called. That single predicate covers both incidents and the family they
belong to, and it needs no allowlist to maintain.

`failures_for` already applied its predicate to clone-local config as well as to
the commit range, so one change covers every lane at once:

- pre-commit (`--pending`) rejects the override before a commit is minted
- the local lane of `git-author-identity` rejects it again before push
- the CI lane never sees a developer's `.git/config`, so the commit range is the
  only unbypassable place this can be caught — and it now is

Real addresses, including `users.noreply.github.com`, are untouched; a
name-only identity carries an empty email and is not judged on it.

The report wording said "test fixture", which is exactly what let a non-fixture
bad identity read as a pass. It now says unattributable.

Co-Authored-By: Claude Opus 5 <[email protected]>

* feat(failure-classes): add FC-guard-encodes-incident-literals

The class this PR's fix belongs to, and the reason it took a second incident to
notice: a guard written after an incident encoded that incident's literal values
instead of the property that made it wrong, so the next instance passed while
the check reported success.

evidence_prs is empty because this PR is the first instance; the adding commit
is the evidence.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant