Skip to content

Chat polish: citation punctuation wrapping and task-list checkboxes - #1436

Open
blove wants to merge 4 commits into
mainfrom
blove/chat-polish-citations-tasks
Open

blove wants to merge 4 commits into
mainfrom
blove/chat-polish-citations-tasks

Conversation

@blove

@blove blove commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Two visible defects found by a visual-polish audit of the chat composition (56 captured states across themes and widths):

Punctuation after a citation marker wrapped to the next line. The inline pill was display: inline-flex, an atomic inline that browsers treat as a break opportunity on both sides, so a marker at a line end left ". They…" starting the next line. It is now a plain inline box, so its digits follow the normal no-break-before-punctuation rule. Verified on a bare page across 400 widths: 30–32 stranded breaks with inline-flex, 0 with inline, in Chromium, Firefox and WebKit. (A zero-width word joiner after the marker was tried first and does not prevent the break in any engine.) The 1px lift moves from translate (ignored on inline boxes) to position: relative; top: -1px.

Task-list checkboxes were barely legible. Read-only task items used disabled native checkboxes, which every engine paints faintly. The disabled input remains as the accessible checkbox (visually hidden; the accessibility tree still reads "checkbox, checked, disabled"), and an aria-hidden box draws the state from the chat tokens: muted border at 4.74:1 (light) / 7.22:1 (dark), filled box with a tick when checked, system colours in forced-colours mode.

Testing

  • New e2e citations.spec.ts test reflows a cited reply from 1280px to 420px and asserts no marker strands its punctuation; it fails on main and passes here.
  • New unit test: the task box follows the checked state and the input stays the accessible checkbox.
  • chat vitest: 139 files / 1377 tests; lint 0 errors; production build.
  • examples-chat-angular e2e: 65 passed.
  • Checked in Chromium, Firefox and WebKit, light and dark: task-box contrast, accessibility tree, citation line breaks.
  • React parity inventory refreshed.

🤖 Generated with Claude Code

blove added 3 commits November 3, 2026 17:50
The inline citation pill was display: inline-flex, an atomic inline that
browsers treat as a line-break opportunity on both sides, so a marker at
the end of a line left the period or comma after it to start the next
line. As a plain inline box the marker's digits follow the normal rule of
no break before closing punctuation, in Chromium, Firefox and WebKit. The
1px lift moves from translate (ignored on inline boxes) to relative top.

The e2e test reflows a cited reply from 1280px to 420px wide and asserts
no marker strands its punctuation.
Read-only task items rendered as disabled native checkboxes, which every
engine paints so faintly that checked and unchecked were hard to tell
apart. The disabled input stays as the accessible checkbox (visually
hidden); an aria-hidden box draws the state from the tokens: muted border
(4.74:1 light, 7.22:1 dark), filled box with a tick when checked, and
system colours in forced-colours mode.
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Nov 4, 2026 2:18am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – threadplane — ba647b4a Deployed Nov 4, 2026 by vercel[bot]
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