Repository navigation
Repair the margin card's Dismiss row and the versions reference's Tab rows, and move six nightly tests onto #894 and #895 - #910
Conversation
… six nightly tests onto what #894 and #895 changed The command reference now dismisses the auto popover it is opened over (#894), a thread's first message head is hoisted onto the card (#895), and --thread-card is 380px rather than 460px (#895). Six nightly cases still stood where those features used to put things, and one 4px misalignment came with the hoist.
leaf-agent
left a comment
There was a problem hiding this comment.
After #894, version.leave-forward and version.leave-backward can never appear in the command reference — and this PR wrote that into test_a_row_the_platform_activates_names_both_of_its_keys as the expected reading. The two rows are the only ones in the In the versions menu scope that vanish: version.later, version.earlier, version.open-v1, version.open-v2, version.current, version.close and version.open are all still listed, each with data-lf-available="false", which is what #894's own test_reference_accepts_native_popover_dismissal_across_modal_entry asserts the scope does. The difference is only that these two declare when: () => atVersionBoundary(…), and atBoundary compares document.activeElement against the menu's stops — a dispatch question, asked of a menu the modal has just dismissed, so it answers no for both and captureCommandReferenceCatalog's filter drops them. Since ? is the only door into the reference and it always dismisses the menu, there is no scene left where either row can be read. The reference is where a reader learns that Tab leaves forward and Shift+Tab leaves backward; the shortcut bar only ever names the one direction they can take from where they stand.
Fixing it rather than pinning it, pushed to the branch next: both rows carry commandReferenceWhen: () => true, the hook command-reference.js already offers for exactly this split and that margin-projection.js and the reference's own rows use. The case asserts both directions again, each marked unreachable, instead of asserting the absence of both.
That leaves the conflation itself for later: when answers "does this scene offer the capability" and "is this key live at this position" with one predicate, and liveInCommandReference turns the liveness filter on for a scope the reader has left, which is backwards from what a retained scope needs. Two more uses of the existing hook leave that exactly as easy to fix as it was.
Nothing else in the diff needs a change. The rest of the test moves match what #894 and #895 shipped, and the card's inset-block-start: calc(12px + var(--sp-1)) lands Dismiss on the meta row with the new metaRow.top ≈ head.top assertion holding it there.
Verification
Measured the reference directly in a browser, with and without the row change: without it, [...document.querySelectorAll('.lf-command-reference-command[data-lf-command^="version."]')] returns seven commands and neither boundary row; with it, nine, and both boundary rows read data-lf-available="false" alongside version.open-v1 and version.open-v2.
All six cases the PR moves pass, plus test_reference_accepts_native_popover_dismissal_across_modal_entry and test_entering_a_covering_workspace_dismisses_an_existing_popover. tests/test_render_margin.py whole under --run-nightly: 125 passed, one failure — test_a_forced_inline_thread_keeps_its_control_inside_the_margin_budget, which is #903's, as the description says. npm run test:runtime: 33 passed. Pre-commit on the changed files: clean.
The everyday suite reports six failures in this sandbox, all of which reproduce identically on 5e393b48: three AF_UNIX sockets, a umask/symlink staging case, and the published-capture bundle. They are the runner, not the branch.
`version.leave-forward` and `version.leave-backward` answer a dispatch question in `when` — where focus stands among the menu's stops — and since the reference began dismissing the popover it is opened over, it asks that question of a menu that has just gone. Both answer no, so the catalogue drops them, and they are the only rows in the scope that vanish: the other seven are listed unreachable. `?` is the reference's only door and it always dismisses the menu, so no scene was left in which either row could be read. Both rows declare `commandReferenceWhen` instead, and the case asserts each direction again, marked reachable in the menu rather than here.
|
None of the ten is #906's — every one of them also failed at b7bd021, which is an ancestor of this head. The one case in the earlier run that is neither this PR's nor #903's is gone, and it went the way this PR's body said it would: e291a95 renamed The six, as they failed in this runEach shape is the one this PR attributes it to: the two menu cases read a popover the modal transition now dismisses, the boundary-row case reads a catalogue the
|
cionmainwent red at b7bd021 (#904):lintandtestpassed, and the complete suite innightlyfailed on eleven cases. One is fixed on today'smainby 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_keysandtest_a_row_the_platform_activates_names_both_of_its_keyseach 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 throughopen_versionswhere 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.
ThreadViewrendersmessages[0].headerinto a.lf-thread-root-metarow that carries the thread's Resolve beside the author, so.lf-editedand.lf-conversation-headare no longer inside.lf-conversation-msg.test_an_agent_message_edit_updates_the_panel_and_its_inline_conversationread 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_pageresolved the head tonulland raised on its box. Its selector now names the row, which is what has a box — the head itself isdisplay: contentsthere, so keeping the old selector shape would have left that assertion reading zeros and passing vacuously.#895 moved
--thread-cardfrom 460px to 380px. One case's viewport was tuned to 460.test_a_thread_beside_its_cluster_takes_the_room_to_the_visible_edgeis 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-minand--thread-cardbefore 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-forwardandversion.leave-backwarddeclarewhen: () => atVersionBoundary(…), which comparesdocument.activeElementagainst 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 inIn the versions menuthat vanish: the other seven stay, each withdata-lf-available="false", which is the readingtest_reference_accepts_native_popover_dismissal_across_modal_entryalready asserts forversion.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 carrycommandReferenceWhen: () => true, the hookcommand-reference.jsoffers for this exact split and that its own rows andmargin-projection.jsuse, and the third case asserts both directions again, each marked unreachable.Verification
The six cases pass on this branch and all six fail on
mainwithout it, along with the neighbouring short-rail case the narrowing one shares its fixture with. Run whole under--run-nightlyon this head:tests/test_render_anchors.py93 passed;tests/test_render_navigation.pyandtests/test_render_controls.pytogether 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.py125 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.pywas 179 passed before the reference commit, which does not touch it.npm run test:runtimeis 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"besideversion.open-v1andversion.open-v2. PR CI'slintandtestdo not reach any of these cases, since the nightly selection is what holds them.Attribution, and what this leaves
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.pyandtests/test_render_controls.pyonto the new contract while these three sat in a third file.git show 39d9cad0 -- skills/leaf/assets/theme.cssis the--thread-cardmove, andgit log -S externalHeader -- skills/leaf/assets/runtime/conversation/messages.jsreturns 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-minand--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 readtop: 523.3and527.3before and527.3for both after.Not in this PR. Four of the run's eleven belong elsewhere.
test_a_widgets_native_control_names_the_press_the_platform_makeswas repaired onmainby 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 theNATIVE_CONTROL_PAGEfixturemainstill uses, so it needs a look atmainbefore 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.