Task: land the reading toggle build #71
Notifications
Due Date
No due date set.
Blocks
Depends on
#72 Grilling: calibration pass — rule calm or not
AlexKucera/museion
#68 Grilling: reading-toggle interaction model
AlexKucera/museion
#69 Grilling: reading renderer scope v1
AlexKucera/museion
#70 Grilling: type selector — slots, roles, v1 defaults
AlexKucera/museion
Reference: AlexKucera/museion#71
Reference in new issue
Block a user
Part of #20
Blocked by
#68, #69, #70
Question
Not a question — this is the map's one execution child. Land the reading toggle in the app per the three decision tickets:
readingBlocksfromspike/textkit2/(blank-line split, per-paragraph inline parse, headings fonted — ADR-0010 stance) into the presenter layer, extended to whatever renderer scope was decided.Resolve by building it, running the test suite, and posting what landed (files, tests, deviations from the decisions) as the resolution comment.
[Generated by AI]
Constrained by #69 (closed): renderer scope v1 is decided — read the resolution before building. Highlights: bullets + ordered lists with indent nesting and auto-renumbering are ONE rendering path (counter makes renumbering free); fenced code, blockquotes, pipe tables (NSTextTable) render; images = hover popover; links styled + ⌘-click opens (plain click keeps #68 tap-to-edit); footnotes are the only fallback; frontmatter invisible. This ticket also creates
spike/prose/kitchen-sink.md(ordered + nested + auto-numbered lists, pipe table, blockquote, fenced code, image link) per the resolution.[Generated by AI]
Resolution
Landed on
wayfinder/71-reading-toggle(local commits4c91733feature,c4555edDOX,36858bcdevlog — not pushed). Built per #68/#69/#70 with three deviations, all flagged below.Files
Museion/ReadingPresenter.swift(new) — block-aware renderer: blank-line split → one block per chunk; classification HR → list run → quote run → flow (heading/fence/table/paragraph). Lists = ONE path (bullets + ordered + nesting + per-level auto-renumber counters). Headings h1 = Headings slot size, h2 = 0.77×,###= body+1,####floors at bold body.QuoteTextBlockhairline;RuleTextBlockHR;NSTextTabletables (1px border, delimiter alignment honored). Images = hover-payload blocks; links styled +.linkretained; footnotes the one fallback.document(for:resolvingImagesIn:)carries per-block{docRange, sourceRange, imageURL}— the click→edit and scroll maps.Museion/ReadingSurface.swift(new) — read-only selectableReadingCanvasView; tap-to-edit, ⌘-click links, scroll tracking, image hover popover (off-main load).Museion/ProseTypography.swift(new) — the #70 role slots (Body/Headings/Code, six UserDefaults values, silent system fallback).MuseionTests/ReadingPresenterTests.swift(new) — 15 renderer tests.spike/prose/kitchen-sink.md+assets/kitchen-sink.png— the #69 calibration piece (ordered + nested + auto-numbered lists, pipe table, blockquote + nested, fenced code, image link, link, rule).PostEditorView(toggle + flip-back caret + draft mirror),ProsePresenter(reads the slots),SettingsPaneView(Typography section),MuseionApp(View menu + ⌘R, defaults registration),EditorSession(folderURL).Tests + verification
1. 1. 1.→1. 2. 3.); ⌘R View-menu toggle-back works; clicking a paragraph flips to editing with the caret in-document; file byte-identical (cmp) after the full Read → toggle → click-to-edit round-trip.Deviations from the decisions
font(withFamily:traits:weight:)misresolves Concourse OT — Thin and Book both advertise weight 4 and the manager returns Thin. Faces resolve through the family member list instead (prefer Book/Regular style names, else closest to weight 5); the #70 PS names (ConcourseOT3Book, UbuntuMonoNFM) fall out of that path.headingFont(size:)now applies the bold trait (matches #19's weight 8/9 and #70's "Iowan Old Style bold").super.mouseDownreturns — NSTextView's tracking loop consumes the mouse-up, so amouseUpoverride never fires (the plan's time-window check became redundant once the check moved after the tracking loop).Jank fallback (#68 arbiter): not needed at build time — entry scroll and flip-back caret both shipped and behaved in the live probe. Calibration (#72) arbitrates finally.
Build-note from #69: table alignment was honored rather than left-defaulted — the delimiter row is parsed anyway, alignment was ~4 lines.
[Generated by AI]
AlexKucera referenced this issue2026-10-06 15:30:28 +02:00