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:
@@ -675,9 +675,14 @@ struct RestoreByMoveOutTests {
|
||||
try fixture.item("\(Ident.lane1)/\(Ident.card1)", Item.rich(order: "1024", title: "First"))
|
||||
try fixture.item(Ident.lane2, Item.rich(order: "2048", title: "Doing"))
|
||||
try fixture.item("\(Ident.lane2)/\(Ident.card4)", Item.rich(order: "1024", title: "Fourth"))
|
||||
// The trash's own order is its display order — `card3` above `card2`, newest-first.
|
||||
try fixture.item(".trash/\(Ident.card2)", Item.rich(order: "2048", title: "TrashedA"))
|
||||
try fixture.item(".trash/\(Ident.card3)", Item.rich(order: "1024", title: "TrashedB"))
|
||||
// The trash's own order is its display order, and since 2026-07-31 that is `modified`
|
||||
// descending (01-storage-format.md § Deletion) — `card3` above `card2`, newest-first.
|
||||
try fixture.item(
|
||||
".trash/\(Ident.card2)",
|
||||
"---\nschema: 1\ntitle: TrashedA\norder: 2048\nmodified: 2026-05-01T09:00:00Z\n---\n")
|
||||
try fixture.item(
|
||||
".trash/\(Ident.card3)",
|
||||
"---\nschema: 1\ntitle: TrashedB\norder: 1024\nmodified: 2026-05-03T09:00:00Z\n---\n")
|
||||
let store = try BoardStore(rootURL: fixture.root)
|
||||
|
||||
store.moveCards([card3, card2], toLane: lane2, at: 0)
|
||||
@@ -829,7 +834,7 @@ struct RestoreLaneTests {
|
||||
#expect(try fixture.indexText(Ident.lane3).contains("project: lanework"), "unknown keys ride along")
|
||||
}
|
||||
|
||||
@Test("Its undo is the ordinary move back in, at the trash rank the row was holding")
|
||||
@Test("Its undo is the ordinary move back in, at the `order` the row was carrying")
|
||||
func undoMovesItBackIn() throws {
|
||||
let fixture = try makeTrashedLaneBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
Reference in New Issue
Block a user