Repository navigation
Cast the screenshot handle's lift in --shade, and re-arrange five nightly tests around what #886, #889 and #892 moved - #903
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
Verified the six repairs against what produced them: --shade is the only elevation shadow the layer had left hand-mixed, at() in render-checks/locate.js does return <strong> in <lf-option id=c-bearer> and <div> in <lf-drift id=drift-note> for those two fixtures, and the #886/#889/#892 attributions hold against each commit's own per-file diff. All six cases pass here, and the two margin ones are 5/5 green on repeat.
One thing the diff leaves standing. The new wait in test_render_margin.py is the third place a test has had to name, by hand, a specific widget that is still arriving after the page said it presented: test_margin_layout_batches_the_composed_page_without_refolding_controls and test_unchanged_margin_refresh_cost_is_bounded_by_refresh_count each wait on [data-interaction-frame] carrying data-interaction-ready, and this adds lf-shot wa-comparison. BOTH_STAMPS deliberately does not cover an upgrade placed after presentation, so a test that measures a settled page has to know which widgets its own fixture defers — and the next widget that defers reddens some other test at a wait far from its cause.
That is one missing fact rather than three waits: a page-level stamp a deferring widget raises when it lands, which open_page could wait through, would settle it for every fixture at once. The PR body names the doubled margin layout it defers to #892; this shape goes unnamed, and each added wait makes it a little less visible. It is fair to take on its own terms rather than inside a CI repair — the harness makes that same call for the unstated navigation timeouts (render_harness.py, at HANDOVER_DEADLINE_MS: "a change to make on their own terms rather than inside a CI repair") — but the next reader should know the shape is now at three.
|
The run's other six are #910: three cases standing on the popover contract #894 changed, and three on what #895 moved. No overlap with this branch. |
|
Nothing on The run's other six are #910's, unchanged from its own thread. The blocker raised here is unchanged too: |
… rows, and move six nightly tests onto #894 and #895 (#910) `ci` on `main` went red at b7bd021 (#904): [`lint` and `test` passed, and the complete suite in `nightly` failed on eleven cases](https://github.com/max-sixty/leaf/actions/runs/35670525383). One is fixed on today's `main` by e291a95, four are #903's and still open, and this PR is the other six. None of them is #904's. They come from two features that landed earlier the same day and were validated against the everyday gate rather than the nightly selection, so the first run to reach them was this one. **#894 made the command reference dismiss the popover it is opened over. Three cases still assert the restoration it removed.** Opening the reference now follows the platform's modal transition: auto popovers close and are not rebuilt. `test_the_version_menu_is_worked_by_pointer_and_key`, `test_the_versions_menu_suspends_the_pages_own_keys` and `test_a_row_the_platform_activates_names_both_of_its_keys` each ran the reference round trip mid-case and carried on working the menu behind it. They now assert the dismissal where they asserted the return, and stand the menu up again through `open_versions` where the rest of the case needs it. The pair of boundary rows in the third case needed the runtime instead, and is the second fault below. **#895 hoisted a thread's first message head out of the message and onto the card. Two cases still read it from the message.** `ThreadView` renders `messages[0].header` into a `.lf-thread-root-meta` row that carries the thread's Resolve beside the author, so `.lf-edited` and `.lf-conversation-head` are no longer inside `.lf-conversation-msg`. `test_an_agent_message_edit_updates_the_panel_and_its_inline_conversation` read the edit disclosure from the message node on both surfaces and found nothing; it now reads it from the card holding that message. `test_the_margin_groups_meanings_at_one_destination_without_moving_the_page` resolved the head to `null` and raised on its box. Its selector now names the row, which is what has a box — the head itself is `display: contents` there, so keeping the old selector shape would have left that assertion reading zeros and passing vacuously. **#895 moved `--thread-card` from 460px to 380px. One case's viewport was tuned to 460.** `test_a_thread_beside_its_cluster_takes_the_room_to_the_visible_edge` is the narrowing case in a ladder of three: at 1440 the rail used to fall a few pixels short of the card's measure. Against 380 it leaves 453px of room, so the card takes its preferred width with room to spare and never reaches the visible edge. The case runs at 1220 now, where the room is 343px, and asserts that arrangement against `--thread-card-min` and `--thread-card` before it asserts the outcome — so the next move of either token reddens the premise and names the width to re-pick rather than reading as a layout regression. **One fault in the layer: the card's Dismiss lost the row it shares.** Before #895 the margin preview's thread head was absolutely positioned at `inset-block-start: 12px`, the same inset as the card's own head, and Resolve and Dismiss sat on one line. #895 replaced it with the sticky `.lf-thread-root-meta`, which starts inside the thread's own 4px of padding, while the card's head stayed at 12px — so the two icon actions in that corner are 4px out. The stylesheet still states the arrangement they are meant to keep (`The retained settlement action is positioned against the card, alongside Dismiss`), and the nightly case is the reading of it. The head now starts at the card inset plus that padding, so Dismiss lands on the row Resolve rides; the comment beside it is updated to say which of the two is positioned against which, since #895 reversed that. **A second fault: the versions menu's two Tab rows can no longer be read anywhere.** `version.leave-forward` and `version.leave-backward` declare `when: () => atVersionBoundary(…)`, which compares `document.activeElement` against the menu's stops. That is a dispatch question — the press closes the menu only from the end it is held to — and since #894 the reference asks it of a menu the modal has just dismissed, so it answers no for both and the catalogue drops them. They are the only rows in `In the versions menu` that vanish: the other seven stay, each with `data-lf-available="false"`, which is the reading `test_reference_accepts_native_popover_dismissal_across_modal_entry` already asserts for `version.open-v*`. `?` is the only door into the reference and it always dismisses the menu, so no scene is left in which either row can be read, and the shortcut bar names only the one direction the reader can take from where they stand. Both rows now carry `commandReferenceWhen: () => true`, the hook `command-reference.js` offers for this exact split and that its own rows and `margin-projection.js` use, and the third case asserts both directions again, each marked unreachable. ## Verification The six cases pass on this branch and all six fail on `main` without it, along with the neighbouring short-rail case the narrowing one shares its fixture with. Run whole under `--run-nightly` on this head: `tests/test_render_anchors.py` 93 passed; `tests/test_render_navigation.py` and `tests/test_render_controls.py` together 240 passed with one failure, `test_every_shadow_the_layer_lifts_a_box_with_is_cast_in_the_scheme_s_own_ink`, which is #903's; `tests/test_render_margin.py` 125 passed with one failure, `test_a_forced_inline_thread_keeps_its_control_inside_the_margin_budget`, which is #903's too. `tests/test_render_widgets.py` was 179 passed before the reference commit, which does not touch it. `npm run test:runtime` is 33 passed, and pre-commit is clean on the changed files. The reference reading was measured directly in a browser both ways: without the row change the version scope shows seven commands and neither boundary row; with it, nine, both boundary rows reading `data-lf-available="false"` beside `version.open-v1` and `version.open-v2`. PR CI's `lint` and `test` do not reach any of these cases, since the nightly selection is what holds them. <details><summary>Attribution, and what this leaves</summary> **Attribution.** Each failure was placed by running the case against the runtime and tests at the commits between the two nightly runs. The three versions-menu cases fail with #904's assets reverted to 517c4c2, so #904 is not their cause; 1888c6e (#894) is, and its own diff moved `tests/test_render_navigation.py` and `tests/test_render_controls.py` onto the new contract while these three sat in a third file. `git show 39d9cad -- skills/leaf/assets/theme.css` is the `--thread-card` move, and `git log -S externalHeader -- skills/leaf/assets/runtime/conversation/messages.js` returns 39d9cad alone. **The measured geometry.** The narrowing case needs the width left for the card — the gap between the cluster and the visible edge, less the 8px either side — to fall between `--thread-card-min` and `--thread-card`. Measured on the gallery, that width is half the viewport less 267px while the viewport is at or above 1160, below which the rail's own breakpoint moves it: 453px at 1440, 373px at 1280, 343px at 1220, 313px at 1160, and 148px at 1120. The two tokens leave a window from 1174 to 1294, and 1220 sits near its middle. On the alignment fix, Dismiss and Resolve read `top: 523.3` and `527.3` before and `527.3` for both after. **Not in this PR.** Four of the run's eleven belong elsewhere. `test_a_widgets_native_control_names_the_press_the_platform_makes` was repaired on `main` by e291a95, which renamed it; the other four — the elevation shadow, the printed-page word, the widget-root projection and the forced inline thread's margin budget — are #903's, which is open and based on 5854f06. That PR also rewrites the case e291a95 has since replaced and drops the `NATIVE_CONTROL_PAGE` fixture `main` still uses, so it needs a look at `main` before it lands; noted on that thread. **What produced all six.** Both features changed a contract that the everyday gate does not reach and the nightly selection does, and both were validated against the gate that runs before merge. Nothing here changes that; it is the same shape #903 names, one nightly run later. </details> --------- Co-authored-by: leaf-agent <[email protected]>
|
@leaf-agent please revise this before it lands. Refresh the branch against current Replace the new
|
|
Measured here on today's So this PR is now the whole of |
|
This merged at 57b00cd as it stood, so both revisions asked for above are a follow-up: #913. The silent combination is live on The The other four repairs here are unchanged and stay on |
…d widgets have landed (#913) #903 merged at 57b00cd without the revision asked for on its thread, and left two things behind. This is both of them. **`test_staged_widget_controls_name_the_presses_their_owners_make` now contradicts itself on `main`.** `main` had repaired that case in e291a95 by driving the upgraded `wa-comparison` handle; #903 still carried the older rewrite of the same case under its previous name, which holds `**/vendor/webawesome.esm.js` from outside the page so the fallback checkbox never gets hidden. Git combined the rename with the body silently — no conflict, and GitHub reported the branch mergeable — so `main` now holds the bundle and then waits for the component that bundle defines. It cannot appear, and the case fails on its first read of it. This restores 49952af's version of `tests/test_render_anchors.py` and `tests/render_cases_navigation.py`, which is e291a95's test and the `NATIVE_CONTROL_PAGE` fixture it reaches through. No other part of #903 is touched. **A page can now say when it has stopped arriving.** Presentation says the reader may interact; it does not say the page has finished. `lf-shot` puts Web Awesome's comparison after presentation on purpose (#892), and the interaction gallery's contained documents arrive later still — each moves boxes when it lands. Nothing outside the page could see that, so three tests named a widget of their own fixture by hand and waited for it: two on `[data-interaction-frame][data-interaction-ready]`, and #903 added a third, `lf-shot wa-comparison`, to stop `test_a_settled_page_with_a_standing_reaction_stops_rendering_its_margin` counting the comparison's two margin layouts as the render cycle it denies. A widget that wants the reader to have the page first now runs that work through `afterPresentation(() => …)`, which is the wait and the declaration in one call, so there is no way to defer without the page counting it. `pageArrived` answers whether anything is still outstanding, and `open_page` waits through it. All three hand-written waits are gone, and the next widget to defer settles every fixture without a fourth. ## Verification `tests/test_render_anchors.py`, `tests/test_render_gate.py`, `tests/test_render_margin.py` and `tests/test_render_startup.py` ran whole under `--run-nightly`: 425 passed, covering the restored staged-control case and all three tests whose hand-written waits this removes. The everyday suite is 1,213 passed, `npm run test:runtime` is 33 passed, pre-commit passes on the changed files, and the shot and Web Awesome cases in `tests/test_render_widgets.py` and `tests/test_render_commands.py` pass. Six cases fail in this CI sandbox on a clean `main` checkout as well, and were confirmed against one: five everyday cases that need `AF_UNIX` or a umask the sandbox does not keep, and `test_a_shot_still_flips_with_every_script_removed`, whose export subprocess cannot launch a browser here. <details><summary>Why a page-level fact rather than a fourth wait, and what this leaves</summary> **What the settled-page case was measuring.** Moving the shot's two frames into `wa-comparison` lays the margin out twice a few milliseconds apart, at whatever moment the module happens to resolve, and the test allows one layout across thirty frames. Measured on #903's branch: without any wait it went red on 2 of 12 local runs, with both layouts landing 6–13ms apart inside the first 700ms of the window; holding `**/vendor/webawesome.esm.js` from outside the page instead, changing nothing else, was 8 of 8 with no layouts counted at all — which is what identified the upgrade rather than the two-second heartbeat the test's docstring had assumed. On CI it was red in [35650845868](https://github.com/max-sixty/leaf/actions/runs/35650845868) and [35683511692](https://github.com/max-sixty/leaf/actions/runs/35683511692) and green in [35670525383](https://github.com/max-sixty/leaf/actions/runs/35670525383) and [35677461023](https://github.com/max-sixty/leaf/actions/runs/35677461023). **The doubled layout itself is not fixed here.** One document change producing two margin layouts on adjacent frames is a doubled render in the thing that test exists to bound; whether the upgrade should lay out once is #892's question. That is unchanged by this PR, and easier to reach now that the page states when the upgrade has landed. **What the new fact does not change.** `afterPresentation` does not move work onto the presentation path — the arrival runs exactly when it ran before, and `test_a_shot_compares_its_frames_with_a_direct_divider` still holds the bundle's `startTime` at or after `data-lf-presented`. What changed is only that the page can be asked whether the arrival has landed. **The other readers of the same fact.** `leaf version check`'s probes stop at `currentPresented` (`skills/leaf/scripts/leaf/render-checks/runtime.js`), and `scripts/example-previews.py`, `scripts/record-demo.py` and `scripts/verify_site.py` shoot on `data-lf-presented` alone, so each can still read or photograph a page whose deferred widget has not landed. That is the same missing wait at other readers, now one stage away from each; a gate change alters what a public command waits for and a preview change rewrites generated output, so neither is folded in here. The gate's own `pageSettled` is a different fact — no finite animation still running — which is why the new one is `pageArrived`. </details> Co-authored-by: leaf-agent <[email protected]>
cionmainwent red at 7925553 (#892):lintandtestpassed and the complete suite innightlyfailed on eleven cases. Five of them were #884's and #891's, both since merged, and the visual-review one is green again on today'smain. This PR is the other six, which arrived together because three features landed between that run and the one before it and none of them was validated against the nightly selection.One is a fault in the layer. The other five are tests still standing where those features used to put things.
The comparison handle's lift is cast in
--shade. #892 gavewa-comparison's handlebox-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 20%, transparent). The layer states one shadow ink per scheme precisely because a hand-mixed colour can only be right about one ground — a drop shadow written for the light paper lifts a dark one by a fraction of what it promises — andtest_every_shadow_the_layer_lifts_a_box_with_is_cast_in_the_scheme_s_own_inkis the reading that holds every elevation shadow to the token. The handle now spends it.#889 made a finding say where it is; two assertions held the old wording.
render-checks/locate.jsreads an element without an id as<strong> in <lf-option id=c-bearer>rather than as the host alone. That is the change #889 made on purpose, so the two nightly assertions that spelled the host move to the stated form.#892 made the screenshot's checkbox a fallback; a test still pressed it.
test_a_widgets_native_control_names_the_press_the_platform_makesscrollslf-shot's transparent checkbox into view and presses Space on it. Since #892 the theme hides that checkbox the moment Web Awesome's comparison lands, so on the live page there is no control there to scroll to. The test now holds the bundle from outside the page throughprimed, which is whattests/CLAUDE.mdasks for when the ordering matters — an arrangement rather than a race. It needed a page of its own to do it:lf-diffimports the same bundle at the top of its module, so holding it on the combined fixture left that widget unupgraded and the page never presented. The staged-control half of the test now runs onDIFF_PAGE, andNATIVE_CONTROL_PAGEgoes with the split.#886 added a thread to the gallery; a walk was counting presses to a different one.
test_a_forced_inline_thread_keeps_its_control_inside_the_margin_budgetpressedttwice to walk from the gallery's first thread to the crowded suggestion's. #886's summary example anchors atbg-thread-checkpoint, which sits between them, so the second press landed there and the test went on to measure a card three thousand pixels from the cluster it names. The walk now goes to the thread it is for, gives up when it comes back round to one it has already stood on, and waits for each press's arrival before the next.#892's upgrade arrives after the page says it has presented; a settled-page reading started before it.
test_a_settled_page_with_a_standing_reaction_stops_rendering_its_margincounts margin layouts across thirty frames on the gallery and allows one. The gallery carries anlf-shot, and moving its two frames intowa-comparisonlays the margin out twice a few milliseconds apart, at whatever moment the module happens to resolve. The stampsopen_pagewaits on do not cover an upgrade deliberately placed after them, so the page was still arriving when the count began. The test waits for the comparison first.Verification
The six cases pass on this branch and five of them still fail on
mainwithout it; the sixth is the intermittent one, measured below.tests/test_render_controls.py,tests/test_render_anchors.py,tests/test_render_projection.py,tests/test_render_margin.pyandtests/test_render_commands.pywere run whole under--run-nightly, along with the everyday suite,npm run test:runtimeand pre-commit on the changed files.Evidence, and what this leaves
The settled-page case is intermittent, and the hold is what names its cause. Without the wait it went red on 2 of 12 local runs, with both layouts landing 6–13ms apart somewhere in the first 700ms of the window — 296/302, 191/197, 521/527. With the wait it is 8 of 8 green. Holding
**/vendor/webawesome.esm.jsfrom outside the page instead, changing nothing else, is 8 of 8 with no layouts counted at all, which is what identifies the shot's upgrade rather than the two-second heartbeat the test's docstring had assumed.Attribution. Each failure was placed by running the case at the commits between the two nightly runs: the margin walk passes at 10d61b2 and 2f8ee1b and fails at 965369b (#886), and
git show 965369b9 -- examples/developer/feature-gallery.htmlis the addedbg-thread-checkpointparagraph and its thread.Not in this PR. One document change producing two margin layouts on adjacent frames is a doubled render in the thing that test exists to bound; this change waits for it rather than removing it, and whether the upgrade should lay out once is #892's question to answer. The wait itself is the third place a test names, by hand, a widget of its own fixture that is still arriving after the page said it presented —
test_margin_layout_batches_the_composed_page_without_refolding_controlsandtest_unchanged_margin_refresh_cost_is_bounded_by_refresh_counteach wait on[data-interaction-frame]carryingdata-interaction-ready, and this addslf-shot wa-comparison. That is one missing fact rather than three waits: a page-level stamp a deferring widget raises when it lands, whichopen_pagecould wait through, would settle every fixture at once. It is a change to make on its own terms rather than inside a CI repair, and until it is made the next widget to defer will redden some other test at a wait far from its cause. Separately, four nightly cases are red on today'smainand are not from this run —test_a_thread_beside_its_cluster_takes_the_room_to_the_visible_edge,test_the_margin_groups_meanings_at_one_destination_without_moving_the_pageandtest_a_diff_surface_keeps_the_complete_thread_lifecycle_inlinein both schemes. All four pass at 7925553 and fail at 39d9cad, so they are #895's, and the run that reaches them will be that commit's own.Environment note. Six everyday cases and the four browser-launch cases in
tests/test_render_commands.pyfail in this CI sandbox on a clean tree as well — noAF_UNIX, no installed Chrome for the subprocess gate — and all of them were green in thetestjob of the run under diagnosis.