Skip to content

Meet the contents spine's lines flush at every marker, centred, and join a changed run as one bar - #6113

Merged
max-sixty merged 2 commits into
mainfrom
contents-map-marks
Nov 16, 2026
Merged

max-sixty merged 2 commits into
mainfrom
contents-map-marks

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Where the contents spine's lines meet its circles, several junctions drew badly at 2x in both Firefox and Chromium. This fixes four of them:

  • Hairlines. A thread's bare ring and the On me disc each had a paper hairline. The thread's hairline was left over from the disc that Give each of Leaf's mark colours one meaning, with green only for the user's move #6098 removed. Because of the hairlines, the spine, the lens and a changed stretch stopped a pixel short of those marks, while every other marker meets the line. Both halos now draw without the hairline.
  • Centring. A section's 6px marker sat half a pixel off the 1px spine, and both engines round that half pixel up. So plain rings, a section's thread ring and the On me disc sat one device pixel right of the line. Section markers are now 7px, so every marker is an odd number of pixels wide and centres on the line.
  • Pinch. Each changed section's stretch ended in round caps. Where two changed sections met, the bar pinched to a waist, on the map and in the outline. Each stretch now runs its caps half its width past its ends, so a changed run is one bar, and on the map those ends lie under markers.
  • Fringe. A ring's paper fill ran under its stroke, which left a dark fringe where a changed stretch leaves the ring in the dark scheme. The fill is now clipped inside the stroke. The filled marker for where you are is the exception, since clipping would show a seam there.

Worth weighing: since #6098, the filled marker for where you are replaces a thread's ring, so a thread in the section being read shows only in its link's preview. The contents marks test used to find marks by the marker's box shadow. It now reads the ring colour and states that behaviour.

max-sixty asked for this review on the contents marks Leaf page. The page shows each junction on main and fixed, magnified. A fresh reviewer, given only the magnified captures, found the hairline on the disc and the off-centre markers after my first pass, and then measured every marker within a tenth of a device pixel of the line.

Tests: the two contents marks tests pass. Before-and-after stills cover the map and the outline, in both schemes, in Firefox and Chromium.

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

…ithout a waist

Magnified at 2x in Firefox and Chromium, three junctions on the contents spine were
off:

- A thread's bare ring kept the paper hairline its disc needed once Both took the disc
  away, so the spine and the lens stopped a pixel short of it on both sides, and below
  the filled marker of a section with a thread, while every other marker meets the
  line. A thread's halo is now none, in forced colours too.
- Each changed section's stretch ended in round caps at the next marker, so where two
  changed sections met the bar pinched to a waist, on the map and in the outline. Each
  stretch now runs its caps half its width past its ends, which lie under a marker on
  the map, so a changed run is one bar.
- A ring's paper fill ran under its own stroke, leaving a dark fringe where a changed
  stretch leaves the ring in the dark scheme. The fill now stops inside the stroke; the
  filled marker for where you are keeps its fill under the stroke, so it has no seam.

The contents marks test found a mark on the map by its marker's box shadow, which a
bare ring no longer has. It now reads the marker's ring colour, and says that where the
reader is, the filled marker stands in for a thread's ring, which the map has drawn
since Both.
A fresh review of the magnified junctions found two more faults. The On me disc kept a
paper hairline round it, so it became the only mark the rule, the lens and a changed
stretch stopped short of. And a section's 6px marker stood half a pixel off the 1px
spine, which Firefox and Chromium both round to a whole device pixel to the right at
2x, so plain rings, sections' thread rings and On me discs sat a pixel right of the
line while subsections and where you are stood centred.

The disc's halo is now the tint alone, and a section's marker is 7px, so every marker
is an odd number of pixels across and centres on the spine.
@max-sixty
max-sixty merged commit 9d6af5a into main Nov 16, 2026
5 checks passed
@max-sixty
max-sixty deleted the contents-map-marks branch November 16, 2026 07:56
leaf-agent added a commit that referenced this pull request Nov 16, 2026
#6184)

#6113 deliberately widened a section's marker on the contents map's
spine from 6px to 7px, so every marker is an odd number of pixels across
and centres on the 1px spine instead of standing half a pixel off it.
`test_a_contents_spine_maps_the_document_until_the_user_enters_it`, a
nightly journey that #6113's own CI didn't run, still expected 6px and
has failed since. This updates its expected widths to 7px; its other
assertions, including that every marker centres on the spine, are
unchanged. It also corrects the `toc.css` header, which still described
the top-level markers as 6px rings. Nothing on screen changes beyond
what #6113 already shipped.

Run by node id, the journey fails on main with `['9px', '7px', '3px',
'3px', '7px', '7px', '7px'] == ['9px', '6px', ...]` and passes with this
change.

Closes #6175 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
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