Skip to content

Make the Window-menu Supacode entry shortcut configurable#306

Merged
sbertix merged 1 commit into
mainfrom
sbertix/289-window-menu-items
May 9, 2026
Merged

Make the Window-menu Supacode entry shortcut configurable#306
sbertix merged 1 commit into
mainfrom
sbertix/289-window-menu-items

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented May 9, 2026

Summary

  • New .showMainWindow AppShortcut (default ⌘0) wired into the existing user-override machinery. The Window-menu Supacode entry honors it and now deminiaturizes the window before activating.
  • Drops the empty CommandGroup(replacing: .windowList) {}. Replacing only .singleWindowList lets the macOS 26 Tahoe arrangement items in .windowList stay put.
  • Rewrites appKeyboardShortcut to never branch on the optional. The old @ViewBuilder if/else returned 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 .help strings so they don't churn during hydration.
  • Drops the Deeplink Reference entry (and the now-unused DeeplinkReferenceMenuButton view) from the Help menu.

Closes #289.

Known caveat

In the very first moments of launch — while the store hydrates and the .commands body re-evaluates — Tahoe arrangement items can briefly disappear, then settle. The cause is that effective(from: store.settings.shortcutOverrides) lives inside the .commands closure, 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

  • Open the Window menu after launch settles → Move & Resize / Fill / Center / Full Screen Tile / "Move to " all present.
  • ⌘0 from background brings Supacode forward.
  • ⌘0 with the main window miniaturized restores it.
  • Rebind Show Main Window in Settings → menu reflects the new shortcut.
  • Disable Show Main Window in Settings → menu entry stays present, no shortcut shown.

@sbertix sbertix enabled auto-merge (squash) May 9, 2026 22:05
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.
@sbertix sbertix force-pushed the sbertix/289-window-menu-items branch from afbb145 to a48a7f2 Compare May 9, 2026 22:07
@sbertix sbertix changed the title Make the Window-menu Supacode entry shortcut configurable (#289) Make the Window-menu Supacode entry shortcut configurable May 9, 2026
@sbertix sbertix merged commit 3180447 into main May 9, 2026
2 checks passed
@sbertix sbertix deleted the sbertix/289-window-menu-items branch May 9, 2026 22:12
@tuist
Copy link
Copy Markdown

tuist Bot commented May 10, 2026

🛠️ Tuist Run Report 🛠️

Builds 🔨

Scheme Status Duration Commit
supacode 38.8s 9977d32ff

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.

navigating the menu causes an unexpected removal of the options

1 participant