Skip to content
This repository was archived by the owner on Oct 17, 2026. It is now read-only.

feat(settings): preview the panel and warn about shortcut clashes - #11

Merged
oddurs merged 1 commit into
mainfrom
feat/settings-preview
Oct 17, 2026
Merged

oddurs merged 1 commit into
mainfrom
feat/settings-preview

Conversation

@oddurs

@oddurs oddurs commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Problem

  • Changing theme, size, translucency, or the number of results in Settings showed nothing until you closed Settings and opened the panel.
  • A shortcut another app already held failed silently. On this Mac Alfred holds ⌘Space; a throwaway RegisterEventHotKey(⌘Space) returned noErr anyway. Both apps register, only one opens, and Common Command's "Another app already uses this shortcut" message never appears.
  • VoiceOver users heard nothing as the selection moved.

Approach

  • Preview. Settings opens with the real panel's views (PanelContent, FieldView, CardView) on a second SearchModel searching "s", scaled to fit by giving the view smaller bounds than frame. It follows theme, size, translucency, and visible rows live, and takes no input.
  • Clashes. Conflicts (CommandKit, tested) reads Spotlight's shortcuts from com.apple.symbolichotkeys (ids 64 and 65, enabled only) and Alfred's from the hotkey plist that ~/Library/Application Support/Alfred/prefs.json points to (so a synced preferences folder is followed). Settings shows an orange warning naming the other app and where to change it; the menu bar menu shows "⌘Space also opens Alfred". When ⌘Space belongs to someone else, Settings says who, instead of the old generic Spotlight tip.
  • VoiceOver. The selected result is announced as it changes, by key or because typing changed the top result: title, subtitle, and section.
  • --snapshot … --settings renders the Settings window offscreen for review.

Look at sceptically

  • Reading another app's preferences is not an API contract. Unknown shapes produce no warning, never a crash, but a future Alfred could move its hotkey.
  • Only Spotlight and Alfred are recognised. Raycast keeps its hotkey in its own store and I can't check its format here without it installed.
  • The preview's glass and its scaling were reviewed offscreen with solid surfaces only.
  • VoiceOver announcements haven't been heard with VoiceOver running.

Checklist

  • scripts/task check passes locally
  • Tests for reading both shortcut stores and naming the holder
  • Settings reviewed offscreen in light and dark, with and without a clash

Changing the theme or size in Settings meant closing Settings to see the result. Worse, recording a shortcut that Alfred or Spotlight already holds failed silently: RegisterEventHotKey accepted ⌘Space while Alfred held it, so only one app opened and nothing said why. Settings now shows the real panel as a preview, and reads Spotlight's and Alfred's shortcuts to name a clash and where to fix it.
@oddurs
oddurs merged commit 0537298 into main Oct 17, 2026
2 checks passed
@oddurs
oddurs deleted the feat/settings-preview branch October 17, 2026 02:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant