Skip to content

Read the nightly banner, rail, and chord fixtures as the layer now draws them - #218

Merged
max-sixty merged 2 commits into
mainfrom
fix/ci-33614395596
Sep 2, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/ci-33614395596

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The nightly leg of ci has been red on main since de0f296, with seven cases failing on run 33614395596. None is a product regression: each is a test reading the layer the way it was drawn before #209 landed the banner fold, the reserved rail, and the wider control floors. #209's own ci run was cancelled, so the nightly modules first ran against it two commits later and every stale reading surfaced at once.

Solution

Three readings, brought back onto what the layer now draws.

The strip a copy holds open (test_an_exported_example_stands_on_its_own, button-gallery and ship-review). A strip is what main gives up beside itself and --lf-shift re-centres what is left, so on a window wider than the column plus its strips the leftover room sits outside both. The band was still read from body's edges, which asks about that leftover — nobody's claim, and always empty — while the rail's actual residents stood beside the column. The band is measured from the column's own edges now, and the question is put to the residents that make the claim (aside.sidebar, aside.sidenote, .lf-margin-item) rather than to every descendant of main: a widget asking for width is drawn past the column by design and lands in the band while claiming nothing, so the wider reading was answered by a board or a diagram on three of the five copies that hold a strip.

Three cases that assumed an address the fold now takes. test_covering_workspaces_separate_page_paint_from_chrome_target_paint pressed .lf-decisions at 560px, where the row has folded it; it uses the banner_address helper written for exactly that. test_the_banner_uses_the_page_mark_and_puts_each_edge_by_its_panel asserted the focused address stays on the row at 390px, against its own docstring and against refold — whether the version folds at that width is a font-width fact, so the reading follows the address to wherever the fold put it, over a row that has been made to fold something. The ring walk's offers gate asked whether .lf-others was visible, so a folded address read as a page not offering the tray at all, and the walk that did open and walk it never recorded the scope.

A fixture the chip face outgrew. LIVE_KEYS_V1 set two links 60px apart with a chip face 63px wide, so the chord took the second chip down — the right answer to a crowded line, and the wrong fixture for a test about a page moving under a press. The links are a clause apart now.

The wide-banner case is the one calibration change: oneLine > shown * 1.2 cannot hold, because the row's cap is the sentence's floor stated from the other end, so a crowded row leaves the status its floor and no margin over it. The pressure is stated as the sentence outgrowing its box, and the fixture's crowding is asserted where the row is read — the row folded something.

One doc correction rides along, because the export reading rests on it: the rail paragraph in skills/leaf/CLAUDE.md still described the code #213 deleted. reserveRailForPage and its x-state/x-work query are gone, reserveRail() now runs unconditionally as createLivingMargin builds, and the bake drops the reservation unless a margin item survived into the file.

Testing

Each case reproduced locally on 40c1de4 before the change and passes after. The four touched modules ran whole under --run-nightly — test_render_controls.py, test_render_export.py, test_render_aim.py, test_render_projection.py — 223 passed at 46ec807, and test_render_controls.py plus test_render_export.py re-ran at 98 passed after the readings above changed. The everyday suite is 794 passed, 6 skipped. ruff check and ruff format --check are clean on the touched files. The PR's own ci runs the everyday suite; the nightly leg these cases live in first runs after main moves.

What the narrowed band reading catches, per example

Each example exported twice at 1200px, once as it stands and once with aside.sidebar, aside.sidenote, .lf-margin-item { display: none !important } appended — a copy keeping the claim and losing what stands in it, which is the defect the assertion names.

example --strip-r empty as it stands residents hidden, main * residents hidden, claimants
button-gallery 95 [] [] ['right']
corpus 384 [] [] ['right']
design-decision 384 [] ['right'] ['right']
postmortem 384 [] [] ['right']
ship-review 59 [] ['right'] ['right']

The other seven examples claim nothing (--strip-r: 0), so hi - lo > 1 never lets a band be read at all. No copy claims --strip-l: the sidebar strip is written under html:not(.lf-copy), so it is the live page's alone.

