feat(outline): outline type + outliner — S3 (#109)
CI / ci (push) Canceled after 0s

Dedicated block surface (ADR-0013, #105 variant B): OutlineTree
parses/serializes plain nested-bullet markdown leniently and
normalizes on save; the outliner promotes one NSTextView over the
focused row with LogSeq-style keys (Tab/⇧Tab, ⌥↑/⌥↓ subtree move,
↑/↓ hop, ⇧↑/⇧↓ block selection, ⌘↑/⌥↓ fold, Enter split), folds
session-scoped by runtime node UUID. New Outline ⇧⌘N stages a
type: outline draft through the existing autosave/conflict
machinery; reading renders the serialized markdown unchanged.

Outline rows use the body face at its natural line box — the prose
CSS-1.8 lineHeightMultiple grew the focused row and detached the
bullet (test-pinned). Finish-audit fixes included: paste-multiline
sanitizing at setText, dead Enter disjunct, dead Row.path.

Closes #109
This commit is contained in:
AlexKucera committed 2026-10-15 13:09:31 +02:00
1 parent e55747e7fe
commit c23ee0f62f
21 files changed
+1809 -21

No files matched your search

+15 -2
View File
@@ -88,9 +88,11 @@ struct MuseionApp: App {
// File menu after New — never CommandMenu("File"), which doubles
// it (#84 trap).
CommandGroup(after: .newItem) {
// #108: New Post / New Project… go FIRST in the group — the
// menu reads New Post / New Project… / Open… / Import…
// #108/#109: New Post / New Outline / New Project… go FIRST in
// the group — the menu reads New Post / New Outline /
// New Project… / Open… / Import…
NewPostButton(gate: gate)
NewOutlineButton(gate: gate)
NewProjectButton(gate: gate)
OpenExternalButton(gate: gate)
ImportFilesButton(gate: gate)
@@ -176,6 +178,17 @@ private struct NewPostButton: View {
}
}
/// #109: File ▸ New Outline (⇧⌘N) — newPost's draft path with an outline
/// draft (body "- ", type .outline); the outline surface parses the seed.
private struct NewOutlineButton: View {
let gate: AppGateState
var body: some View {
Button("New Outline") { gate.posts.newOutline() }
.keyboardShortcut("n", modifiers: [.command, .shift])
}
}
/// #108: File ▸ New Project… (⌥⌘N) — stages the ask; WorkspaceView presents
/// the sheet (commands views can't; the pendingImportURLs pattern, #94).
private struct NewProjectButton: View {