Build the trash quasi-lane
Deletion becomes a two-stage, Finder-style story. File > Delete and plain Backspace tombstone the live selection; View > Show Trash (no chord — Shift-Cmd-T stays with the system's tab bar) reveals the quasi-lane: trailing, one fixed width unit consumed only while shown, hatched dimmed header, count badge, no new-card button, exempt from resize and reorder alike. Its contents are a pure view over the snapshot — the deterministic sort (deleted newest first, folder-name ties, unparseable stamps oldest) interleaves card rows with a tombstoned lane's single entry, whose count names what Put Back returns; the ancestor walk is absolute, so an own-flag card beneath a tombstoned lane has no row and recovery is deliberately two steps. Put Back twins Delete on Cmd-Backspace with validation enabling exactly one; restore fidelity is byte-perfect because nothing ever moved. Delete Immediately confirms exactly where loss is real (every board is mode-none today; the predicate names the git carve-out for m7), Empty Trash always confirms with the true whole-board count, and dragging a tombstoned card onto a live lane restores it there — positional drops and cross-board locality arrive with m5's machinery. The banner's delete phrasing drops "move to the trash" per the naming constraint: board deletion says Delete, "Move to Trash" stays reserved for the system Trash. 47 new tests. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
+14
-2
@@ -108,8 +108,9 @@ struct KanbanApp: App {
|
||||
@CommandsBuilder
|
||||
private var menuCommands: some Commands {
|
||||
// The File group, in 11-command-nexus.md's own row order: New Card, New Lane, (New Board…,
|
||||
// still owed), Open…, (Open Recent, still owed), Board Info. The creation pair and Board
|
||||
// Info all validate against the frontmost board through the focus system, so each is simply
|
||||
// still owed), Open…, (Open Recent, still owed), Board Info, (Duplicate / Save as Template /
|
||||
// Reveal in Finder, still owed), then the trash trio and Empty Trash…. Every one of them
|
||||
// validates against the frontmost board through the focus system, so each is simply
|
||||
// absent-of-effect when no board is in front.
|
||||
CommandGroup(after: .newItem) {
|
||||
BoardCreationCommands()
|
||||
@@ -124,6 +125,17 @@ struct KanbanApp: App {
|
||||
Divider()
|
||||
|
||||
BoardInfoCommand()
|
||||
|
||||
Divider()
|
||||
|
||||
TrashCommands()
|
||||
}
|
||||
|
||||
// The View menu. `CommandGroupPlacement.toolbar` *is* View — the menu the toolbar's own
|
||||
// items live in — which is where 11-command-nexus.md files Show Trash, alongside the card
|
||||
// window's Edit Body / Raw Source / History still to come.
|
||||
CommandGroup(after: .toolbar) {
|
||||
ShowTrashCommand()
|
||||
}
|
||||
|
||||
// The Board menu (11-command-nexus.md), in its inventoried order — Rename, then Style…,
|
||||
|
||||
Reference in New Issue
Block a user