Grilling: reading renderer scope v1 #69

Closed
opened 2026-10-05 11:18:31 +02:00 by AlexKucera · 1 comment
Owner

Part of #20

Question

Which markdown constructs does the v1 reading renderer actually render, and what does an unrendered construct fall back to? The spike renderer does: blank-line split → per-paragraph AttributedString(markdown:) inline parse (emphasis, links, inline code) → headings fonted by level. Decide per construct:

  • Lists (bullet/ordered) — render with real bullets/numbers, or stay source-shaped? Multi-paragraph list items?
  • Block quotes — rendered (indented, serif italic?) or fallback? Corpus fact: none in the eight posts; the epigraph is plain prose.
  • Code blocks / fenced code — mono block, or fallback?
  • Horizontal rules (---, ***) — the styled-source presenter already draws a rule for ***; what does reading do?
  • Links — clickable in reading mode, or styled-only? (Reading mode is view-only per the interaction ticket — links may be the one exception.)
  • Tables, footnotes, images — likely v1 fallback; confirm and record why.
  • Fallback shape — what an unrendered construct looks like in reading mode: mono + dimmed like editing syntax? A distinct "source block" treatment?
  • Frontmatter — stripped silently (as editing does) or indicator?

Constraint: every answer must keep PERF-3k hitch-free and the toggle round-trip byte-stable (rendering never touches the file). The corpus is the ceiling for what MUST work; constructs absent from it are judgment calls — record each as rendered/fallback with a one-line why.

[Generated by AI]

Part of #20 ## Question Which markdown constructs does the v1 reading renderer actually render, and what does an unrendered construct fall back to? The spike renderer does: blank-line split → per-paragraph `AttributedString(markdown:)` inline parse (emphasis, links, inline code) → headings fonted by level. Decide per construct: - **Lists** (bullet/ordered) — render with real bullets/numbers, or stay source-shaped? Multi-paragraph list items? - **Block quotes** — rendered (indented, serif italic?) or fallback? Corpus fact: none in the eight posts; the epigraph is plain prose. - **Code blocks / fenced code** — mono block, or fallback? - **Horizontal rules** (`---`, `***`) — the styled-source presenter already draws a rule for `***`; what does reading do? - **Links** — clickable in reading mode, or styled-only? (Reading mode is view-only per the interaction ticket — links may be the one exception.) - **Tables, footnotes, images** — likely v1 fallback; confirm and record why. - **Fallback shape** — what an unrendered construct looks like in reading mode: mono + dimmed like editing syntax? A distinct "source block" treatment? - **Frontmatter** — stripped silently (as editing does) or indicator? Constraint: every answer must keep PERF-3k hitch-free and the toggle round-trip byte-stable (rendering never touches the file). The corpus is the ceiling for what MUST work; constructs absent from it are judgment calls — record each as rendered/fallback with a one-line why. [Generated by AI]
AlexKucera added the wayfinder:grilling label 2026-10-05 11:18:31 +02:00
AlexKucera added a new dependency 2026-10-05 11:18:51 +02:00
AlexKucera self-assigned this 2026-10-05 11:42:12 +02:00
Author
Owner

Resolution

Resolved live with Alexander over two rounds, 2026-10-05. Vocabulary fixed first: "rendered" = the construct appears in its real form (pipes become a grid, markers vanish); "fallback" = the block shows its raw source text in the editing treatment (body serif, dimmed mono syntax marks). Nothing hidden, nothing broken — just untransformed.

