// The board replaced Home on the phone (ws-m5b18, 1 Oct). Nothing the old// Home showed may be lost: each item it drew is placed on the board — above// the tiles, in the cap, or one tap away — and each placement is held here.// The audit that lists every item and where it went is in the pull request.//// This target has no renderer, so a placement is held in the two forms that// ARE available: the pure words and pairings, as values; and the shape, as a// by-path source guard over the board's own files.importCottonKitimport XCTest@testable importCottonUIfinalclassHomeBoardNoLossTests: XCTestCase {privatestaticlet lane = "the board that replaced Home (ws-m5b18)"privatestaticlet board = "apps/cotton/Sources/CottonUI/Surfaces/Board/HomeBoard.swift"privatestaticlet notices = "apps/cotton/Sources/CottonUI/Surfaces/Board/BoardNotices.swift"privatestaticlet surface = "apps/cotton/Sources/CottonUI/Surfaces/BoardSurface.swift"privatestaticlet cap = "apps/cotton/Sources/CottonUI/Surfaces/CapBar.swift"privatestaticlet box = "apps/cotton/Sources/CottonUI/Surfaces/HomeInput.swift"privatestaticlet root = "apps/cotton/Sources/CottonUI/Boot/RootView.swift"privatestaticlet routes = "apps/cotton/Sources/CottonUI/Boot/RouteScreen.swift"privatestaticlet stack = "apps/cotton/Sources/CottonUI/Boot/StackHost.swift"privatestaticlet captureSurface = "apps/cotton/Sources/CottonUI/Capture/CaptureSurface.swift"privatefunc code(_ path: String) throws -> String {SourceSweep.withoutComments(trySourceSweep.mustRead(path, ownedBy: Self.lane)) }privatefunc count(_ needle: String, in text: String) -> Int { text.components(separatedBy: needle).count - 1 }// ── One source, both hosts ───────────────────────────────────────────// ── Above the tiles ──────────────────────────────────────────────────// RULE: A Done for you receipt keeps the old row's three facts — what Cotton did, when, the owner's own words — and its one verb.func testADoneReceiptSaysWhatWhenAndOffersItsOneVerb() throws {let now = Date(timeIntervalSince1970: 1_790_000_000)let item = DoneItem( kind: .filed, recordId: "t1", label: "Filed as a todo", text: "Buy milk", when: "", action: .undo, path: "/todos/todo/t1") XCTAssertEqual(BoardNoticeWords.doneLabel(item, now: now), "Filed as a todo", "no age, no dangling dot")let dated = DoneItem( kind: .filed, recordId: "t1", label: "Filed as a todo", text: "Buy milk", when: "Yesterday", action: .undo, path: "/todos/todo/t1") XCTAssertEqual(BoardNoticeWords.doneLabel(dated, now: now), "Filed as a todo \u{00B7} Yesterday") }// ── One tap away ─────────────────────────────────────────────────────// ── The cap: search and capture in place ─────────────────────────────// ── The project, and the names a test taps ───────────────────────────}