fix(app): replace stock new-window item so ⌘N fires new post alone
CommandGroup(after: .newItem) left the WindowGroup's stock File ▸ New Window item in place with its ⌘N, so both actions fired — a second Museion window AND a new post. Switching to replacing: .newItem kills the stock item: the app stays single-window and ⌘N belongs to New Post alone. Update the AGENTS.md contract, NewPostButton doc, and the kiosk ⌘W/⌘N key-swallow comments to match the new menu reality.
This commit is contained in:
1 parent
7ed9b41256
commit
d305f822aa
3 files changed
+12
-9
No files matched your search
@@ -156,10 +156,12 @@ struct MuseionApp: App {
|
||||
CommandGroup(replacing: .appInfo) {
|
||||
OpenAboutButton()
|
||||
}
|
||||
// #91/#94: File ▸ Open… (⌘O) and Import… (⇧⌘O) join the system
|
||||
// File menu after New — never CommandMenu("File"), which doubles
|
||||
// it (#84 trap).
|
||||
CommandGroup(after: .newItem) {
|
||||
// Single-window app: `replacing` kills the stock File ▸ New
|
||||
// Window item the WindowGroup owns — with `after`, its ⌘N
|
||||
// fired alongside New Post's (new window AND new post).
|
||||
// #91/#94: Open…/Import… ride the group — never
|
||||
// CommandMenu("File"), which doubles it (#84 trap).
|
||||
CommandGroup(replacing: .newItem) {
|
||||
// #108/#109: New Post / New Outline / New Project… go FIRST in
|
||||
// the group — the menu reads New Post / New Outline /
|
||||
// New Project… / Open… / Import…
|
||||
@@ -252,8 +254,8 @@ private struct FocusModeToggle: View {
|
||||
}
|
||||
|
||||
/// #108: File ▸ New Post (⌘N) — same draft path as the library's + button.
|
||||
/// The stock new-window item may swallow or duplicate ⌘N in some macOS
|
||||
/// builds; the action still fires from the menu either way.
|
||||
/// The stock New Window item is REPLACED above — ⌘N belongs to this item
|
||||
/// alone (single-window app; no second Museion window).
|
||||
private struct NewPostButton: View {
|
||||
let gate: AppGateState
|
||||
|
||||
|
||||
Reference in new issue
Block a user