Train AF: link pills never touch the words beside them #595

Closed
kayg wants to merge 0 commits from train/2026-10-19af into dev
Owner

Train AF ran the full suite: fmt, clippy, workspace tests (505 passed, 0 failed), the build, svelte-check, and every Playwright project in parallel shards.

Failures, each checked:

  • glass:268 (chromium-1440) passed 5 of 5 when repeated. It has now failed under full-suite load in trains AD, AE and AF, so it is tracked for a fix rather than called a one-off.

Contents:

  • #584 + #592 (variant C): link pills know what stands beside them. Next to a space nothing moves; before punctuation or a tag the pill has no inside padding and a 0.07em clear edge, so at rest it reads as normal spacing and when lit it never touches the neighbour's ink (#469, #448).

Replaces #584 and #592.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk

Train AF ran the full suite: fmt, clippy, workspace tests (505 passed, 0 failed), the build, svelte-check, and every Playwright project in parallel shards. Failures, each checked: - `glass:268` (chromium-1440) passed 5 of 5 when repeated. It has now failed under full-suite load in trains AD, AE and AF, so it is tracked for a fix rather than called a one-off. Contents: - #584 + #592 (variant C): link pills know what stands beside them. Next to a space nothing moves; before punctuation or a tag the pill has no inside padding and a 0.07em clear edge, so at rest it reads as normal spacing and when lit it never touches the neighbour's ink (#469, #448). Replaces #584 and #592. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Link pills keep clear of the words beside them (#469, #448)
Some checks failed
CI / server (pull_request) Successful in 23s
CI / web (pull_request) Failing after 40s
CI / rust (pull_request) Successful in 3m47s
e96418782a
The link's box at rest now holds the whole lit pill (padding .45em and the 1px edge) and a
clear gap of .2em outside it on both sides (margin: 0 .2em, was -(.45em + 1px) on the right and
-.25em on the left). Lighting the pill paints only inside its own room, so it still moves no word
and never touches the word, tag, comma or link beside it. Wrapped links keep the gap at the ends.

pill-room.spec.ts measures every link kind at rest, hovered, lit and in a selected block against
every neighbour (tag, word, comma, bracket, another link, line start and end, wrapped).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
The editor now says what stands beside each side of a link (packages/editor syntax/links.ts):
`cm-link-sp-l|r` for a space, `cm-link-tight-l|r` for anything else (a comma, a bracket, a tag or
another link touching, a line's edge). The stylesheet gives the pill its room by that, in em tokens:
next to a space the pill's edge sits inside the space, .175em clear of the next glyph, and the
rest is cancelled so the words after the link sit exactly where they sat; before a comma or a
bracket there is little padding and only the clear gap, so nothing opens a space-sized hole.

Replaces the uniform .2em margin of the first version, which left visible gaps before punctuation
at rest. pill-room.spec.ts keeps the lit pill 2px clear of every neighbour and adds the rest layout
against the layout before links had room; link-sides.test.ts covers the classes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Link pills: tight sides have no padding and clear the neighbour's ink (#469, variant C)
Some checks failed
CI / server (pull_request) Successful in 28s
CI / web (pull_request) Failing after 46s
CI / rust (pull_request) Successful in 4m3s
e827b923a1
On a side that is not a space (a comma, a bracket, a tag, another link touching, a line's edge) the
pill now has no padding, so its lit edge sits at the words' box, and a margin of .07em outside the 1px
edge keeps it off the neighbour's ink. A comma's or a bracket's side bearing is already about a pixel
of that clear, so the rest push before punctuation is the edge and the margin, about two pixels at 16px
text: kerning, not a space. The space sides are unchanged (the words after a link stay where they were);
a link with a tight left and a space on the right takes less padding on the right to keep that true.

pill-room.spec.ts now measures clearance to the INK of the neighbouring glyph (the glyph drawn 8x on a
canvas and its coloured columns found), at least 1px, instead of 2px to its box; it also checks the push
before punctuation. link-parity and link-look follow the new values.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Merge remote-tracking branch 'origin/issue/469-pill-room-c' into train/2026-10-19af
Some checks failed
CI / server (pull_request) Successful in 28s
CI / web (pull_request) Failing after 40s
CI / rust (pull_request) Successful in 4m3s
4dd369bea7
Author
Owner

This PR's commits are on dev (landed). Forgejo kept it open and its merge endpoint answers 405, so it is closed by hand.

This PR's commits are on dev (landed). Forgejo kept it open and its merge endpoint answers 405, so it is closed by hand.
kayg closed this pull request 2026-10-21 11:32:43 +00:00
Some checks failed
CI / server (pull_request) Successful in 28s
CI / web (pull_request) Failing after 40s
CI / rust (pull_request) Successful in 4m3s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!595
No description provided.