Build the template chooser and Save as Template
The chooser completes its three tiers: bundled by template order, then keyed user templates, then keyless boards by display name — and a malformed user template still lists, by folder name with the loader's own sentence on the row, never failing its neighbours. The store is re-scanned on every presentation and on app activation, the Reveal round trip made honest without watching a folder 09 deliberately leaves unwatched; Reveal lives in the chooser's header and mints the store on first press. Save as Template repeats Duplicate's sequence — progress row with Cancel, flush, detached cancellable copy — through the engine: mint the store, read the next user order before the copy can count itself, Finder-ladder the name, copy excluding .git and .trash/, then stamp the whole template: mapping on the landed copy through updateIndex, with no bracket because the copy lives outside every watched board. Folder attributes deliberately don't carry — the one lock the command stays live under is the read-only-DMG one, and carrying its mode bits would mint a read-only template in the user's own store; the command gates instead on the real hazard, unsaved card content. A signpost names the template only when the ladder renamed it. One name ladder now serves Duplicate and the store. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -671,6 +671,11 @@ public final class BannerCenter {
|
||||
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 .saveAsTemplate(title):
|
||||
// The command's own words (File ▸ Save as Template), because that is the button they
|
||||
// pressed and the board is still exactly as it was: nothing was saved *over*, and the
|
||||
// failure is about the copy in the templates folder, not about this board's own files.
|
||||
if let title { "Couldn't save '\(title)' as a template" } else { "Couldn't save the board as a template" }
|
||||
case let .importAttachment(filename):
|
||||
"Couldn't import '\(filename)'"
|
||||
case .listAttachments:
|
||||
|
||||
Reference in New Issue
Block a user