Skip to content

Keep a workspace page still when an extension adds to the body - #6555

Merged
max-sixty merged 2 commits into
mainfrom
workspace-page-scroll
Nov 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
workspace-page-scroll

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A workspace page scrolled by 72px, the floating panel's foot room, whenever any element followed main in the body. The body kept its foot-room padding unless a :has() found no later sibling of main outside a list of tags and attributes that take no room, and browser extensions append elements of their own that no such list names. Max's Firefox sessions on his GitHub queue page recorded a root scroll of exactly 72px. Now the body keeps none of the foot room wherever main itself is a workspace, as a page of parts' body already keeps none; the workspace's regions keep it inside their scrolling content, as before.

To weigh: content a page writes after a workspace's main, such as a site footer, no longer gets the panel's room automatically. page check --render reports under-panel where the panel covers its words, and its advice clears the finding. Of 1,192 workspace pages on this machine, only a test fixture writes anything after main. A workspace nested in a main with no Layout keeps the body's room, as before.

leaf-dev probe --base at 1728×999 in Chromium and Firefox: an extension's element, an empty div, a noscript, a fixed box or a display: none box after main overflowed the window by 72px on base and by 0 now; the side list and open pane still scroll on their own.

Max asked for this on his queue page; he hasn't read the diff. An independent Codex review found the nested-workspace case, now fixed. Tests: the workspace layout and parts tests by node id, tests/model/test_interact_layer.py; the extended window-foot test fails on base.

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

max-sixty and others added 2 commits November 19, 2026 16:31
A workspace page scrolled by 72px, the floating panel's foot room,
whenever any element followed `main` in the body. The body dropped its
foot-room padding only where a `:has()` found no later sibling of
`main` outside a list of tags and attributes that take no room
(`[hidden]`, `[data-lf-runtime]`, script, style, template, dialog,
`[popover]`). Browser extensions append elements of their own to the
body, which no such list names. Max's Firefox sessions on his GitHub
queue page recorded a root scroll of exactly 72px; the page's markup
holds nothing after `main`, and Leaf's runtime adds nothing there with
threads open, a draft typed or tabs changed.

Now the body keeps none of the foot room wherever `main` itself is a
workspace, as a page of parts' body already keeps none. The
workspace's regions keep it inside their scrolling content, as before.
A workspace inside a `main` with no Layout stops short of the foot
room, so there the body keeps it, as it did. The root workspace's
height is written as the window less the head room, the value it
already had.

Behaviour change: content a page writes after a workspace's `main`,
such as a site footer, no longer gets the panel's room automatically.
`page check --render` reports `under-panel` where the panel covers its
words, and its advice clears the finding (checked on a scratch page
with a centred footer). Of 1,192 workspace pages on this machine, only
a test fixture writes anything after `main`.

Measured with `leaf-dev probe --base` at 1728x999, Chromium and
Firefox: an extension's custom element, an empty div, a noscript, a
position:fixed box and a display:none box after `main` each overflowed
the window by 72px on base and by 0 now; a 300px footer by 372px on
base and 300px now. With one of them present, a wheel step over the
gutter scrolled the root 72px on base and nothing now, while the side
list and the open tab's pane still scroll on their own.

`test_a_workspace_reaches_the_window_foot_and_its_readers_clear_the_panel`
now appends such an element before asserting the page has nothing to
scroll; it fails on base.

An independent Codex review found that the first version also dropped
the body's room under a workspace nested in a `main` with no Layout;
the rule now keys on `main` itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty merged commit ed63ab2 into main Nov 20, 2026
5 checks passed
@max-sixty
max-sixty deleted the workspace-page-scroll branch November 20, 2026 02:41
max-sixty added a commit that referenced this pull request Nov 20, 2026
…#6619)

Leaf's authoring instructions now ask a page to put the material behind
each claim on the page: the cases behind a count, the records of what
happened, the code, the diff, quoted rather than retold, with everything
behind a count kept on the page and collapsed as "Reading cost" says.
`page-authoring.md` gains "Show what a claim rests on", which takes over
the narrower clause in "Show the subject" that asked only for a cited
rule to be quoted. A fresh author subagent is handed that material
(`SKILL.md`), a worker's brief asks for it with each finding
(`conversation-loop.md`), `authoring-evidence.md` asks for the exact
patch of any edit a claim or decision turns on, not only one under
review, and `SOUL.md` states the property under "Make the work concrete
and playable".

max-sixty asked for this: "leaf pages are overly hesitant to provide
source material: cases of what happened / code diffs / code snippets."
On 16 of his pages from 4–20 November, read as they stood at his first
comment, 197 of 348 claims of those kinds stood on the author's word
alone, and 5 kept their material in a disclosure.

