Materialize the trash — store, undo, and the container universe
Phase 2 swaps every consumer: Liveness and its ancestor walk are gone, replaced by ItemContainer — a UUID set plus the container side it lives on, presence the whole test, one selection boundary instead of the old liveness law. Deletion stages by place: board cards move to the trash at a store-minted head rank, trash-side delete is permanent behind its confirmation, Delete Immediately skips the trash from anywhere, lane delete captures the subtree and removes the folder. Restore has no method at all — moveCards resolves members in either container, so drag-out and cut-paste are the ordinary moves 13 calls them, registering ordinary Move steps. The delete inverse moves the card back to its captured lane and rank; redo replays the captured trash rank, a value the gesture actually wrote; lane undo recreates the subtree byte-faithfully in session. Purges register nothing — where 13's trash section contradicts its own Rules on that, Rules wins, filed for ruling. Staleness collapsed to present-or-absent: a container is a path, so a foreign restore fails the delete step's expectation structurally. Legacy tombstones migrate on the loose-file tail hook, cards oldest-first so minting above top reproduces the retired newest-first column, lanes returning live, one folded loss row naming both directions. Put Back, restoreByDrag, receiveRestoredCards, TrashEntry, and the kind machinery are deleted; the trash column renders the container correctly with its full face rework left to phase 3. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -27,7 +27,7 @@ extension UTType {
|
||||
/// snapshot is missing or unreadable — "the staging-less fallback: content intact, attachments
|
||||
/// absent", announced by a banner rather than discovered later.
|
||||
///
|
||||
/// `kind` and `side` are the selection's own vocabulary (`SelectionKind`, `Liveness`) rather than
|
||||
/// `kind` and `container` are the selection's own vocabulary (`SelectionKind`, `ItemContainer`) rather than
|
||||
/// near-copies of it: a clipboard payload is a selection that was copied, and the cards-XOR-lanes and
|
||||
/// live-XOR-tombstoned invariants are exactly the ones those two types already carry. Their raw
|
||||
/// spellings are pasteboard API — a manifest written before a quit is decoded after the relaunch.
|
||||
@@ -53,7 +53,7 @@ public struct ClipboardManifest: Codable, Sendable, Equatable {
|
||||
public var boardRoot: String
|
||||
|
||||
public var kind: SelectionKind
|
||||
public var side: Liveness
|
||||
public var container: ItemContainer
|
||||
public var entries: [Entry]
|
||||
|
||||
/// One copied item: where its snapshot is staged, what it is called, and its bytes.
|
||||
@@ -132,14 +132,14 @@ public struct ClipboardManifest: Codable, Sendable, Equatable {
|
||||
copyID: String,
|
||||
boardRoot: URL,
|
||||
kind: SelectionKind,
|
||||
side: Liveness,
|
||||
container: ItemContainer,
|
||||
entries: [Entry]
|
||||
) {
|
||||
self.version = version
|
||||
self.copyID = copyID
|
||||
self.boardRoot = boardRoot.path
|
||||
self.kind = kind
|
||||
self.side = side
|
||||
self.container = container
|
||||
self.entries = entries
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user