feat(workspace): land Post lifecycle (S1.1)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
Posts become writable end to end per the #18 map decisions: New Post holds an in-memory draft (folder appears only on first save), first save stamps the flat frontmatter block the #17 reader already parses (pass_state First Draft, origin writer, immutable after stamping), and the Post ID is the Title slug with case-insensitive collision suffixes. Explicit Rename retitles the # Title line and moves the folder (post.md stays); Delete goes to Trash. A recursive FSEvents stream keeps the list mirroring posts/ — external Finder edits included. Editor is a deliberate TextEditor stub; #19's TextKit2 editor replaces it in place while the lifecycle machinery below the view survives the swap. Two review rounds (standards/spec + finish-audit fanout) fixed: watcher start-order bug, writeNew clobber race, overwrite resurrecting vanished posts with reset origin, rename destroying non-heading first lines, draft hijacking the editor, debounce starvation under churn. Tests: 75/75 (17 new). Closes #18.
This commit is contained in:
1 parent
de76a50cc6
commit
530f852f75
13 files changed
+871
-27
No files matched your search
@@ -102,7 +102,7 @@ nonisolated struct Post: Identifiable, Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
private nonisolated extension Substring {
|
||||
nonisolated extension Substring {
|
||||
func trimmed() -> String {
|
||||
trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user