…aws them

Seven nightly cases stood on readings the layer had moved past. The strip a
copy holds open was read from body's edges though a strip stands beside the
column; three banner cases assumed an address the fold now takes; and the
chord fixture set two links closer than a chip's face is wide.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed as the author — no approval from me on my own PR. All four readings check out against the runtime: refold() in banner-shelf.js does hand focus to overflowBtn when it folds the focused address, so .lf-banner-menu > .lf-version plus .lf-banner-more is what #209 actually draws (and matches the docstring #209 wrote but left the assertion contradicting); .lf-banner-actions { max-width: calc(100% - 34ch) } is the floor that makes oneLine > shown * 1.2 unpayable; and the stacking behaviour the LIVE_KEYS_V1 fixture stopped exercising still has its own home in test_no_address_is_drawn_on_top_of_another.

I reproduced each case on 40c1de4 and confirmed it passes at 46ec807: the wide-banner ratio failed at 545.06 > 478 * 1.2, the phone-banner case at .lf-banner-actions > .lf-version resolving to 0 elements, and the ring walk at no selected example reached the leaves tray. The export test passes across all twelve examples.

One thing worth knowing before this lands, inline: the export band gate can no longer fail on three of the five examples that claim a strip.

Comment thread tests/test_render_export.py Resolved
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

A parallel tend-ci-fix run on the earlier run 33608882881 landed on the same four files and the same four readings, so nothing here is a competing fix — this is what that run has that this PR does not.

The rail paragraph in skills/leaf/CLAUDE.md still describes the code #213 deleted. Lines 1583–1588 say a page reserves the rail only where it holds a tag declaring x-state or x-work, and otherwise "reserves on its first marker". That was reserveRailForPage, which #213 removed in favour of an unconditional reserveRail() at createLivingMargin — every live page now takes the strip as the margin is built, because an anchored comment can arrive on a page made entirely of prose. This PR's export reading rests on that new fact, so the paragraph is worth correcting in the same change; a replacement is below.

The whole nightly suite is green with these seven fixed, at CI's own parallelism. The PR ran the four touched modules; the parallel run also ran the remaining nightly modules and tests on 40c1de4 under the default -n 2 --dist loadgroup, and nothing else on main is red. So these seven are the complete set — worth knowing before the nightly leg runs for real after merge.

One reading is worth a second look: the phone-banner assertion swaps which platform it fails on. The old .lf-banner-actions > .lf-version was not merely contradicting its docstring — it presumably passed where #209 was validated, whose PR body reports ten green render suites and whose machine scripts/linux-suite.sh says is macOS. So at 390px the version stood on the row there and folds here, which is the same font-width premise this PR is otherwise removing; pinning .lf-banner-menu > .lf-version states it from the other end and should fail on the maintainer's own gate. Reading whichever branch happened holds on both, and still says the thing the docstring promises — that the reader is left on the way back to the address:

assert page.locator(".lf-banner-menu > *").count() > 0, (
    "a 390px row folded nothing at all, so nothing here is about crossing into one"
)
behind = page.locator(".lf-banner-menu > .lf-version").count() == 1
expect(page.locator(".lf-banner-more" if behind else ".lf-version")).to_be_focused()
Replacement for the rail paragraph, and what the other run checked

skills/leaf/CLAUDE.md, replacing the paragraph at 1583–1588:

Every live page may grow a page-edge Button — an anchored comment can arrive on one made entirely of prose — so the living margin reserves the rail as it is built and never gives it back. The runtime states that reservation as data-lf-rail on the root, and the cascade spends it there; neither reads what is standing in the margin, because a row's placement depends on the strip it would be answering about. A copy takes no gestures, so the bake drops the reservation unless a margin item survived into the file.

