Skip to content

sitetile: dialogue — width-aware name cap, whole-run Q&A demotion, quoteRunReport - #33

Merged
cverorg merged 1 commit into
mainfrom
fix/dialogue-cjk-width-qa-list
Sep 11, 2026
Merged

cverorg merged 1 commit into
mainfrom
fix/dialogue-cjk-width-qa-list

Conversation

@cverorg

@cverorg cverorg commented Sep 11, 2026

Copy link
Copy Markdown
Member

What happened

An interview post written one quote block per question (**SODAART:question** over **摩卡麵包:** answer) rendered four of its fourteen questions as chat bubbles — question as the speaker label, answer as the bubble — and the other ten as quotations, on the same page. The 24-character speaker cap counts UTF-16 units and was calibrated on Latin names; in Chinese or Japanese, 24 units is a sentence.

Change

  • Width-aware cap: an East Asian wide character is two columns, so 24 columns hold a name in either script and a sentence in neither. RE_TURN_HEAD keeps its literal unit cap (reef-mcp vendors it as a plain regex); the width check is a second gate in dialogueTurn.
  • Whole-run judgment: a bold-headed block that is NOT a turn (over the cap, a list beneath it, nothing beneath it) beside blocks that are makes the run a list of same-shaped items (a Q&A, a series nav) — no block in it is a turn. A turn beside an ordinary quotation still mixes, as before.
  • quoteRunReport(body) (new export): per quote run, what the renderer would make of it — blocks, bold heads, turns, names, demoted — from the same classifier bodyHtml uses, so the editing door can warn "these would be bubbles, these would not" without a second copy of the rule.
  • collectQuoteRun is the run collector factored out of bodyHtml, unchanged.

Tests

Three added (width cap at/over the limit; Q&A demotion with the interview in miniature, plus the turn-beside-quotation shape that must keep mixing; report agreement with rendered output). scripts/test.sh all green, sitetile 193 pass.

Follow-up in CVERInc/reef: re-vendor, and a dialogue-shape warning on save/create/verify built on quoteRunReport.

https://claude.ai/code/session_014rHD92DiWFtyWLRApphqub

…oteRunReport for the editing door

An interview post written one quote block per question (`**SODAART:question**` over
`**摩卡麵包:** answer`) rendered four of its fourteen questions as chat bubbles — question
as the speaker label, answer as the bubble — and the other ten as quotations, on the same
page. The 24-character speaker cap counts UTF-16 units and was calibrated on Latin names;
in Chinese or Japanese, 24 units is a sentence.

- The cap is a display width: an East Asian wide character is two columns, so 24 columns
  hold a name in either script and a sentence in neither. RE_TURN_HEAD keeps its literal
  unit cap (reef-mcp vendors it as a plain regex); the width check is a second gate.
- A quote run is judged as one: a bold-headed block that is NOT a turn (over the cap, a
  list beneath it, nothing beneath it) beside blocks that are makes the run a list of
  same-shaped items — a Q&A, a series nav — and no block in it is a turn. A turn beside an
  ordinary quotation still mixes, as before.
- quoteRunReport(body): per quote run, what the renderer would make of it (blocks, bold
  heads, turns, names, demoted) from the same classifier the renderer uses, so an editing
  tool can warn "these would be bubbles, these would not" without a second copy of the rule.
- The run collector is factored out of bodyHtml (collectQuoteRun) unchanged; three tests
  added (width cap at/over the limit, Q&A demotion with the interview in miniature, report
  agreement with the rendered output). 193 pass.
@cverorg
cverorg merged commit 242918b into main Sep 11, 2026
2 checks passed
@cverorg
cverorg deleted the fix/dialogue-cjk-width-qa-list branch September 11, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant