feat(settings): nudge when runtime permissions aren't all granted#120
Merged
Conversation
Surface missing Accessibility / Automation / Notifications grants the same way updates are surfaced: an orange dot on the Settings tab and a keyboard-navigable banner pinned above the Settings sections that opens the Permissions window. Both denied and not-yet-determined count as missing. Refreshed on launch and every Settings open so the nudge clears once the user grants and returns. Also fixes updateRow's hardcoded index-0 assumption so it survives the permissions row sitting above it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
hiskudin
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a runtime grant (Accessibility, Automation → System Events, or Notifications) isn't set, StackNudge silently loses core behaviour — no banner, no window focus, no Enter-to-approve keystroke — with nothing in the panel to say why. The only way to notice was to open Settings → Check permissions… and look.
Changes
Surfaces missing permissions the same way updates already are — an at-a-glance dot plus a pinned banner:
tab()now takesdotColor: Color?instead ofdot: Bool; the Settings tab shows orange when a grant is missing, the existing accent dot when only an update is pending (permissions win the colour — they're more urgent).permissionsRow()banner pinned above the Settings sections when any grant is missing. Lists which ones (e.g. "Accessibility, Automation") and, like the update row, is keyboard-navigable — selecting + Enter (or a click) opens the Permissions window.PanelNav:missingPermissions: [SettingsPane]andrefreshPermissions()(Accessibility/Automation probed sync, Notifications async). Both denied and not-yet-determined count as missing. Refreshed on launch and on every Settings open, so the dot + banner clear once the user grants and comes back.updateRowhardcoded.id(0)/selectedSettingIndex = 0, assuming it was always the first row. Now usesnav.index(of: .update)so it survives the permissions row sitting above it.Testing
swiftc -typecheck panel/*.swift shared/*.swift— clean.test_permissionsRow_prependedWhenMissingandtest_permissionsRow_sitsAboveUpdate_whenBothPresenttoSettingsRowTests.Follow-ups (not in this PR)
🤖 Generated with Claude Code