Three new authoring cases, tagged `evidence`, with fixtures in
leaf-assets: `findings-show-their-cases` (a worker's counts over 24 real
fork asks), `merge-decision-shows-the-diff` (#6555's merge decision) and
`diagnosis-quotes-code-and-log` (an incident outside Leaf). Claude Code,
3 runs per arm: base already shows one case, the diff and the code (3/3
each); the change puts every ask behind a count on the page in 2/3
against 0/3, and keeps the answer and decision leading the page (3/3
each); with the SOUL.md line every rubric scored 3/3. Authoring evals
now pass the judge the page's bound data (`metadata.page_data`), since a
patch view keeps its diff there rather than in the HTML.

What this doesn't fix, Ref #5401: replayed from just before the session
that wrote "3 of 7" with no ask shown, base showed an ask 1/6, this
branch without the SOUL.md line 2/6 and with it 2/4, all within noise.
The failure lives in long sessions writing sections themselves, which
this text reaches no better than #5401's paragraph did. max-sixty picked
adding the SOUL.md line.

Reviewed by a fresh Claude Code reviewer and by Codex; their findings
are folded in. Tests: `dev/tests/test_evals.py` catalog and saved-output
grading.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 23, 2026
…indow (#6688)

The page keeps no room for the floating panel: it lays out in the whole
window, the panel stands over it, and the user folds the panel with `.`
where it covers something. Until now the page kept a 72px band
(`--lf-foot-room`) across the window's whole width at the end of every
scroller and below every window-sized box, through about eleven rules
(body and part padding, `--lf-end-room` threaded through workspace
regions, tabs, panes and the file editor, sticky tracks, the trace
stage, a landing trim, the `under-panel` render refusal), and it kept
needing patches (#3394, #3619, #5969, #6555, #6671). Max asked whether
the page could know nothing about the panel; this is that change, which
he picked over keeping the band, on the decision page in his session.

What still counts the panel is Leaf's own placement: the root's landing
band still ends above the panel's band, and an inner scroller the page
can't carry, held in a full-window workspace or stuck, now ends its band
there too wherever the panel stands across the destination's columns
(`landingBand(scroller, across)`), in place of the band each pane kept
in its padding. The panel no longer writes the root's
`scroll-padding-bottom`, since a band across the whole window made a Tab
onto a stuck sidebar link beside the panel scroll the page 340px. A
Layout's end padding adds the safe area at the window's foot. Landings
also stop scrolling the page past how far it can still carry a scroller
(`pageCarry`, geometry.js), so a stuck tab side list's open item stays
in the window. Four faults the missing band exposed are fixed where they
live: an empty visual-review discussion now lays out where its comment
box would stand, so the box takes that seat only where the panel leaves
it in sight, rather than opening under the panel's row and jumping
between its two seats every 70ms; a comment box the user sees no longer
moves to a seat outside the window, which took the draft out of sight
when a review's window widened from a phone's width; and a file tree no
longer reveals a row the user pressed, which moved the row from under
the pointer before mouseup so the click opened nothing (main does this
too with a real mouse); and a Tab's landing above the panel, which waits
for the next frame, now runs first when a key comes before that frame,
so Enter on a link Tab left under the panel follows the link rather than
letting go of focus (`landing-scroll.js`).

To weigh: where content ends flush with the window's foot under the
panel's 540px, the row covers its last 44px until folded (4 of 27
examples at 1728×999, 1 on a phone; 1 on main), and Tab onto a control
there, as at the end of a long tab side list, leaves focus out of sight;
the browser's own reveals (find, a page field's caret) no longer stop
above the panel; and in a visual review that fills the window, the
comment box opens over the case's head, covering its help button, rather
than in its discussion.

Tests: the runs of every tier before last, on this branch
(https://github.com/max-sixty/leaf/actions/runs/45015279476) and on main
(https://github.com/max-sixty/leaf/actions/runs/45015281683), failed
four tests on the branch alone, each only some of the time, and each now
has a fix here: the Tab landing above; the aim sweep lets the page's
scroll carry a margin marker Leaf anchors to the page (`carriersOf`, now
on the check API); the stale-keys sweep shows a sample frame below the
window before reading, as a check does; and the file-pick test waits for
the page's scroll to start, which fails on main too. All four passed in
the last runs
(https://github.com/max-sixty/leaf/actions/runs/45044731101, branch;
https://github.com/max-sixty/leaf/actions/runs/45044712114, main). Those
failed two others on the branch alone on Linux: the drawing test, which
#6718 fixes and this branch now holds, and the trace journey, whose
`hover` scrolled the page 9px now that the root keeps no scroll padding,
which the shift watch misread (#6763, now on main, fixes the watch); the
journey now points without scrolling and passes 8 of 8 copies at 4× CPU
throttle. Seven more failed once each on the branch's macOS job alone,
as eight did on main's; rerun locally at 4× throttle, four fail on main
as well and three on neither. The latest runs, with #6718 in
(https://github.com/max-sixty/leaf/actions/runs/45073644131, branch;
https://github.com/max-sixty/leaf/actions/runs/45073646401, main),
failed nothing on Linux that main didn't. Six tests failed on the
branch's macOS job alone:
- two journeys whose announcements #6702 reworded on main, which fail on
main's Linux job too;
- a shift-watch teardown of the kind #6763 fixes;
- the removal test, which fails on main too at 4× CPU throttle;
- the pane pin and comment-box return tests, which passed all 12 local
copies, 6 on each tree, both plain and at 4× throttle.

Since those runs started, main gained #6720, #6739, #6756 and #6763,
which this branch now holds; in `seatFab` it keeps #6739's rule that a
seat is judged only as the box moves in, judged by this branch's rules.
Their new tests, with this branch's visual-review, card-growth and trace
tests, pass on that merge here. Locally the changed tests, the drawing
tests, `pnpm run test:runtime` and `pnpm run check:browser` pass on the
merge of today's main; the focus-ring sweep fails on `review-a-fix` on
main and here alike.

> _This was written by Claude Code on behalf of max-sixty_
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