Commit Graph
6 Commits
Author SHA1 Message Date
AlexKucera 4c91733e78 feat(editor): land reading toggle — render, interact, typography slots (S1.2 #71)
Map #20 execution child, built per decisions #68/#69/#70:

- ReadingPresenter: block-aware renderer (ADR-0010 stance) — blank-line
  split, one block per chunk; lists (bullets + ordered + nesting +
  auto-renumber via per-level counters — one rendering path), headings
  by level (h1 = slot size, h2 = 0.77x, ### = body+1, #### floors at
  bold body), HR via the editing syntaxOnly predicate, fenced code,
  blockquotes (QuoteTextBlock hairline), tables (NSTextTable 1px
  border, delimiter-row alignment), images (hover payload), links
  styled + retained. Footnotes stay fallback. Source ranges ride every
  block (click→edit map).
- ReadingSurface: read-only selectable NSTextView canvas (#68: a
  presentation of the same TextKit2 document). Tap with no selection
  after mouseDown returns = edit intent at the clicked block (the
  tracking-loop fix); ⌘-click opens links; scroll tracking feeds the
  flip-back caret; image hover NSPopover loads off-main.
- ProseTypography (#70): three role slots — Body / Headings / Code —
  each {face, size}, UserDefaults six values, member-based font
  resolution (family+weight lookup misresolves Concourse Book→Thin),
  silent system fallback; both prose surfaces read them; editing
  presenter's headings + dimmed syntax rewired through the slots.
- PostEditorView: Read⇄Edit toolbar button (far left) + View menu
  "Toggle Reading Mode" + ⌘R; reading state transient per open; drafts
  included (draft mirror); flip-back caret hint applied once per token.
- SettingsPaneView: Typography section — three slot rows (family
  picker incl. current face not in the installed list + size field).
- kitchen-sink.md (+png): corpus piece exercising constructs absent
  from the eight posts, per #69.

Verified: 94 unit tests (renderer classification, renumbering, source
ranges, fallbacks) + UI smoke; PERF-3k renders 128 blocks in ~17 ms;
live-app probe — Read renders kitchen-sink markers-hidden, renumbered,
byte-stable file after full round-trip; click-to-edit flips at the
clicked paragraph; typography ladder pixel-verified (20/15 ink px).
2026-10-05 15:51:28 +02:00
AlexKucera 986f435762 spike(blocks): Spike C — SwiftUI block editor, live preview mode C (#54)
CI / ci (push) Canceled after 0s
2026-09-30 22:31:58 +02:00
AlexKucera f31af14ac4 spike(codeedit): Spike A — CodeEdit fork as prose editor (mode B) + Fix-Card anchor proof (#52)
- ProseTheme + regex prose pass (helm MonokaiHighlighter pattern): bold headings,
  dimmed markers, green-tinted quotes over tree-sitter markdown
- Anchor: whitespace-tolerant quote search → EmphasisManager outline + scroll/selection
- Reading toggle via AttributedString per-block renderer (Spike B stance)
- Self-check (--check) cwd-independent; PERF-3k anchor search 2.5 ms (Spike B: 2.4)
- Found: uniform font sizes + no paragraph spacing (substrate limits), don't-split
  after typographic apostrophe, ghost-doubling under emphasis+selection
2026-09-30 15:11:24 +02:00
AlexKucera d836083aec spike(textkit2): proper reading mode — per-block render hides markup (#53 follow-up)
CI / ci (push) Canceled after 0s
Blank-line split + inline markdown parse per paragraph; headings fonted by
level (bold serif). Single-Text .full parse flattened blocks and left
presentation intents unstyled; earlier 'breaks window creation' claim was an
AX misread — retracted. --check now asserts markup stays hidden.
2026-09-30 13:40:12 +02:00
AlexKucera dd3542a720 spike(textkit2): Spike B — NSTextView/TextKit2 custom-attribute prose editor (#53)
CI / ci (push) Canceled after 0s
- ProsePresenter: line-kind markdown→attributes (serif body 17pt, H1/H2/H3 26/21/18pt bold, dimmed mono syntax, paragraph spacing), whitespace-tolerant quote-anchor search
- EditorPane: NSViewRepresentable NSTextView, per-paragraph reattribute on edit, undo, non-contiguous layout, 640pt measure
- SpikeApp: Reading toggle (inline md render), anchor/stale-anchor demo, exact web-proto alert wording, --check self-test
- run.sh wraps SPM binary in .app (bare executables show no windows)
- assets/: verification screenshots

Wayfinder map #16 — throwaway spike, not for main.
2026-09-30 13:18:00 +02:00
AlexKucera 3b3544e84d spike(corpus): pin eight-post prose corpus + PERF-3k for editor spikes
CI / ci (push) Canceled after 0s
Pinned byte-identical editing corpus for the substrate spikes (#51):
eight posts as clean markdown plus the ~3k-word perf concatenation.
Site chrome stripped; content faithful to source structure.

[Generated by AI]
2026-09-30 11:07:31 +02:00