feat(library): projects & archive UI — S2 (#108)
CI / ci (push) Canceled after 0s

Variant B per the #104 prototype verdict: the library column groups
pieces by project (serif lowercase heads, collapse toggle, Pass-State
groups inside, 2px edge-bar selection shared with the new Archive
pane via LibraryPostRow). Move to Project / Archive / Move Back /
whole-project Unarchive are folder moves — post.md bytes untouched,
never clobbering, ids globally unique. File ▸ New Post ⌘N and New
Project… ⌥⌘N (CommandGroup, never CommandMenu per #84).

Every folder move flushes pending edits first and aborts when the
write failed — nothing moves without its text. Project membership and
the archived-refusal derive from freshly resolved disk paths, never
the scan snapshot. Slug and project-name comparisons fold through one
canonical key (NFC + lowercase). Two reviewer fanouts this session;
their findings are all fixed or visibly parked.

144/144 tests green (run twice), swiftformat/swiftlint clean.

Closes #108
This commit is contained in:
AlexKucera committed 2026-10-13 22:18:24 +02:00
1 parent 9da3a07f4a
commit e55747e7fe
15 files changed
+1205 -68

No files matched your search

+6 -1
View File
@@ -39,7 +39,12 @@ struct EditorSessionTests {
session.edit("# Alpha\n\nOne. Two.")
#expect(session.saveState == .changed) // #83: dirty shows while the debounce holds
try await Task.sleep(for: .milliseconds(200))
// Await the flush rather than sleeping a fixed window — under suite
// load the main actor can starve the debounce Task past any constant.
let deadline = ContinuousClock.now.advanced(by: .seconds(5))
while session.saveState != .saved, ContinuousClock.now < deadline {
try await Task.sleep(for: .milliseconds(20))
}
#expect(session.saveState == .saved) // Changed → flush → Saved lands here
#expect(PostStore.readBody(id: "alpha", home: home) == "# Alpha\n\nOne. Two.")