Wayfinder map: M1 editor presentation — substrate decision #16

Closed
opened 2026-08-28 18:33:05 +02:00 by AlexKucera · 0 comments
Owner

Destination

ADR-0010 agreed — editor substrate and presentation mode chosen, typography stance set, fork-sharing arrangement with Classis fixed, v2 upgrade path recorded — backed by three throwaway spike prototypes on branch spike/editor-presentation that anyone can open and compare side by side.

Notes

  • Execution override: this map carries execution — spike tickets build throwaway code; the destination is the decision, not shippable editor code.
  • Branch: everything spike-side lands on spike/editor-presentation — prose in spike/prose/, one directory per substrate (spike/codeedit/, spike/textkit2/, spike/blocks/). Disjoint dirs; rebase before push.
  • Domain: CONTEXT.md (Fix Card, anchor, Pass State); PRD S1.2 + G5. Visual contract: ref/Web-Prototype/museion-workspace.html (fix-card list, stale-anchor alert wording); tokens per ref/Web-Prototype/DESIGN-HANDOFF.md.
  • Skills: prototype (spikes), grilling + domain-modeling (verdict), swiftui + swift6-concurrency (all Swift work). Spikes stay ponytail-cheap: the least code that answers the question.
  • Fork fact: Classis pins AlexKucera/CodeEditSourceEditor 0.15.8-helm (revision 3ce6007). Default arrangement: Museion pins the same fork.
  • Tie-breaker (agreed): calm > effort > everything else; ~3k-word performance is a pass/fail gate, not a ranking; "already proven in Classis" weighs heavy. If mode B cannot reach calm, Paper-grade polish un-defers (per the original #16).
  • Modes (from the original #16): mode A = plain source; mode B = styled source, dimmed syntax, rendered reading toggle; mode C = live-preview block editor (substrate 3).
  • Corpus (pinned): the eight posts named in the corpus ticket; calibration piece = "The expected value of showing"; perf corpus ≈3k words from the three longest.
  • ADR: next number is 0010; format per docs/AGENTS.md.

Decisions so far

  • Spike corpus: pin the eight posts as markdown: eight posts + PERF-3k (3452 words) pinned on spike/editor-presentation @ 3b3544e; calibration inventory corrected — no blockquote/italics in source, epigraph is plain prose in curly quotes.

  • Spike B: NSTextView/TextKit2 with custom attributes: all criteria PASS — editing/undo/IME native and free, presentation is a flat line-kind→attribute map (no TextKit surgery), PERF-3k load ≤1.1 ms + anchor search 2.4 ms, live per-paragraph restyle with no hitching; quote-anchor highlight + exact stale-alert UX proven; reading mode lands block-aware (blank-line split + inline parse per paragraph, headings fonted) — single-Text .full flatten is the anti-pattern; renderer stance for the ADR. Code: spike/textkit2/ @ dd3542a+d836083.

  • Spike C: SwiftUI block editor (live preview): typography/perf/anchor PASS (mode C is the reading view itself); honest ceilings — no cross-block selection, per-block undo only, paste-merge semantics to decide. Code: spike/blocks/ @ 986f435.

  • Spike A: CodeEditSourceEditor fork as prose editor (mode B, anchor proof): anchor proof CLEAN (EmphasisManager outline + scroll, 2.5 ms PERF-3k search, exact stale-alert UX); mode B works via regex highlight pass but typography is substrate-limited — one font size for everything, no paragraph spacing (EditorTheme/attributesFor), mid-word wrap at typographic apostrophe (don't-split), emphasis CATextLayer ghost-doubles any colored span (fork bug, API-unescapeable); integration traps: @preconcurrency imports, resource bundles in .app, sRGB-only theme colors, @State-during-makeNSViewController dropped. Code: spike/codeedit/ @ f31af14.

  • Verdict: substrate decision + ADR-0010: native TextKit2 mode B wins by the tie-breaker — Alexander's live side-by-side confirmed C's ceiling (bullet lists shatter into per-bullet blocks) and A can't reach typographic calm. Variable heading sizes + paragraph spacing required; reading toggle block-aware; anchor re-proof satisfied live in B; CodeEdit exits Museion, Classis pin untouched; Paper-grade polish = iterative practice, not a deferred phase. ADR-0010 in the working tree (docs/adr/0010-native-textkit2-prose-editor.md, uncommitted; issue-asset upload 500s on this Gitea).

Not yet specified

(none — the way to the destination is clear)

Out of scope

  • Building the real editor surface (#17–#21) — downstream of this map.
  • Re-scoping #19–#21 against ADR-0010 (substrate integration vs presentation styling vs focus mode) — downstream hand-off; #19 is now a TextKit2 integration, not a substrate hunt.
  • Merging the spike branch or committing ADR-0010 to main — Alexander's call after the verdict session.
  • A fourth substrate (WebView/Tiptap etc.) — the three are fixed by the original ticket.
  • iOS/iPadOS editor — v1 is macOS only.

[Generated by AI]

## Destination ADR-0010 agreed — editor substrate and presentation mode chosen, typography stance set, fork-sharing arrangement with Classis fixed, v2 upgrade path recorded — backed by three throwaway spike prototypes on branch `spike/editor-presentation` that anyone can open and compare side by side. ## Notes - **Execution override:** this map carries execution — spike tickets build throwaway code; the destination is the decision, not shippable editor code. - **Branch:** everything spike-side lands on `spike/editor-presentation` — prose in `spike/prose/`, one directory per substrate (`spike/codeedit/`, `spike/textkit2/`, `spike/blocks/`). Disjoint dirs; rebase before push. - **Domain:** CONTEXT.md (Fix Card, anchor, Pass State); PRD S1.2 + G5. Visual contract: `ref/Web-Prototype/museion-workspace.html` (fix-card list, stale-anchor alert wording); tokens per `ref/Web-Prototype/DESIGN-HANDOFF.md`. - **Skills:** `prototype` (spikes), `grilling` + `domain-modeling` (verdict), `swiftui` + `swift6-concurrency` (all Swift work). Spikes stay ponytail-cheap: the least code that answers the question. - **Fork fact:** Classis pins `AlexKucera/CodeEditSourceEditor` `0.15.8-helm` (revision 3ce6007). Default arrangement: Museion pins the same fork. - **Tie-breaker (agreed):** calm > effort > everything else; ~3k-word performance is a pass/fail gate, not a ranking; "already proven in Classis" weighs heavy. If mode B cannot reach calm, Paper-grade polish un-defers (per the original #16). - **Modes (from the original #16):** mode A = plain source; mode B = styled source, dimmed syntax, rendered reading toggle; mode C = live-preview block editor (substrate 3). - **Corpus (pinned):** the eight posts named in the corpus ticket; calibration piece = "The expected value of showing"; perf corpus ≈3k words from the three longest. - **ADR:** next number is 0010; format per `docs/AGENTS.md`. ## Decisions so far <!-- one line per closed ticket --> - [Spike corpus: pin the eight posts as markdown](https://git.babylondreams.de/AlexKucera/Museion/issues/51): eight posts + PERF-3k (3452 words) pinned on `spike/editor-presentation` @ 3b3544e; calibration inventory corrected — no blockquote/italics in source, epigraph is plain prose in curly quotes. - [Spike B: NSTextView/TextKit2 with custom attributes](https://git.babylondreams.de/AlexKucera/Museion/issues/53): all criteria PASS — editing/undo/IME native and free, presentation is a flat line-kind→attribute map (no TextKit surgery), PERF-3k load ≤1.1 ms + anchor search 2.4 ms, live per-paragraph restyle with no hitching; quote-anchor highlight + exact stale-alert UX proven; reading mode lands block-aware (blank-line split + inline parse per paragraph, headings fonted) — single-Text `.full` flatten is the anti-pattern; renderer stance for the ADR. Code: `spike/textkit2/` @ dd3542a+d836083. - [Spike C: SwiftUI block editor (live preview)](https://git.babylondreams.de/AlexKucera/Museion/issues/54): typography/perf/anchor PASS (mode C is the reading view itself); honest ceilings — no cross-block selection, per-block undo only, paste-merge semantics to decide. Code: `spike/blocks/` @ 986f435. - [Spike A: CodeEditSourceEditor fork as prose editor (mode B, anchor proof)](https://git.babylondreams.de/AlexKucera/Museion/issues/52): anchor proof CLEAN (EmphasisManager outline + scroll, 2.5 ms PERF-3k search, exact stale-alert UX); mode B works via regex highlight pass but typography is substrate-limited — one font size for everything, no paragraph spacing (EditorTheme/attributesFor), mid-word wrap at typographic apostrophe (don't-split), emphasis CATextLayer ghost-doubles any colored span (fork bug, API-unescapeable); integration traps: @preconcurrency imports, resource bundles in .app, sRGB-only theme colors, @State-during-makeNSViewController dropped. Code: `spike/codeedit/` @ f31af14. - [Verdict: substrate decision + ADR-0010](https://git.babylondreams.de/AlexKucera/Museion/issues/55): **native TextKit2 mode B wins** by the tie-breaker — Alexander's live side-by-side confirmed C's ceiling (bullet lists shatter into per-bullet blocks) and A can't reach typographic calm. Variable heading sizes + paragraph spacing required; reading toggle block-aware; anchor re-proof satisfied live in B; CodeEdit exits Museion, Classis pin untouched; Paper-grade polish = iterative practice, not a deferred phase. ADR-0010 in the working tree (`docs/adr/0010-native-textkit2-prose-editor.md`, uncommitted; issue-asset upload 500s on this Gitea). ## Not yet specified (none — the way to the destination is clear) ## Out of scope - Building the real editor surface (#17–#21) — downstream of this map. - Re-scoping #19–#21 against ADR-0010 (substrate integration vs presentation styling vs focus mode) — downstream hand-off; #19 is now a TextKit2 integration, not a substrate hunt. - Merging the spike branch or committing ADR-0010 to main — Alexander's call after the verdict session. - A fourth substrate (WebView/Tiptap etc.) — the three are fixed by the original ticket. - iOS/iPadOS editor — v1 is macOS only. [Generated by AI]
AlexKucera added the ready-for-agent label 2026-08-28 18:33:05 +02:00
AlexKucera changed title from M1: Editor presentation spike — substrate decision to Wayfinder map: M1 editor presentation — substrate decision 2026-09-26 11:38:53 +02:00
AlexKucera added wayfinder:map and removed ready-for-agent labels 2026-09-26 11:38:54 +02:00
Sign in to join this conversation.