Build the menu bar per the Command Nexus
Nexus parity, audited row by row (11-command-nexus.md § Menu commands) — every already-built item's title, chord, and placement matched exactly; this pass fills what remained: - The future-window rows, present with stable titles and validation-driven disablement until their milestones fill the actions: Save as Template (m9), Add Attachment… ⇧⌘A, Find Next/Previous ⌘G/⇧⌘G, the View-menu card triplet Edit Body ⌘E / Raw Source ⌥⌘E / History (m6), Board ▸ Pull/Push (git milestones) — one shared disabled-row shape in FutureCommands.swift so later milestones only flip validation. - No Print story in v1: the print group is removed. - Help carries the Nexus's one remap-teaching line — Customize Keyboard Shortcuts…, opening System Settings' Keyboard ▸ Shortcuts extension directly (the modern extension URL, verified to launch the appex). - The launch-restore decision now runs through a pure, tested AppModel.shouldRestoreAtLaunch gate; the Settings pane's caption rides a proper Form section footer. 904 unit tests. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -374,6 +374,21 @@ public final class AppModel {
|
||||
refreshRecents()
|
||||
}
|
||||
|
||||
// MARK: - Launch restoration
|
||||
|
||||
/// The launch-restoration gate, as a pure function (02-architecture.md § Launch and window
|
||||
/// lifecycle: "the preference gates only whether the flagged set is consulted; the flags are
|
||||
/// maintained regardless").
|
||||
///
|
||||
/// `KanbanApp.init()` is where this actually runs — read once, before any scene exists, into a
|
||||
/// `let` rather than a computed property, because `restorables()` costs a bookmark resolution per
|
||||
/// known board and nothing should pay that on every scene-graph evaluation. An `App`'s `init` is
|
||||
/// not itself reachable from a test, so the decision is pulled out to here: two `Bool`s in, one
|
||||
/// out, provable without a real `UserDefaults` domain or a live registry.
|
||||
public static func shouldRestoreAtLaunch(preference: Bool, hasRestorables: Bool) -> Bool {
|
||||
preference && hasRestorables
|
||||
}
|
||||
|
||||
// MARK: - Opening
|
||||
|
||||
public var hasOpenBoards: Bool { !sessions.isEmpty }
|
||||
|
||||
Reference in New Issue
Block a user