Repository navigation
Ring the whole screenshot card and declare the contents link's ring - #240
Conversation
The state rail 30ed7c7 put above lf-shot's frames sits flush on top of them, and the here ring stayed on the frame alone with a 1px outward offset. Its top run was therefore drawn three pixels up inside the rail — a rule across the card rather than a ring round the thing in hand — and the rail's own opaque surface stands where that run is. The rail and the frame are one card, so the ring goes round the card: it moves to lf-shot itself, whose box is exactly the rail plus the frames. lf-toc's link ring wrote 2px solid var(--accent) out longhand instead of using the layer's token. RINGS_DRAWN finds it by its accent outline, RING_NAMES cannot find the rule that drew it, and the corpus reading reports a ring no rule named. It takes var(--here-ring) and declares --lf-here-ring: toc-link, which is the same paint and puts the rule in the population the floor divides by. Both are faults in the corpus ring walk, and neither alone turns it green. The walk is nightly and stops on its first fault, so the shot test also asks directly that the ring the keyboard leaves holds the whole card.
leaf-agent
left a comment
There was a problem hiding this comment.
One finding, on the shot half. The contents-link half is the same paint written through the token — --here-ring is 2px solid var(--accent) and calc(-1 * var(--here-ring-w)) is -2px — so it adds the name the floor was missing and changes nothing on screen.
Moving the ring to lf-shot also moves it off the only boxes in the card that carry a radius. lf-shot's own rule is display: block; margin: 16px 0 with no border-radius, while .lf-shotrail rounds its top corners and .lf-shotframe its bottom ones at var(--r) (6px). So the ring now draws a square rectangle round a card with rounded corners, and each of the four corners shows a wedge of page between the ring and the card it names. Before this change the ring's two bottom corners followed the frame's radius.
Measured on the exported release-notes page with the flip focused: getComputedStyle(shot) returns 0px for all four border-*-radius against 6px on both the rail and the frame. Adding border-radius: var(--r) to the focus rule fixes it, and reaches nothing else — lf-shot paints no background or border of its own and does not clip, so the radius is visible only through the outline. I re-rendered with it added and the ring follows the card's corners.
The new assertion cannot see this: it compares the ring's band against the card's top and bottom, which lf-shot's own box satisfies by containment whatever shape the ring is drawn in. That is the case skills/leaf/CLAUDE.md describes elsewhere as needing a pixel diff rather than a box comparison, so it may be worth leaving the geometry check as it is and letting the corpus walk carry the shape.
The ring moved to lf-shot, which paints nothing of its own and so carries no radius, while the rail rounds the card's top corners and the frame its bottom ones at var(--r). The outline followed lf-shot's square box and left a wedge of page at each corner. Lend the card's radius to the focus rule -- it reaches nothing but the outline -- and ask the shot test for the ring's corners against the rail's top and the frame's foot.
… from the press (#241) ## Problem The nightly leg of `ci` failed on [run 33726571939](https://github.com/max-sixty/leaf/actions/runs/33726571939) (`e71fa11`) with ten cases. Nine are already owned by open PRs — four by #236 (`test_a_widgets_label_takes_a_comment_inside_the_control_it_labels`, `test_a_selection_around_a_targets_buttons_does_not_deaden_them`, `test_a_closed_leaf_clears_itself_off_the_tray`, `test_the_leaves_tray_takes_the_keyboard`), four by #239 (`test_every_passage_in_a_real_page_can_be_quoted[feature-gallery]`, both parameters of `test_ask_addresses_follow_the_feature_gallery_s_visible_margin_controls`, `test_the_shipped_long_thread_opens_beside_its_source_in_the_right_margin`), and the ring walk by #239's `ship-review` precondition ahead of #236 and #240. The tenth is unowned and is what this takes: `test_render_widgets.py::test_a_wait_the_reader_would_notice_says_so_and_a_short_one_says_nothing`, first seen on this run and absent from the three nightlies before it ([33722764498](https://github.com/max-sixty/leaf/actions/runs/33722764498), [33718675826](https://github.com/max-sixty/leaf/actions/runs/33718675826), [33714432132](https://github.com/max-sixty/leaf/actions/runs/33714432132)). ``` AssertionError: a wait worth noticing said nothing: [0.702361, 0.642718, 0.583432, 0.523789, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5] ``` The test took `performance.now()` just before the press and asked that every frame past 400ms had settled at 0.5. The rule it reads is `[aria-busy="true"] { animation: … 140ms linear 200ms both; }` — 340ms in all — but that clock starts at the first frame the busy attribute is *painted* in, not at the press. `#inFlight` sets the attribute synchronously and then renders the controls and updates the margin in the same task, so the animation's start time is the first frame after all of that. Measured here, the fade begins at 233ms and completes at 383ms: 17ms inside the deadline. The reported sample is that whole timeline slipped about 120ms, which is what a loaded nightly worker costs — the frames past 400ms are still mid-fade rather than absent. ## Solution Read the fade on the rule's own clock. Each sampled frame now records the animation's `currentTime` and `playState` beside the opacity. The delay is the frames before `currentTime` reaches 150ms, including the ones before the animation exists at all; the fade is the frames the animation itself reports `finished`. Both halves of the claim survive intact — nothing paints while the wait is too short to notice, and the wait that is long enough ends at 0.5 — and neither is a deadline the machine has to beat. This is `tests/CLAUDE.md`'s **A wait consumes a fact the system states** applied to a reading that was inferring from elapsed time, using the `getAnimations()` route that section names. The sampling window goes 500ms → 700ms so a start that slips still leaves frames on the far side of the fade; it is a bounded `setTimeout` inside the page, not an awaited `animation.finished`. ## Testing `uv run pytest tests/test_render_widgets.py --run-nightly` is green on this branch (82 passed) and `uv run pytest tests` was green (808 passed, 6 skipped) on the commit the run failed on. `ruff check` and `ruff format` at the pinned `v0.16.1` pass on the changed file. Not vacuous, checked from both sides against the rule in `chrome-style.js`: <details><summary>The two negations</summary> | rule changed to | what fails | | --- | --- | | `… 140ms linear 0ms both` (delay removed) | `the wait was announced before it was one: {1, 0.94, 0.88, …}` — the early half | | selector changed so nothing matches | `a wait worth noticing said nothing: []` — the late half | </details> <details><summary>The frame samples, before and after</summary> Sampled locally under three spinning cores, on the original wall clock (`ms since t0`, opacity): ``` (200.3, 1), (217.0, 1), (223.8, 0.999939), (240.5, 0.940296), … (357.1, 0.523868), (373.7, 0.5), (390.5, 0.5), (407.1, 0.5) ``` The fade runs 223→383. The assertion's threshold is 400, so the margin the reading had was one frame. On the animation's clock the same run reads `currentTime` 0 at the frame the attribute paints in, 200 where the fade starts and 340 where it ends and holds — the same numbers the rule is written with. Worth a maintainer's eye rather than a fix here: about 120ms of main thread between the press and the frame the busy attribute paints in is a lot for `SUGGESTION_PAGE`, which is a small fixture. `#inFlight` calls `#renderControls` and `this.#margin?.update()` after setting the attribute, and the animation cannot start until both have finished. The rule is designed for exactly the heavy-page case, so it still does the right thing for the reader — but the cost is the layer's, and it is not visible from any assertion that reads the rule alone. </details> --- Automated fix for [failed run](https://github.com/max-sixty/leaf/actions/runs/33726571939) Co-authored-by: leaf-agent <[email protected]>
## Problem The nightly leg of `ci` failed on [run 33735071949](https://github.com/max-sixty/leaf/actions/runs/33735071949) (`a57ae29`) with seven cases. Six are already owned by open PRs: `test_a_widgets_label_takes_a_comment_inside_the_control_it_labels`, `test_a_closed_leaf_clears_itself_off_the_tray` and `test_the_leaves_tray_takes_the_keyboard` by #236; the ring walk by #239's `ship-review` precondition standing ahead of #240's `lf-shotframe` fault; and both of `test_page_fixture_renders[pr-walkthrough]` (the 4px sideways scroll on `pr-scale-groups`) and `test_nested_command_projections_stop_at_their_own_boundary` (`§ inner-worker`) by #243. The seventh is new with `a57ae29` and nobody's yet: ``` FAILED tests/test_render_conversations.py::test_a_coined_class_cannot_reach_the_chromes_rules AssertionError: the document-level class surface changed: widen the shared vocabulary on purpose Extra items in the left set: 'lf-workspace' ``` #242 wrote the open workspace's tint as `.lf-btn.on, .lf-btn.lf-workspace[aria-expanded="true"]` in `chrome-style.js`, at document level. `lf-workspace` is worn by three controls and all three are the chrome's own — the Threads toggle built at [`leaf.js:817`](https://github.com/max-sixty/leaf/blob/064e67d5/skills/leaf/assets/leaf.js#L817), and All leaves and Asks, which `trayIs` marks at [`trays.js:194`](https://github.com/max-sixty/leaf/blob/064e67d5/skills/leaf/assets/runtime/trays.js#L194). Every one of them is inside `chromeRoot`, the `.lf-chrome` container the private stylesheet is scoped to. So the name reached document level without being shared vocabulary, which is the seam the pinned set exists to catch — the same one #152 answered for the keycap rules. ## Solution Move the selector into the `@scope (.lf-chrome)` block, beside `.lf-banner-more[data-lf-news]`, which paints the same accent face for the same kind of banner state. `.lf-btn.on` keeps its document-level rule, unchanged and now on its own: `on` is worn out in the page and is the reason that line was there before #242. Nothing about the paint moves. Specificity is unchanged, and the one rule that could contend — `.lf-banner-menu > .lf-btn { border-color: transparent }`, for a workspace control folded into the overflow menu — is `(0,2,0)` against this selector's `(0,3,0)` on both sides of the move, so scope proximity never gets a say. Fixing it at the pinned set instead would have widened the shared vocabulary by a class no widget can wear, which is what the assertion's own message asks you not to do. ## Testing On this branch, rebased on `fdba9e1d`: - `uv run pytest tests` — 808 passed, 6 skipped - `test_a_coined_class_cannot_reach_the_chromes_rules` and both parameters of #242's `test_workspaces_replace_each_other_and_name_the_open_one` pass - `uv run pytest tests/test_render_conversations.py tests/test_render_controls.py --run-nightly` — 141 passed, and the three failures are #236's two tray cases and the ring walk, all reproducing identically on `main` Not vacuous: deleting the scoped rule fails the workspace test at both 500 and 1200 with the resting face (`rgb(238, 234, 222)` where the active face is `rgb(255, 254, 251)` under `--chip`) rather than passing by construction. `chrome-style.js` is served rather than bundled, so there is nothing to re-vendor, and no user-visible pixel changes, so there is no before/after shot to hand over. --- Automated fix for [failed run](https://github.com/max-sixty/leaf/actions/runs/33735071949) Co-authored-by: leaf-agent <[email protected]>
Problem
The nightly leg of
cifailed on run 33722764498 (30ed7c7) with ten cases, and every one of them is already owned by an open PR — six by #236 and four by #239, with no eleventh. That is the whole of what the run says, so the useful question is the one neither of those branches' own CI can answer: what is left once both are in. Composing them locally (mainat30ed7c7, plus both branches) turns nine of the ten green and movestest_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpuspast #239'sship-reviewprecondition and into the walk itself, where it stops on a fault neither branch introduced or can see:Fixing that one lets the walk finish, and a second fault falls out of its end: four contents links paint a here ring that no rule named.
Solution
The rail and the frame are one card, so the ring goes round the card.
30ed7c7put the state rail abovelf-shot's frames — flush, sharing the card's border and radius — and left the here ring on.lf-shotframewithoutline-offset: 1px. Measured on the shot page: the rail's box is 499→534, the frames' 534→895, so the ring's top run is drawn at 531, three pixels up inside the rail. That is a rule across the card rather than a ring round the thing in hand, and the rail's own opaque surface is what stands there. The ring moves tolf-shotitself, whose box is exactly the rail plus the frames (499→895, same left and right), so--lf-here-ring: shotnow names the card the reader is holding.lf-shotpaints nothing of its own and so carries no radius, while the rail rounds the card's top corners and the frame its bottom ones atvar(--r), so the focus rule lends that radius to the outline — it reaches nothing else.A ring the layer draws has to say so.
lf-toc a:focus-visiblewrote2px solid var(--accent)out longhand.RINGS_DRAWNfinds it — it asks the paint, and accent-coloured outline is a here ring — whileRING_NAMESasks the rule for the layer's token and cannot find it, so the reading reports a ring whose rule no one can name and the floor below divides by a population short of it.--here-ringisvar(--here-ring-w) solid var(--accent), so taking the token and declaring--lf-here-ring: toc-linkis the same paint with the rule back in the population.render_cases_layout.pysays this is where such a rule is meant to be caught, rather than excused at the declaration.Both faults are in the same walk and neither alone turns it green, so they land together.
Testing
On the composed tree (
30ed7c7+ #236 + #239),test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpusfails as quoted above, passes the walk with the first fix and then fails ona "Is that enough for the f", a "Readiness docket", a "The iOS reconnect stall", a "The objection that matte", and passes with both — 692 stops, no faults, every declared ring lit.On this branch (
mainate71fa11, so without either PR) the walk still stops at #239'sship-reviewprecondition, which is why the shot test also asks the claim directly.uv run pytest testsis green (808 passed, 6 skipped),tests/test_render_commands.py,tests/test_render_widgets.pyandtests/test_render_export.pyare green under--run-nightly, andpre-commitpasses on both changed files.Why the shot test asks it as well as the walk
The corpus walk owns this claim, but it is nightly and it reports its first fault only — three defects were stacked behind one assertion here, and the one this PR fixes shipped on
maininvisible under two others. Sotest_a_shot_shows_one_frame_and_flips_between_themtabs to the flip and asks that the ring's box holds the rail and both frames. Stashing the theme change fails it on the name ('none' == 'shot'), so it is not vacuous.The contents-link half gets no second reading. Its whole content is that a declaration uses the layer's token, which is exactly what the corpus floor is for.
What the ten cases do on today's main
mainmoved twice while this was in progress (c3a09c0,e71fa11). Re-run one71fa11,test_the_g_chord_reaches_panels_and_document_listsandtest_escape_lets_go_of_the_ask_the_reader_is_standing_onnow pass —e71fa11restores theg m/g Mgrammar from the other side. The other seven still fail exactly as the run reports, so eight cases remain: seven plus the ring walk.Worth knowing rather than acted on here:
e71fa11lands on the ground #236 is standing on. That branch now conflicts withmainintests/test_render_navigation.py, and two of the six cases it answers are answered onmainalready.Automated fix for failed run