Merge spike/editor-presentation: editor substrate verdict (ADR-0010)
Three throwaway editor spikes (CodeEdit fork / TextKit2 / SwiftUI blocks) plus the pinned corpus and ADR-0010 recording the TextKit2 mode-B verdict. Spike code is historical reference — the real editor (#19) builds fresh from the ADR. [Generated by AI] # Conflicts: # AGENTS.md # docs/devlog/INDEX.md
This commit is contained in:
commit
14fb2ebb40
48 files changed
+2060
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# 0010 — Native TextKit2 prose editor (mode B)
|
||||
|
||||
The editor is a native NSTextView/TextKit2 surface presenting markdown source as calm writing (mode B: styled source, dimmed syntax, reading toggle), with presentation as a flat line-kind→attribute map — no third-party editor dependency. Decided from three throwaway spikes on the pinned calibration corpus (`spike/codeedit/`, `spike/textkit2/`, `spike/blocks/` on `spike/editor-presentation`): TextKit2 delivers full typographic calm at the lowest cost, editing (undo, IME, selection) is native and free, and the Fix-Card anchor proof — exact-range quote highlight + stale-anchor alert with the web-proto wording — passes live on this substrate (2.4 ms anchor search on PERF-3k, ≤1.1 ms full-doc attribute load).
|
||||
|
||||
## Considered Options
|
||||
|
||||
- **CodeEditSourceEditor fork `0.15.8-helm`** (the presumptive leader, proven in Classis): anchor mechanics clean, but the substrate cannot reach typographic calm — one font size for everything, no paragraph spacing (`EditorTheme`/`attributesFor` builds every run from a single base font), mid-word wraps at typographic apostrophes, and emphasis ghost-doubles colored spans (CATextLayer re-draw, unfixable from the API side). Museion takes no CodeEdit dependency; Classis keeps its fork pin, untouched.
|
||||
- **SwiftUI block editor (mode C, live preview)**: best-in-class typography, but structural interaction ceilings — no cross-block selection, per-block undo only, split/merge outside any undo stack, and lists shatter into per-bullet blocks. Each solvable, none for free; it pays in interaction-model decisions where TextKit2 pays in already-written presentation code.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Typography stance: variable heading sizes and real paragraph spacing are required, and natively expressible — not a compromise to accept.
|
||||
- Reading toggle renders block-aware: blank-line split, per-paragraph inline parse, headings fonted by level. A monolithic single-`Text` `.full` markdown dump flattens block structure — the anti-pattern.
|
||||
- Paper-grade polish is not a deferred phase; it is iterative practice, applied whenever the writing surface feels short of calm.
|
||||
Reference in new issue
Block a user