Pivot the trash to a materialized .trash — cards only, no Put Back
The tombstone model is retired wholesale: deletion is a move into the reserved <root>/.trash/, always entering at the top (rank minting — no deleted: key, no timestamp sort), with modified stamped for the future age-based purge. Lanes are never trashed — lane delete is physical, native undo in-session the net. Put Back is gone: restore is drag-out or cut+paste (⌘X now enabled in the trash as the keyboard restore path). Trash cards are ordinary cards — search, selection, clipboard, and rendering uniform — and one container boundary replaces the effective-liveness, ancestor-walk, and kind-homogeneity machinery across 02 and 04. Delete stages by place (board moves, trash deletes permanently under the recoverability confirm); legacy deleted: keys migrate without destroying (cards relocate, lanes return live, notices). Templates exclude .trash; Duplicate carries it; the agent guide teaches delete-as-move. Materialized reserved lanes are named as a pattern — .archive is WISHLIST #8, and the backed-out release-presentation question is marked open in 03. Ruling: Redesign board Resolved card e8f1a6c2; 19 mooted tombstone-era rulings moved to the board's new Mooted lane. Claude-Session: https://claude.ai/code/session_01CqjXB7ASoWtbyoGod68k97
This commit is contained in:
@@ -5,7 +5,7 @@ The undo/redo substrate for base Lanework (12-editions.md), filling the one gap
|
||||
## Rules
|
||||
|
||||
- **One stack per board, owned by the board session.** Not per-window: every window over a board (board window, its card windows) shares the store and shares the stack. `window.undoManager` for board surfaces returns the session's manager; 06 ▸ Undo routing applies unchanged — text-editing surfaces get their session-scoped text undo, everywhere else ⌘Z/⇧⌘Z hit the board stack. Undo is board-local, exactly as git undo was.
|
||||
- **Registration at the Writer boundary.** Every app-mediated mutation already passes through the Writer as a `WriteOperation` (02-architecture.md) — that closed enum is the exact inventory of undoable operations. Each Writer call site registers the inverse operation, computed from the pre-write snapshot the store already holds: move → move back (original lane, original `order`); reorder → restore original `order`; rename → restore title; restyle → restore prior style; resize → restore prior width; Edit-session body save → restore prior body bytes; tombstone (⌫) → restore; restore (Put Back) → tombstone; create → remove the created folder.
|
||||
- **Registration at the Writer boundary.** Every app-mediated mutation already passes through the Writer as a `WriteOperation` (02-architecture.md) — that closed enum is the exact inventory of undoable operations. Each Writer call site registers the inverse operation, computed from the pre-write snapshot the store already holds: move → move back (original lane, original `order`); reorder → restore original `order`; rename → restore title; restyle → restore prior style; resize → restore prior width; Edit-session body save → restore prior body bytes; card delete (⌫) → move back out of `.trash/`; restore-by-move → move back in; lane delete → recreate the folder from the registered inverse; create → remove the created folder.
|
||||
- **What is not undoable** (settled): **Permanently delete** (Delete Immediately, Empty Trash) — `purgeIsUnrecoverable` stays true in base, and the existing confirmation rule (03-board-ui.md) already fires on all base boards, since none have git history: the confirm *is* the safety. **Repair** (01-storage-format.md's duplicate-id remint) — undoing a remint would recreate the duplicate id the operation exists to remove. Both match their existing "destructive, confirmed, final" posture.
|
||||
- **Coalescing follows commit granularity** (settled): one gesture, one undo step — a multi-card move is one step with a plural title; an Edit session is one step, registered at the Edit→Preview flip (the effective Save — 05-card-window.md); a styling batch is one step (03's one-gesture-one-commit rule, substrate swapped). The 06 vocabulary supplies menu titles ("Undo Move 3 Cards"), via NSUndoManager's dynamic retitling — the same naming machinery both editions use.
|
||||
- **Session-only persistence** (settled): the stack lives with the board session and dies at close/quit — standard macOS behavior. Git undo's survive-relaunch property is a Pro difference, stated honestly (12's matrix).
|
||||
@@ -15,7 +15,7 @@ The undo/redo substrate for base Lanework (12-editions.md), filling the one gap
|
||||
|
||||
## Interaction with the trash
|
||||
|
||||
⌫'s undo is restore and Put Back's undo is tombstone — the stack and the trash are two doors to the same tombstone state, never in conflict: undo of a delete is *identical* in effect to Put Back (position-preserving, 01's deletion bullet), just addressed by recency instead of by selection.
|
||||
⌫'s undo is the move back — a card delete is a move into `.trash/` (resettled 2026-07-28), so its undo is the ordinary inverse move, returning the card to its source lane and rank; a restore-by-move undoes the same way in reverse. The stack and the trash never conflict — they are the same folder moves addressed by recency instead of by selection. A **lane delete's undo recreates the folder** from the registered inverse (the one destructive delete — in-session only, which is the accepted net; git boards additionally keep it in history), and a permanent card delete undoes the same way.
|
||||
|
||||
## Out of scope
|
||||
|
||||
|
||||
Reference in New Issue
Block a user