Three UserDefaults-backed knobs in ProseTypography (line-height multiple,
space-after-¶ and space-after-heading in body lines, clamped), surfaced
in Settings → Text Flow. Also fixes two real bugs from the last commit:
paragraphSpacing was set to 1.25 POINTS (now lines × linePoints), and
reading-mode body paragraphs never received the rhythm at all (they rode
the editing surface's fixed 10pt) — both surfaces now share one rhythm.
- Images render inline via NSTextAttachment (scaled to 480pt, alt as
caption); the hover popover and its ImagePopoverView are gone.
- Vertical rhythm per the author's measurements: lineHeightMultiple 1.25,
1 line after paragraphs, 2 after headings (all block styles).
- Table cells breathe: mono pad 2→3 per side; decoration offsets measure
with the same pad so the grid still lands on the text.
- Margins: lineFragmentPadding 12→24 (reading + editing), inset height 24.
- Image URL resolution hoisted into blocks(for:) — the attachment loads
the resolved path, document() no longer re-resolves.
Frames arrive in CONTAINER space; the view draws text at
textContainerOrigin + frame. The missing +origin.y (inset height 20)
drew every decoration 20pt too high — hairline ending above the quote,
grid compressed over the table's top rows. Translate once, per-frame.
The reading canvas runs TextKit1 (textLayoutManager nil — the scroll-view
config path engages the TK1 bridge), so the TK2 fragment walk found
nothing and draw() bailed: no hairline, no grid. framesForRange() now
measures through whichever engine is live — TK2 fragments, else TK1
boundingRect per character line (lineFragmentRect returns degenerate
rects mid-layout; boundingRect is truthful, pixel-verified).
Headless pixel probe (temporary, deleted): quote hairline + table grid
lines render at the right coordinates.
The TK1-compat layoutManager reports wrong rects under TextKit2 — the
table grid drew compressed above its text, the quote hairline landed
mid-heading. fragmentFrames(for:) walks NSTextLayoutManager fragments
(the engine's own frames, document order): quote hairlines span the
block, HRs center on their line, table verticals span all rows and
horizontals underline every grid line.
NSTextBlock/NSTextTable layout is broken on this TextKit build regardless
of engine: textBlocks zero-width the line rect (quotes wrapped one
character per line), NSTextTable rows stack vertically with no grid
(tables rendered as concatenated text with a stray outline). The TextKit1
bridge attempt failed live too. Stop fighting the API:
- Presenter emits plain content: quotes indent-only, HR a thin invisible
line, tables mono-space-padded grid text with alignment honored.
- Each Block/Bound carries a Decoration payload (quote indent, rule,
table column offsets); ReadingCanvasView.draw renders hairlines,
rules, and table grids from measured layoutManager geometry.
- Tests assert decorations + column alignment instead of textBlocks.
Full suite green; lint clean.
Five root causes behind Alexander's calibration findings:
- Wrap to column: both canvases had a fixed 640pt text container —
clipped instead of wrapping when the editor column is narrower
(library + mentor open). widthTracksTextView = true now; measure
polish can return with calibration.
- Tables: TextKit2 stacks NSTextTable rows vertically (each row its
own content-width fragment — no grid). The reading canvas forces
the TextKit1 bridge (replaceLayoutManager); probe-verified grid +
column borders. Read-only canvas — nothing editing-grade lost.
- Heading-tail: a chunk like "# Title" followed by body lines (single
newline, legal markdown) dropped everything after line one. The
heading now renders, then the remaining lines as a soft-joined
paragraph.
- Stale reload (data-loss vector): ProseTextView seeded from
session.loadText (open-time snapshot) — after a reading⇄editing
swap the recreated editor showed the pre-paste text, and a keystroke
there flushed stale content over the user's real edits. Seeds from
session.text (live) now.
- Quote one-char-per-line: did not reproduce after the layout fixes;
root cause was the broken layout state above.
EditorSessionTests debounce flake (50ms margin under parallel load)
passed on both re-runs — timing margin, not a regression.
Full suite green (94 unit + UI smoke); lint clean.
Posts open into the TextKit2 surface (ADR-0010 mode B) lifted from
the proven spike: styled source, scaled headings, dimmed syntax,
native undo/IME. One EditorSession per open post drives a ~1 s
debounced autosave (flush on selection change, window close, app
quit; ⌘S immediate), the Saved/Saving/Failed dot, and the per-post
.museion-state.json cursor sidecar that dies with the folder.
External edits raise an explicit Reload/Keep-Local alert — the
debounce never answers it for the writer, and drafts keep the
lazy-folder first-⌘S rule (#62).
Reviewer fanout fixes folded in: session teardown at every lifecycle
exit (rename flushes before the folder move; trash cancels the
debounce), draft ⌘S continues in place, conflict holds the debounce,
rescan's disk read off-main, ~35 lines of dead code out.
Closes#19
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.
Two bugs after the engine update, both found via a live NDJSON
repro against the real binary:
session/new now requires mcpServers in the ACP SDK schema
(NewSessionRequest). Museion sent only cwd, the engine answered
-32602, the handshake threw, and the pane showed "the mentor
engine stopped" — a validation rejection dressed as a crash. Send
the honest empty list; Museion ships no MCP servers (#44
invariant, now pinned on the wire by a strict fake in tests).
The advisory version-drift note compared raw strings: the gate
records the derived version from `acp --version`
(0.21.5+2177.g735e426) while initialize answers the base version
(agentInfo.version -> 0.21.5), fabricating drift on every launch.
Compare base versions (strip +build metadata); real drift still
fires.
Wire facts re-verified against adapter 0.21.5; docs updated.
Reviewers' findings on 804b588: scan moved off MainActor (Task.detached),
PostLibrary struct folded into Post.scan, hidden dirs and symlinked dirs
now actually skipped (test de-vacuated), unterminated frontmatter no longer
leaks as the Title, quoted YAML values unquoted, leading blank line before
--- tolerated, #-only body reads untitled, persisted Home validated
isFileURL. Dead code deleted: radiusLarge, editorMinWidth, homeKey,
PaneHeader trailing slot, Settings ScrollView, PostRow fill dance.
Tests 56/56, lint 0.
[Generated by AI]
The post-gate main surface is the workspace shell from the design
contract: nav rail (Posts/Sessions/Learnings/Settings), Posts pane
mirroring <home>/posts/ on disk (Pass State groups, origin meta,
empty state; lazy folders skipped), Settings pane with repoint-only
Home picking (NSOpenPanel + UserDefaults, default ~/Documents/Museion
per b3daac9), placeholder panes until #28/#26. Column collapse
mirrors the export's media queries so narrow windows never clip.
Mentor pane becomes the fourth column (#14 surface preserved).
[Generated by AI]
One liveness-gated snapshot pass per launch, chained after provisioning:
gateway.pid pid-liveness + ps scan (skip while the engine runs), 24 h
age check, curated recursive copy (credentials and SQLite sidecars in;
logs/caches/locks out), atomic temp+rename install, keep last 7.
Restore stays manual copy-back in v1 — Help > Open Backup Folder and
a RESTORE.md written beside the snapshots.
[Generated by AI]
Spawn hermes acp -p museion over NDJSON JSON-RPC stdio via a
hand-rolled thin client (no Swift SDK exists). The mentor debug
pane streams replies, renders fix-card tool calls as structured
cards (ADR-0006), cancels via session/cancel, tears down on quit
(willTerminate), and surfaces a restart prompt on engine crash —
never data loss. Version verify against state.json is advisory.
Fake ACP server test double (zsh speaking real NDJSON) covers
handshake, streaming + fix-card, drift, crash latch, cancel,
teardown. 36/36 tests green; finish-audit fixes included (wired
binaryPath, focus-loss teardown bug, double onCrash latch).
Co-Authored-By: Claude <noreply@anthropic.com>
Idempotent per-gate pass: create the museion Hermes profile only when
missing (exit-1 "already exists" = success), then additively seed the
bundled writing skills from seed-manifest.txt — temp-copy+rename, present
skills never touched, orphaned temps swept, manifest entries validated
kebab-case at the trust boundary.
Failures surface a separate phase-named alert ("couldn't set up the
writing profile" / "couldn't copy the writing skills"), never re-raising
the gate: excerpt behind Technical details (stdout per #43, stderr
fallback), Retry re-runs the whole pass, Not Now defers to the next
launch's silent retry. The card presents only after the gate sheet's
dismissal completes and snapshots its failure so a successful Retry
doesn't blank it mid-animation.
Provisioning writes nothing to the profile config (no mcp_servers entry,
#44) and leaves state.json engine-gate-only. 30/30 tests green.
Co-Authored-By: Cipher <cipher@babylondreams.de>
Block every app launch behind an Engine gate per wayfinder map #12:
discover the user-installed hermes binary via the documented six-path
probe (#36), health-check it with acp --check (stdin closed, 5 s
per-candidate timeout, exit-status branching), version via
acp --version, and record every completed check in Application
Support state.json (#39). The gate is a blocking sheet with
checking/pass/fail cards (#38/#40), app-scoped so only the first
window per launch auto-checks (#41); an About window mirrors the
state file read-only. Provisioning (#13) has a stub seam at
onEnginePass. 12 unit tests drive the real Process path with fake
hermes binaries; build, tests, swiftformat, swiftlint all green.
Closes#42
[Generated by AI]
Flip ENABLE_APP_SANDBOX to NO in both configurations: the engine
gate spawns the user-installed hermes binary and provisioning
writes outside any container. Hardened runtime stays ON for
Developer ID notarization. No entitlements file.
Closes#37.
Establish the Agentic Writing Environment: an Xcode project
(filesystem-synchronized groups) with a minimal SwiftUI app shell
on macOS 26.5+, Swift 6, default MainActor isolation. Unit and UI
smoke tests pass via xcodebuild.
Repo tooling: SwiftFormat/SwiftLint configs, Gitea Actions CI
(dormant until a macOS runner registers), GPL-3.0-or-later
license, CITATION.cff, README, CHANGELOG, and a DOX AGENTS.md
tree with ADRs 0001-0003 (stack, license, forge).