Make the Window-menu Supacode entry shortcut configurable#306
Merged
Conversation
Wires the entry to the new .showMainWindow AppShortcut (default ⌘0) so it honors user overrides, and deminiaturizes the window when needed. Drops the empty .windowList replacement; replacing only .singleWindowList preserves the macOS 26 Tahoe arrangement items while still injecting the ⌘0 entry. Rewrites appKeyboardShortcut to never branch on the optional — the ViewBuilder if/else flipped view identity when the shortcut hydrated from disk, which re-evaluated the Window-menu CommandGroup and stripped the Tahoe arrangement items mid-launch. Also drops the shortcut display from the menu-bar .help strings so the help text is stable during hydration. Also drops the Deeplink Reference entry (and its now-unused DeeplinkReferenceMenuButton view) from the Help menu.
afbb145 to
a48a7f2
Compare
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.
Summary
.showMainWindowAppShortcut (default ⌘0) wired into the existing user-override machinery. The Window-menu Supacode entry honors it and now deminiaturizes the window before activating.CommandGroup(replacing: .windowList) {}. Replacing only.singleWindowListlets the macOS 26 Tahoe arrangement items in.windowListstay put.appKeyboardShortcutto never branch on the optional. The old@ViewBuilder if/elsereturned different concrete view types and flipped identity when the shortcut hydrated from disk, which re-evaluated the Window-menu CommandGroup and stripped Tahoe items. Also drops the interpolated shortcut display from menu-bar.helpstrings so they don't churn during hydration.DeeplinkReferenceMenuButtonview) from the Help menu.Closes #289.
Known caveat
In the very first moments of launch — while the store hydrates and the
.commandsbody re-evaluates — Tahoe arrangement items can briefly disappear, then settle. The cause is thateffective(from: store.settings.shortcutOverrides)lives inside the.commandsclosure, so the Supacode CommandGroup re-emits during hydration and AppKit rebuilds the Window menu each time. Eliminating that would mean dropping shortcut configurability for this entry, which we explicitly chose to keep.Test plan