Build the welcome screen
The welcome window becomes the real thing: Xcode-style, hidden title bar with background drag, branding and actions left, recents right — rows carrying the board symbol, name, location, and the registry's cached lane/card counts (stamped at close, never a scan at welcome time), sorted by last opened. Launch failures surface row-level per 02: a failure joins its recents row as a warning caption, an unresolvable bookmark renders unavailable with Forget its one affordance, and only a failure with no row to carry it falls back to a compact list; a board opening again heals its row. New Board (Opt-Cmd-N) opens the Pages-style template chooser — shipped with the single Basic template and the m9 seams marked — flowing through the save panel into createBoard/createLane and straight into a board window. Open Recent gains its submenu with Clear Menu (byte-identical to forgetting every row, pinned by test), and File > Duplicate forks the frontmost board to a Finder-style copy sibling: pending work flushes first through the close flush's step two alone (sessions stay open — 09's stated exception), every GUID and tombstone carries (the whole-board carve-out from copies-remint), and the copy opens in its own window while the original stays put. 36 new tests. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -458,6 +458,8 @@ public final class BannerCenter {
|
||||
// looking at — which is what makes "Couldn't rename 'Fix login'" (02's own example
|
||||
// sentence) identify the right row rather than a name that never landed.
|
||||
if let title { "Couldn't rename '\(title)'" } else { "Couldn't rename the item" }
|
||||
case let .duplicateBoard(title):
|
||||
if let title { "Couldn't duplicate '\(title)'" } else { "Couldn't duplicate the board" }
|
||||
case let .importAttachment(filename):
|
||||
"Couldn't import '\(filename)'"
|
||||
case .listAttachments:
|
||||
|
||||
@@ -426,6 +426,21 @@ public final class BoardRegistry {
|
||||
save()
|
||||
}
|
||||
|
||||
/// Drops every record — File ▸ Open Recent ▸ Clear Menu (11-command-nexus.md).
|
||||
///
|
||||
/// **Finder's Clear Menu clears the menu; this registry *is* the menu**, so the equivalence is
|
||||
/// exact: there is no separate recents list that could be emptied while the records stayed, and
|
||||
/// a record whose board never appears anywhere is a setting nothing can reach. It is therefore
|
||||
/// `forget(id:)` applied to every row, and the one test worth writing says exactly that.
|
||||
///
|
||||
/// One save rather than one per record: the file is rewritten wholesale anyway, and forgetting
|
||||
/// twenty boards should not be twenty writes.
|
||||
public func forgetAll() {
|
||||
guard !records.isEmpty else { return }
|
||||
records.removeAll()
|
||||
save()
|
||||
}
|
||||
|
||||
// MARK: - Matching
|
||||
|
||||
/// The index of the record whose bookmark resolves to the same file as `url`, if any.
|
||||
|
||||
Reference in New Issue
Block a user