Rendered in v1

  • Bullet lists — real bullet glyphs, hanging indent, item spacing. Rides the blank-line block pass: a block whose lines all match ^\s*[-*] is list-detected; one inline AttributedString(markdown:) parse per item.
  • Ordered lists — v1 (upgraded from the round-1 recommendation on Alexander's call), same path as bullets.
  • Nesting — indent levels relative to the parent item; 2-space and 4-space styles both accepted; mixed bullet/number nesting allowed.
  • Auto-renumbering — 1. 1. 1. renders 1, 2, 3; each nesting level restarts at 1. Numbers are drawn as glyphs by a sequential counter (cheaper than preserving source numbers). Byte-stability holds: rendering only — the file's source numbering is never rewritten.
  • Multi-paragraph list items — not in v1, not in corpus; such blocks degrade to paragraphs (graceful, reversible).
  • Headings — # /## as today; ### becomes a scaled third level (Iowan bold ≈17–18pt, tighter than H2's 20); #### + floors at bold body. Calibration piece carries 26 ### headings — they must read as structure.
  • Horizontal rules — the presenter's existing syntaxOnly matcher reused verbatim (* * *, ---, ***, ___, - - - all match); reading draws a hairline divider at body-paragraph rhythm. Same predicate both modes = one mental model.
  • Fenced code — rendered mono block (upgraded from fallback on Alexander's call).
  • Blockquotes — rendered: indented block, hairline rule on the left, > never visible; nested >> indents deeper via the same path.
  • Tables — rendered (upgraded): default markdown pipe syntax (header + delimiter row), simple 1px-bordered table via AppKit's native NSTextTable in the paragraph style. Column alignment from the delimiter row honored if cheap at build time, else left-aligned — builder's call, flag it in the build resolution.
  • Images — hover popover in v1 (the floor Alexander named): image syntax stays as text, hovering pops the loaded image. Inline rendering deferred — async load reflow is the jank risk and no corpus post carries an image. The popover's URL-resolution/loading work is reusable when inline is wanted.
  • Links — styled, and ⌘-click opens the URL; plain click keeps #68's rule (tap-without-selection = drop to editing at that paragraph).

Fallback in v1 (only one left)

  • Footnotes — source text with dimmed [^1] marks, the editing treatment. Deferred on Alexander's call ("don't really use them").

Invisible in reading mode

  • Frontmatter — stripped silently, same as editing; reading renders session.text, which is already body-only. Zero code.

Corpus facts — corrected and extended

The map's "no italics" claim was wrong: _emphasis_ italics are present in 3 of 9 files including the calibration piece and PERF-3k (inline parse already covers them — no structural change, but calibration exercises italics). ### headings: 26 in the calibration piece, same in PERF-3k. Still absent from the corpus: ordered lists, blockquotes, fenced code, tables, footnotes, images — hence the kitchen-sink post:

  • Kitchen-sink calibration post — agreed: #71 creates spike/prose/kitchen-sink.md (half-page exercising ordered + nested + auto-numbered lists, one pipe table, one blockquote, one fenced code block, one image link). Calibration (#72) reads it alongside the calibration piece; the PERF gate stays PERF-3k unchanged (prose throughput; kitchen-sink gates construct rendering).

Parked

Frontmatter editing (Obsidian-style custom fields, popup or in-editor) — out of scope for this map; parked in the map's Out of scope with a pointer to #59's write-side vocabulary record.

Build-note for #71: the list machinery (ordered + nesting + auto-renumber) is one rendering path, not three features — the counter makes renumbering free. Constraints carried: PERF-3k hitch-free, toggle round-trip byte-stable, rendering never touches the file.

[Generated by AI]

## Resolution Resolved live with Alexander over two rounds, 2026-10-05. Vocabulary fixed first: **"rendered"** = the construct appears in its real form (pipes become a grid, markers vanish); **"fallback"** = the block shows its raw source text in the editing treatment (body serif, dimmed mono syntax marks). Nothing hidden, nothing broken — just untransformed. ### Rendered in v1 - **Bullet lists** — real bullet glyphs, hanging indent, item spacing. Rides the blank-line block pass: a block whose lines all match `^\s*[-*] ` is list-detected; one inline `AttributedString(markdown:)` parse per item. - **Ordered lists** — v1 (upgraded from the round-1 recommendation on Alexander's call), same path as bullets. - **Nesting** — indent levels relative to the parent item; 2-space and 4-space styles both accepted; mixed bullet/number nesting allowed. - **Auto-renumbering** — `1. 1. 1.` renders 1, 2, 3; each nesting level restarts at 1. Numbers are drawn as glyphs by a sequential counter (cheaper than preserving source numbers). **Byte-stability holds**: rendering only — the file's source numbering is never rewritten. - **Multi-paragraph list items** — not in v1, not in corpus; such blocks degrade to paragraphs (graceful, reversible). - **Headings** — `# `/`## ` as today; `### ` becomes a scaled third level (Iowan bold ≈17–18pt, tighter than H2's 20); `#### `+ floors at bold body. Calibration piece carries 26 `### ` headings — they must read as structure. - **Horizontal rules** — the presenter's existing `syntaxOnly` matcher reused verbatim (`* * *`, `---`, `***`, `___`, `- - -` all match); reading draws a hairline divider at body-paragraph rhythm. Same predicate both modes = one mental model. - **Fenced code** — rendered mono block (upgraded from fallback on Alexander's call). - **Blockquotes** — rendered: indented block, hairline rule on the left, `>` never visible; nested `>>` indents deeper via the same path. - **Tables** — rendered (upgraded): default markdown pipe syntax (header + delimiter row), simple 1px-bordered table via AppKit's native `NSTextTable` in the paragraph style. Column alignment from the delimiter row honored if cheap at build time, else left-aligned — builder's call, flag it in the build resolution. - **Images** — hover popover in v1 (the floor Alexander named): image syntax stays as text, hovering pops the loaded image. Inline rendering deferred — async load reflow is the jank risk and no corpus post carries an image. The popover's URL-resolution/loading work is reusable when inline is wanted. - **Links** — styled, and **⌘-click opens** the URL; plain click keeps #68's rule (tap-without-selection = drop to editing at that paragraph). ### Fallback in v1 (only one left) - **Footnotes** — source text with dimmed `[^1]` marks, the editing treatment. Deferred on Alexander's call ("don't really use them"). ### Invisible in reading mode - **Frontmatter** — stripped silently, same as editing; reading renders `session.text`, which is already body-only. Zero code. ### Corpus facts — corrected and extended The map's "no italics" claim was wrong: `_emphasis_` italics are present in 3 of 9 files including the calibration piece and PERF-3k (inline parse already covers them — no structural change, but calibration exercises italics). `### ` headings: 26 in the calibration piece, same in PERF-3k. Still absent from the corpus: ordered lists, blockquotes, fenced code, tables, footnotes, images — hence the kitchen-sink post: - **Kitchen-sink calibration post** — agreed: #71 creates `spike/prose/kitchen-sink.md` (half-page exercising ordered + nested + auto-numbered lists, one pipe table, one blockquote, one fenced code block, one image link). Calibration (#72) reads it alongside the calibration piece; the PERF gate stays PERF-3k unchanged (prose throughput; kitchen-sink gates construct rendering). ### Parked Frontmatter *editing* (Obsidian-style custom fields, popup or in-editor) — out of scope for this map; parked in the map's Out of scope with a pointer to #59's write-side vocabulary record. Build-note for #71: the list machinery (ordered + nesting + auto-renumber) is one rendering path, not three features — the counter makes renumbering free. Constraints carried: PERF-3k hitch-free, toggle round-trip byte-stable, rendering never touches the file. [Generated by AI]
Sign in to join this conversation.