feat(posts): import & external markdown — S1.1 (#22)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
External .md/.markdown opens and edits as-is in a single guest slot (File > Open... Cmd+O, drag-onto-window): SessionTarget extends EditorSession to write in place verbatim, no cursor sidecar, the #67 conflict alert reused for foreign files. Import... (Shift+Cmd+O) copies multi-select files in as Posts behind ONE Origin ask (writer default, immutable); external frontmatter keys ride verbatim with pass_state/origin set; slug/collision machinery shared with writeNew. Audit fixes folded in: BOM stripped + CRLF normalized at the trust boundary (a CRLF pair is one Swift grapheme — \n splits saw one line); unreadable files refuse to open (loadFailed — a failed read never becomes a write); dropped web links and severed symlinks guarded; ~24 lines of reviewer-flagged dead weight removed. 7 new tests; full unit + UI suite green; swiftlint clean. Map #22 stays open pending the live calibration pass (#88 posture).
This commit is contained in:
1 parent
683d697367
commit
0f1c4ef4fe
14 files changed
+691
-49
No files matched your search
@@ -87,9 +87,14 @@ struct PostsPaneView: View {
|
||||
},
|
||||
)
|
||||
.id("draft")
|
||||
} else if let external = model.externalSession {
|
||||
// #92: the guest slot — an external file in the editor column;
|
||||
// one at a time, transient per launch.
|
||||
PostEditorView(session: external, draftText: nil)
|
||||
.id(external.fileURL?.absoluteString ?? "external")
|
||||
} else if let session = model.session, session.postID == model.selectedPostID {
|
||||
PostEditorView(session: session, draftText: nil)
|
||||
.id(session.postID)
|
||||
.id(session.postID ?? "post")
|
||||
} else {
|
||||
VStack(spacing: 10) {
|
||||
Image(systemName: "square.and.pencil")
|
||||
|
||||
Reference in new issue
Block a user