Skip to content

Keep a paragraph's last word off a line of its own - #7266

Merged
max-sixty merged 1 commit into
mainfrom
agent-a68b9cceb5047bffe
Nov 26, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-a68b9cceb5047bffe

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The reading face sets text-wrap-style: pretty on p, so a paragraph no longer ends on one stranded word where the browser can move a second one down, as review-a-plan's lede did with "Codex." at 1280px. Across the 49 corpus pages at 1280px, paragraphs ending on one word drop from 24 to 6 in Chromium (the rest end on a long identifier or hash) and from 17 to 2 in WebKit. Firefox, 160 included, lacks the value and draws as before; notes/browser-support.md records the gap.

To weigh: the scope is p alone, since the property inherits and a list item or cell can hold a field or a code block. The floating panel's comment field sits in a list item, and its lines would rebreak as the user typed. The user's own message paragraphs keep auto, so a rewrite still opens with every word where it stood. Bench CPU on the corpus page (17,480 elements): keystroke 8.2 → 7.4 ms, wheel step 6.8 → 5.8 ms, load unchanged. WebKit added a line to one paragraph of 208, and reflows 600 long paragraphs in 90 ms against 19.

Tests: test_interact_layer.py, test_theme_tokens.py, and the rewrite and reading-place browser tests.

This was written by Claude Code on behalf of max-sixty

The reading face sets `text-wrap-style: pretty` on `p`, so a paragraph no longer ends on one stranded word where the browser can move a second one down, as `review-a-plan`'s lede did with "Codex." at 1280px. Across the 49 corpus pages at 1280px, paragraphs ending on one word drop from 24 to 6 in Chromium (the rest end on a long identifier or hash) and from 17 to 2 in WebKit. Firefox, 160 included, lacks the value and draws as before; `notes/browser-support.md` records the gap.

To weigh: the scope is `p` alone, since the property inherits and a list item or cell can hold a field or a code block. The floating panel's comment field sits in a list item, and its lines would rebreak as the user typed. The user's own message paragraphs keep `auto`, so a rewrite still opens with every word where it stood. Bench CPU on the corpus page (17,480 elements): keystroke 8.2 → 7.4 ms, wheel step 6.8 → 5.8 ms, load unchanged. WebKit added a line to one paragraph of 208, and reflows 600 long paragraphs in 90 ms against 19.

Tests: `test_interact_layer.py`, `test_theme_tokens.py`, and the rewrite and reading-place browser tests.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty merged commit d47da24 into main Nov 26, 2026
6 checks passed
@max-sixty
max-sixty deleted the agent-a68b9cceb5047bffe branch November 26, 2026 10:08
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.

2 participants