Skip to content

Shade the edge a diagram continues past, and draw the registry's example top-down - #1196

Merged
max-sixty merged 2 commits into
mainfrom
diagram-scroll-edge
Sep 26, 2026
Merged

max-sixty merged 2 commits into
mainfrom
diagram-scroll-edge

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

In the arrangement eval, all three Leaf documents drew a five-step plan as flowchart LR; at 1440px the box showed two and a half steps, and every reader took the plan for three. Leaf already marked a cut edge by fading the content there, but on a diagram the cut often falls on blank canvas, where a fade draws nothing, and a node fading out reads as the drawing's end.

lf-diagram now casts a shadow over each edge it continues past, from its two flex spacers held at the scrollport's edges with position: sticky; the shared data-lf-more-before/after marks still decide which edges show. The drawing keeps its natural size, print still fits it, and a message's diagram takes the same layout. silentCuts accepts a shadow on the edge's pseudo-element as the mark's paint. The registry example now draws flowchart TD, and the entry says to draw a sequence of more than three steps top-down.

Test: test_a_drawing_cut_at_its_edge_shades_each_edge_it_continues_past reads screenshot pixels at rest, mid-scroll and at the end, with a top-down control that fits.

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

🤖 Generated with Claude Code

max-sixty and others added 2 commits September 25, 2026 15:33
…ple top-down

A diagram keeps its natural size and scrolls what does not fit, and the layer
already marks each scrolled edge with more beyond it (reachScrollers writing
data-lf-more-before/after, shadow.css fading the content there). For a drawing
that fade fails: over blank canvas it draws nothing, and a node faded at the
edge reads as the drawing's end. In the arrangement eval, three agent-written
plans drawn `flowchart LR` showed two and a half of five steps at 1440px, and
every reader took the plan for three.

lf-diagram now paints the same marks as a shadow cast over the drawing at each
edge it continues past. Its two flex spacers carry the shadow: once the drawing
overflows they have shrunk to nothing, and `position: sticky` holds each at its
edge of the scrollport. The shared marks still decide which edges show, so the
end edge is shaded at rest, both in the middle, and the start edge alone at the
end; a drawing that fits shows none, and the drawing is never scaled. The same
arrangement now covers a diagram in a thread message, which had no spacers.
Every other sideways scroller keeps the fade, which reads as a cut on text.

The silentCuts gate reading accepted only a mask as the mark's paint; it now also
accepts a shadow on the marked edge's pseudo-element, and still names a mark
whose paint a class outranks. The cut-box test reads that paint either way and
drops its focus-clears-the-mask steps, which no longer apply to a diagram; the
theme gate test's scroller still covers that rule.

The registry's x-example now draws `flowchart TD`, and the entry says to draw a
sequence of more than three steps top-down.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit e2cf978 into main Sep 26, 2026
5 checks passed
@max-sixty
max-sixty deleted the diagram-scroll-edge branch September 26, 2026 00:13
max-sixty added a commit that referenced this pull request Sep 26, 2026
The render check already renders at 1200px and 540px and sweeps sideways
overflow from 360px to 1200px, so the TODO item and #19's render-check line
now name what reads one width: the readings the arrangement eval asked for.
#19 also drops the lf-diagram and lf-options items, which #1196 and #1198
landed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[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