The deletion is in living-margin.js at #213: reserveRailForPage, its tagsDeclaring((entry) => entry["x-state"] || entry["x-work"]) query and its call in render() all go, and reserveRail() moves to the top of createLivingMargin with the comment "Every live page can gain an anchored comment, including one made entirely of prose." test_a_live_page_reserves_conversation_room_before_its_first_thread[1000-59], added by the same commit, pins the new behaviour on a page with no widgets at all.

Nightly runs on 40c1de4 plus the equivalent four-file fix, each at the default -n 2 --dist loadgroup:

modules result
test_render_controls.py 76 passed
aim, anchors, commands, conversations 188 passed
drafts, gate, mcp, navigation, options* 263 passed
export, margin, outbox, pages, projection 243 passed
reactions, semantic_selection, startup, widgets, site 214 passed
tests (everyday) 794 passed, 6 skipped

Two cases failed only when the same batches were forced to -n 4 and passed at -n 2 and in isolation — test_render_gate.py::test_example_renders[button-gallery] (relativeReplays reporting the generated lf-margin-options-* groups moved) and test_render_conversations.py::test_a_thread_gives_its_reply_the_full_row_and_its_actions_the_next[dark-800] (Resolve widening from 76px to 104px as the reply took focus). Both are the read-before-the-page-is-ready class under load rather than anything on this branch, and CI passed both on 40c1de4; noted only so a later red on either is not read as new.

The export gate's band reading asked whether anything under `main` overlapped
the claimed strip. A widget asking for width is drawn past the column by design
and lands in that band while claiming nothing, so a board or a diagram answered
for the rail on three of the five copies that hold a strip: the strip could have
been held open for nothing and the band still read as occupied. Measured by
exporting each example with `.lf-margin-item, aside.sidenote` hidden — a copy
keeping the claim and losing what stands in it — the old reading caught the
defect on design-decision and ship-review only, while the narrowed one catches
it on all five and stays green on the corpus as it stands.

The phone-banner reading follows the address instead of pinning where it lands.
Whether the version folds at 390px is a font-width fact: the assertion #209
shipped reads it still on the row, this suite's fonts fold it away, and the two
cannot both be pinned. What the test is about is that the fold hands the reader
over rather than drops them, which is read now over a row made to fold
something.

The rail paragraph in `skills/leaf/CLAUDE.md` described the code #213 deleted.
`reserveRailForPage` and its `x-state`/`x-work` query are gone; `reserveRail()`
now runs unconditionally as `createLivingMargin` builds, and the bake drops the
reservation unless a margin item survived into the file.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Still red on main, unchanged: run 33654005369 on e1480bc fails the same seven cases this PR fixes, with the same messages — ['right'] on the two export copies, 545.0625 > 478 * 1.2 on the wide banner, count '1' on the page mark, no selected example reached the leaves tray, the 30s click timeout in test_covering_workspaces_separate_page_paint_from_chrome_target_paint, and ['gh1', 'gh2', 'gh3'] on the mid-way presses.

The triggering commit touched skills/leaf/assets/runtime/projection.js, skills/leaf/scripts/leaf/files.py, and tests/test_interact_document.py — nothing under the four modules this PR reads, so the run adds no new information beyond a second reproduction two commits on.

Failed test ids from the run
tests/test_render_aim.py::test_covering_workspaces_separate_page_paint_from_chrome_target_paint
tests/test_render_controls.py::test_a_wide_banner_spends_action_reach_before_status_copy
tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
tests/test_render_controls.py::test_the_banner_uses_the_page_mark_and_puts_each_edge_by_its_panel
tests/test_render_export.py::test_an_exported_example_stands_on_its_own[button-gallery]
tests/test_render_export.py::test_an_exported_example_stands_on_its_own[ship-review]
tests/test_render_projection.py::test_the_presses_a_reader_is_mid_way_through_survive_the_page_following

@max-sixty
max-sixty merged commit b9cfe18 into main Sep 2, 2026
6 checks passed
@max-sixty
max-sixty deleted the fix/ci-33614395596 branch September 2, 2026 17:35
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