Repository navigation
Keep the banner's chord hint off the compact shelf and its writes off the heartbeat - #407
Merged
Merged
Conversation
… the heartbeat The banner chord #388 added reserved a second line inside every control that carries one. On the compact shelf that band comes out of a forty-pixel aim, so the words of Map, Threads and the version chooser rode eleven pixels above the door beside them. The row now states its whole box and the shelf drops the hint; the menu a folded control lands in keeps it. paintCoreControls also wrote each control's title and chord on every pass, which the lf-actions heartbeat asks for every two seconds. Those writes go through keeps, so a pass that changes nothing says nothing.
max-sixty
added a commit
that referenced
this pull request
Sep 7, 2026
#407 landed the same two reds while this branch was open. Its heartbeat fix is the one in the tree: keeps() covers every control the pass reaches rather than the two the test saw. Its compact-shelf fix stands too — a forty-pixel aim has no second line to give, so the row states its whole box and drops the hint — and the sheet test goes back to reading each label centred in its own box. What it does not reach is the wide row, where the news chip carries no chord and the shelf still lost 2.7px a control when a go-to filter took the chords away. That half is here, with its own pin. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Sep 7, 2026
Closeout work from the UI and UX sweep that landed in #379, and the reds it turned up on main along the way. **The wide shelf's height was reading its chords.** #388 gave a banner control that opens a stable destination a quiet second line carrying its chord, and paid for that line with `padding-block: 3px 14px` on `[data-lf-chord]` — the controls that happen to be carrying one. The runtime writes that attribute only while a binding is live and unshadowed, so it comes and goes as the reader moves: a letter typed inside the go-to prefix filters the visible targets and takes every chord off the row. Measured at 1200px, each control went 33px → 30.3px and the row 41px → 38.3px on that gesture, which is a metric expressing state. The wide shelf now reserves the line for every control it draws, so the chord's text is the only thing left for state to paint, and `test_the_shelf_keeps_its_height_when_its_chords_are_shadowed` pins it. #407 landed the compact half of this while the branch was open, and its answer stands: a forty-pixel aim has no second line to give, so the compact block states the row's whole box and drops the hint there. It does not reach the wide row, where the news chip carries no chord — verified against `main`'s tip, where the shelf still loses 2.7px a control. The sheet test goes back to reading each label centred in its own box, which is what #407's fix restores. **The margin thread's composer is read against the card's content box.** `test_the_margin_groups_meanings_at_one_destination_without_moving_the_page` asserted the composer's right edge meets the thread card's, which #391 made false by four pixels when it gave the card symmetric resting room to draw its focus edge inside. That room is the design; the claim the assertion was making — the composer spans its card — is about the content box, and a composer genuinely inset from the card still fails it. #410 is open against the same two hunks of that test from the opposite premise: that the card's inner gutter is a defect the margin seat should spend rather than resting room to measure around. The two layouts are compatible even though the accounts are not — under #410's geometry the thread keeps its padding and `threadRight - threadPad` is still the composer's right edge, so this assertion holds either way, and its CSS stands or falls as a design change on its own. Whichever lands first, the other's test hunks want a rebase. **`scripts/linux-suite.sh` can now build for the host's architecture** (`LEAF_SUITE_NATIVE=1`). Emulating amd64 is what makes the image CI's, and on Apple silicon without Rosetta it is also what breaks: qemu kills Chromium's GPU process before the first context opens, on `about:blank` as readily as on a page, which surfaces as `TargetClosedError` and reads like a product failure. The native build gives up Google Chrome, which ships for amd64 only, and keeps CI's fonts — so it answers a question about how wide something is with CI's own numbers, and is not the control for a case that drives the installed launcher. CLAUDE.md's landing-past-a-red rule now says which mode it means. **A section is watched at its heading.** `lf-toc` observed each section's destination, which for a generated destination is a 1×0 span whose resize observation can never fire. **One test no longer depends on where the run's temporary directory is.** `test_an_unidentified_old_service_is_not_mislabeled_as_the_calling_leaf` read the whole startup note for the calling payload's path, which also reads the page and stop lines — and the page directory legitimately sits under the checkout whenever a run is given a `--basetemp` there. Equality on the runtime line says what the absence was reaching for. A full local `--run-nightly` run on this head is 2149 passed, 1 failed: `test_render_widgets.py::test_suggestion_controls_stay_out_of_the_column[no-preference]`, which reproduces deterministically with `main`'s own `chrome.css` in place and belongs to a module this PR does not touch. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Sep 7, 2026
…ds (#411) `test_the_ring_says_where_the_reader_is_standing` was the last unclaimed failure in the nightly leg of [run 34149953389](https://github.com/max-sixty/leaf/actions/runs/34149953389); [#407](#407) took four of that run's six and [#408](#408) closed the fifth. It read the suggestion's ring as `['none', '3px', 'rgb(28, 27, 24)']` — the outline shorthand's initial values, which is what `outline: var(--here-ring)` computes to when nothing on the element is wearing `data-lf-ask` at all. **A control that forwards another control's press was standing nowhere.** When a hoisted control spills out of the margin's visible row into its More options group, `optionControlNode` builds a proxy button for it: same label, same tone, same owner, and an `onclick` that presses the original. It copied everything about that control except where the control stands. `askPlace` reads the ask a node points back at off the nearest `[data-lf-for]`/`[data-lf-at]` ancestor, and the suggestion's own `.lf-sug-actions` row carries `data-lf-for="sug-refill"` for exactly this reason — but the proxy is built into `.lf-margin-options`, which carries neither. So `standingIn()` answered `null` for it, and Tab from a suggestion's ✓ Accept to its own ✗ Reject took the "you are here" band off the change the reader was deciding, for as long as they held that control. The walk read the same nothing: stepping on from the proxy measured from the margin rather than from the suggestion. The repair is the identity the proxy already records in `lfForwardedControl`, said where the reading `askPlace` performs can find it — but said in an attribute of the stand-in's own, `data-lf-stands`. `data-lf-for` names one element per ask, the row `lf-suggestion` hangs in the margin, and the runtime's lookups, the theme and this suite all read `[data-lf-for="<id>"]` as that row; a proxy wearing it would be a second answer to every one of them for the same ask, whenever a suggestion has a secondary control — the options group is built on every margin render and merely hidden while closed. So `standsAt` is factored out of `askPlace` and reads the three attributes together, and `standsWith`, new in `asks/view.js` beside it, writes the third. It writes only where the value changes — `test_an_unchanged_heartbeat_restates_no_margin_name` catches the unguarded version, since a heartbeat re-presenting the same control must restate nothing. **How that reached CI as an intermittent red.** The paint is coalesced to an animation frame (`paintHere`), so the drop and the restore each land a frame after the focus move that caused them. The test tabs to the proxy and back before reading, and the read landed in the gap after the clearing frame and before the restoring one — about half the time here, which is why `main` reddened on this case only after the branch that added the case's margin fixture had been green for days. The test now names the defect directly: it reads the ring while the reader holds the proxy, after the frame that focus move's repaint is coalesced into, and asserts the band is the one the options row wore. It also pins the count that the collision above would have broken — the suggestion's margin row stays the one element `[data-lf-for='sug-refill']` names — and waits for the second ask's arrival mark the way the test already waits for the first, so the earlier read states an ordering rather than a timing. ## Verification Linux, with the repository's browser, at `f9fb71cd`: - with the runtime change stashed and the test kept, the new assertion fails deterministically at `['none', '3px', 'rgb(28, 27, 24)']` against `['solid', '2px', 'rgb(47, 84, 128)']` — so the case catches the behavior it is named for rather than the frame it used to catch; - `tests/test_render_projection.py` under `--run-nightly`: 102 passed; - `tests/test_render_margin.py` under `--run-nightly`: 82 passed; - the nine nightly cases that read `[data-lf-for]` as a single element, across `test_render_widgets.py`, `test_render_anchors.py` and `test_render_options.py`: 8 passed, 1 failed — `test_suggestion_controls_stay_out_of_the_column[no-preference]`, which fails identically at its `!lf-docked` wait on the merge base `2cdb4048` in this container and is not this branch's; - the everyday `uv run pytest tests`: 901 passed, 6 skipped; - pre-commit over the changed files. <details><summary>The failure, and the frame it fell in</summary> ``` FAILED tests/test_render_projection.py::test_the_ring_says_where_the_reader_is_standing AssertionError: a decision and an options row are drawn in two different bands for the one fact: ['none', '3px', 'rgb(28, 27, 24)'] against ['solid', '2px', 'rgb(47, 84, 128)'] ``` Reproduced 3 of 8 times on `main` before the change. A `MutationObserver` on `data-lf-ask` over one failing run, with `document.activeElement` at each write: | ms | what happened | activeElement | | --- | --- | --- | | 1250 | `focusin` after the `a` walk | `#sug-refill` | | 1276 | mark moves to `sug-refill` | `#sug-refill` | | 1285 | `focusin` on the hoisted ✓ Accept | `.lf-sug-accept` | | 1288 | `focusin` on the options proxy for ✗ Reject | `.lf-margin-option-proxy` | | 1305 | **mark removed from `sug-refill`** | `.lf-margin-option-proxy` | | 1310 | `focusin` back on ✓ Accept | `.lf-sug-accept` | | 1315 | the test reads the ring; nothing on the page is marked | — | The restoring paint would have landed around 1321. On the runs that passed, the same removal and restore happened either side of the read. </details> --------- Co-authored-by: leaf-agent <[email protected]> Co-authored-by: Maximilian Roos <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four nightly cases in
tests/test_render_margin.pyhave been red onmainsince #388 landed, first reported by the nightly leg of run 34143535066 and still failing atmain's head. Both failures come from the banner chord that PR added: it gave the Page-map, Threads, Asks and version controls acontrolrow, andpaintCoreControlsbegan writing atitleand adata-lf-chordon each of them.The chord's band does not fit a touch aim.
[data-lf-chord]reserves its second line aspadding-block: 3px 14px. On the wide row that band is the button's own height and every control on the row carries a chord, so the row still reads level. On the compact shelf the controls sit at amin-heightof forty pixels and the band comes out of that aim: at 390px the words ofMap (3),Threads (1)andv1 ▾sat 6.5px from the top of their box and 17.5px from the bottom, while the⋯door beside them stayed centred — the row 2659732 centred and pinned. The compact block now states the row's whole box, both axes, so the shared Button's band is what every control keeps, and drops the hint there. The destination is still reachable by its chord, which the key line, the?reference and the control's title all go on saying, and a control the shelf folds away still carries its second line into the menu, where a full-width row has the height for it.A paint bound to the heartbeat has to say nothing when nothing changed.
paintCoreControlswrotecontrol.titleandcontrol.dataset.lfChordunconditionally, and it runs inside the standing-chrome frame thelf-actionsheartbeat asks for every two seconds. On a page nobody has touched that restated the Page-map button's title and chord every pass — the mutation stream a screen reader rebuilds its buffer from, which is exactly whattest_an_unchanged_heartbeat_restates_no_margin_namewatches for. The pass now writes throughwidget-elements.js'skeeps, whose own comment states this rule, so the fix covers every control the pass reaches rather than the one the test happened to see; the same guard goes onhelpCloseand the latest-version chip, which restated on the same schedule out of the margin's watch.Verification
Run against this branch on Linux with the repository's browser setup:
test_an_unchanged_heartbeat_restates_no_margin_name[corpus,gallery]andtest_the_small_screen_map_is_a_complete_accessible_sheet[keyboard,pointer];tests/test_render_margin.py,tests/test_render_navigation.py(which owns Refine Go-to hints and banner shortcuts #388's chord-projection cases, including the folded control) andtests/test_render_controls.pyunder--run-nightly, and the everydayuv run pytest tests— all green apart from the pre-existing case named below;⋯11.84/12.16,Map (3),v1 ▾andThreads (1)12/12), and at 1440px the three banner controls keep their chord line (g A,g V,g T) — as does a control folded into the compact menu.test_the_margin_groups_meanings_at_one_destination_without_moving_the_pageis red atmain's head for a separate cause and is untouched here: it fails identically (1349 == 1353 ± 1) in a worktree at 3e92434, the merge base of the run this PR answers, so it is not this branch's.Failure as reported
Both are nightly cases in a module #388 did not touch, so the pull-request leg never ran them and the failure first appeared in the nightly run after
mainmoved.