delete the widows feature; line breaking is CSS

The human asked whether widow prevention belonged in the backend at all. It did
not, and it broke two rules already written down: the theme contract says the
engine decides nothing about how something looks, and ADR-0034 says authored body
text is the author's — while this inserted U+00A0 into that text.

The practical harm follows from the layer error rather than from a coding mistake.
The engine cannot see the line box, so joining the last two words is a guess that
can overflow a narrow viewport, and a reader copying the paragraph gets a
non-breaking space in their clipboard. `text-wrap: pretty` and `text-wrap: balance`
in the reference stylesheet know the line box and need no bytes in the content.

108 lines of engine deleted for one CSS declaration. The typographer stays: turning
`--` into an en dash is a text transformation no stylesheet can express, which is
exactly the distinction the new layer test draws.

Also worth recording: this took the Extensions counter from 3 back to 2. A threshold
reached by a feature that should not have existed was never a threshold.
This commit is contained in:
2026-08-01 02:23:36 +06:00
parent f48cf018d4
commit 53d679728d
10 changed files with 43 additions and 222 deletions
+20
View File
@@ -614,3 +614,23 @@ never evicted, which is correct for a single-author site and wrong for an unboun
Revisit if: a page render exceeds a few milliseconds after this, or output stops being a pure function of
content — a comment stream, a per-visitor fragment. Then the parked validity model is the right shape, and its
five axes will have consumers instead of guesses.
## ADR-0045 — Widow prevention is the browser's job; the feature is deleted
Date: 2026-07-31 · Status: accepted (removes `internal/ext/widows`, shipped two commits earlier)
Decision: delete the widow-prevention feature. Line breaking belongs to whatever is laying out the text, so the
reference theme sets `text-wrap: pretty` on body copy and `text-wrap: balance` on headings, and the engine stops
touching the text. A layer test goes in `CLAUDE.md` so the question is asked before the next feature: content on
disk, data the browser needs, markup, or presentation — a presentation problem the browser can solve is not the
engine's.
Why: it was built at the wrong layer, and it contradicted two rules already recorded here. `theme-contract.md`
says the engine decides nothing about how something looks, and ADR-0034 says authored body text is the author's
— yet this inserted U+00A0 into that text. The practical harm follows from the layer error: the engine cannot
see the line box, so joining the last two words is a guess that can overflow a narrow viewport, and a reader
copying the paragraph gets a non-breaking space in their clipboard. CSS knows the line box and needs no bytes in
the content.
Consequence: cheap — 108 lines of engine deleted, one CSS declaration gained, and authored text is untouched
again. Expensive — `text-wrap: pretty` is unimplemented in some browsers, so those readers get ordinary wrapping;
that is a smaller cost than editing prose, and it improves on its own as browsers ship it. The typographer stays,
because turning `--` into an en dash is a text transformation no stylesheet can express — the distinction the
layer test is meant to draw.
Revisit if: nothing. If widows matter more than this, the answer is a better stylesheet.