Realign code with the 2026-07-31 rulings
The trash sorts by modified descending — the arrival rank mint retires (Ranks.isOrderedForTrash one comparator, loader + merged order agree; the legacy deleted: migration stamps modified from the tombstone timestamp where parseable; delete undo steps validate existence-only; agent guide v8). Trash selection goes kind-blind — ranges, marquee, Select All, and the successor walk sweep both kinds; the guard moves to the exits (mixed-payload drop refusal, copy/cut validation). The copy stamping preflight widens back to comment depth (load-scoped posture — the board always loads, the gesture refuses whole). Fixes a latent no-op: trashed-lane drag restore never fired (DragSession.beginLanes hard-coded the board container). 2403 tests in 413 suites green. Claude-Session: https://claude.ai/code/session_01CqjXB7ASoWtbyoGod68k97
This commit is contained in:
@@ -63,8 +63,13 @@ enum AgentGuide {
|
||||
/// `modified-by` like any content edit, the trash move included, since it's the same rule and
|
||||
/// not a special case — and the card-level `attachments` claimed name
|
||||
/// (01-storage-format.md § Fractal layout ▸ Rules, "level-uniform"): that name belongs to the
|
||||
/// app's own folder, so a *file* by that name is a defect the app displaces on sight.
|
||||
static let version = 7
|
||||
/// app's own folder, so a *file* by that name is a defect the app displaces on sight. **v8
|
||||
/// retires the trash's arrival rank** (01-storage-format.md § Deletion and 03-board-ui.md ▸
|
||||
/// Trash, re-ruled 2026-07-31; 08-agent-integration.md's own line): the trash sorts by `modified`
|
||||
/// descending, so there is no rank to mint on the way in — the guide's smallest-`order`-minus-1024
|
||||
/// formula is replaced by "restamp `modified`, leave `order` alone", which is the same stamp
|
||||
/// discipline v7 already taught, now doing the ordering as well.
|
||||
static let version = 8
|
||||
|
||||
// MARK: - The version marker
|
||||
|
||||
@@ -450,12 +455,14 @@ enum AgentGuide {
|
||||
- **Delete a card or a lane = move its folder into `<board>/.trash/`**:
|
||||
`mv <lane>/<card-uuid> <board>/.trash/`, or `mv <lane-uuid>
|
||||
<board>/.trash/` for a whole lane (create `.trash/` if missing). A lane
|
||||
travels with its cards inside it. Arrivals go on top: set the moved
|
||||
item's `order` to the smallest `order` already in `.trash/` minus 1024
|
||||
(empty trash: any number). It's a container change like any other move
|
||||
(Moving and reordering above): stamp `modified` and re-stamp
|
||||
`modified-by`. Restore is the same move in reverse — a card into a lane,
|
||||
a lane back to board root, with a fresh `order`, stamped the same way.
|
||||
travels with its cards inside it. It's a container change like any other
|
||||
move (Moving and reordering above): stamp `modified` and re-stamp
|
||||
`modified-by` — and here the stamp is also the position. **The trash
|
||||
sorts by `modified`, newest first**, so a restamped arrival lands on top;
|
||||
there is no rank to mint, and you should leave `order` exactly as it is —
|
||||
it rides along for the restore. Restore is the same move in reverse — a
|
||||
card into a lane, a lane back to board root, with a fresh `order`,
|
||||
stamped the same way.
|
||||
- **Stamp `kind: lane` when you trash a lane that lacks it.** `.trash/` is
|
||||
flat, so an empty lane folder looks exactly like a card folder; the `kind`
|
||||
value is what tells them apart in there.
|
||||
|
||||
Reference in New Issue
Block a user