Repository navigation
Build the gallery's Restart press with offer, give block references the secondary ink, and update three nightly tests - #1002
Conversation
…he secondary ink, and update three nightly tests Repairs the four failures still reproducing from ci run 35837027671. - lf-job-requests built its Restart control with document.createElement, so it carried no data-lf-offer and the bake read it as a platform control, leaving a dead press with a hand over it in every copy. - .lf-ref asked for --muted, which reads 4.43:1 on the --ok-tint ground a chosen row wears; --muted-2 is the ink the palette holds to 4.5:1 against the surfaces it lands on. - The ring test called reveal() without the intent #982 made required. - The growing-reply test pressed Return, which #986 turned into submit, and now presses Shift+Return and checks the box itself grew. - The coined-class exception takes the four names #991 and #995 gave a document-level face.
leaf-agent
left a comment
There was a problem hiding this comment.
#997 makes the identical Enter → Shift+Enter change on the same line of test_a_growing_reply_keeps_its_send_in_the_list, so whichever of the two lands second conflicts there. This PR's version is a superset — it also adds the reply-box height reading that keeps the case from passing on message growth — so the cleanest resolution is for #997 to drop its one-line hunk and take this one.
Two things the diff settles at the symptom, both worth a maintainer's call before this is treated as the end of the nightly repair:
Nothing makes offer the only way to build a press. The gallery widget is fixed, but composing/surface.js builds the touch-selection banner control the same way — const selectionComment = document.createElement("button") followed by selectionComment.className = "lf-btn primary" — with no data-lf-offer. It gets the hand, the aim floor and the here ring off .lf-btn alone, and it is registered present: false, so it never reaches a baked copy and the export sweep that caught the gallery's two buttons cannot see it. That sweep is the only enforcement the marker has, it runs nightly, and it only reads controls a desktop export happens to paint. The durable answer is a rule in the everyday gate — every pressable the layer builds carries the marker — rather than a second widget repaired after the fact.
The coined-class exception is an enumeration where the sheets already state the fact. set(surface["themed"]) has gone from 8 names to 44, and this diff adds the four that #991 and #995 earned. Each of the four is correct — I checked that all four carry a document-level rule in shadow.css and a scoped one in chrome.css — but the test asks a maintainer to restate in a list what the stylesheets already say, in a module the everyday gate does not run, so the restatement is always late and always arrives as a red main. AGENTS.md's Keep the layer open asks the other consumers to read declarations rather than name lists; this probe is the one that still reads a list.
Neither is this PR's to carry if the aim is to green nightly, and adding four names leaves both exactly as easy to fix. The body names the gate gap; it does not name either of these, and they are what will produce the next two of these PRs.
What I verified
All four cases from run 35837027671 pass on this branch under --run-nightly -n0, as does test_projected_request_rows_have_independent_buttons.
The contrast arithmetic checks out in both schemes, and --muted-2 regresses nothing it now lands on: 4.510:1 on --ok-tint light against --muted's 4.433:1, 4.635:1 on --ok-tint dark, 5.191:1 and 5.555:1 on light and dark paper. The row's hover ground is --chip, so the same substitution clears the 4.469:1 the body flags there for the one element that reads it.
offer("button", "lf-btn", "Restart") reproduces the removed lines exactly — node.type = "button" and `${cls} lf-ui` — and the data-lf-gen it adds changes nothing for a control that already wore lf-ui: both readers of that attribute, the framing check and the shadow-root sweep, match .lf-ui and [data-lf-gen] alike.
reveal(node, () => true) matches the two-argument contract, and Enter is matched exactly on Shift as a named key, so Shift+Enter cannot reach the submit binding.
The scheduled [nightly run](https://github.com/max-sixty/leaf/actions/runs/35851210059) on `895a629c` failed nine browser cases. Five are covered by merged #1002 and #1003. The other four reproduce on current main at `3aa1888` and are repaired here. These are stale test arrangements after two intentional changes: - A multiple-choice options tick no longer answers its Ask before Done (#966). The margin-label paint test now uses a single-choice Ask, so the pick produces the receipt whose label it measures. - Only an answered Ask creates an agent workflow (#983). The export test marks its draft `needed`, making its edit a real Ask answer before checking that export strips the live pickup status. The two-unit arrival test classifies two cards in a swipe-deck Ask, then checks their distinct pickup and work pulses in the margin and Page Map. Ordinary board moves no longer serve that role. - The shipped triage-board rail test now creates and resolves an anchored thread. It verifies that a real margin entry appears and disappears without moving the readable column. Verification: all four repaired cases and the neighboring receipt lifecycle case pass together under `--run-nightly -n0` (5/5). Pre-commit passes on the changed files. > _This was written by Codex on behalf of max-sixty_
Main's
nightlyjob has been red since the complete suite last took a turn: run 35837027671 reported five failures on 1b4fb67. Four still reproduce on current main and are fixed here; the fifth,test_a_stamped_live_draft_and_its_unstamped_view_keep_distinct_menu_rows, already passes there and is untouched.Behind those four are five causes. Two are defects in shipped code — a package widget that builds a press outside the layer's press contract, and a reference link that misses AA on the ground a chosen row wears. The other three are tests still spelling a contract a merged change moved, each in a
test_render_*module the everyday gate does not run, so the change landed green and reddened main afterwards.The exported corpus offers a press it cannot take
test_the_exported_corpus_stands_on_its_ownfound twobutton.lf-btn lf-uielements wearing the pointer hand in a standalone copy with no script to answer them.data-lf-offeris the layer's one spelling of a press: the theme hangs the hand, the hover wash and the here ring on it, and the bake reads it to decide what a file can still work.lf-job-requests, added with projected requests in #985, builds its Restart control withdocument.createElement("button"), so it carries no marker — and the bake'sbrowserControlselector matchesbutton:not([data-lf-offer]), so it read both presses as platform controls that keep working without Leaf and left them standing. What stayed was.lf-btn's own paint over a control whose behaviour went with the scripts.Building it with
offer("button", "lf-btn", "Restart")is whatreferences/packages.mdalready asks of a module — "offer()andrelabel()on anything injected" — and produces the same element plus the marker, so the aim floor, the here ring and thegtarget map reach it too. The widget's own nightly case,test_projected_request_rows_have_independent_buttons, still passes.A block reference misses AA on a chosen row
Behind that assertion the same test had a second failure: axe reports
color-contrast(serious) on the§ off-t-resynclink in the exported corpus's chosen option, at 4.43:1.It became reachable in the same window for a good reason. On the last green nightly the copy had lost the authored
chosenattribute; it now keeps it. The corpus's log holds nochooseaction for that group, so the attribute is the document's initial condition and keeping it is what the markup says. The row form's ground exists precisely so a copy says which option was taken, and now it paints:--ok-tint..lf-refwas asking for--muted, the document's quiet ink, which measures 4.433:1 on--ok-tint.--muted-2is the token the palette states is "held to 4.5:1 against the page surfaces it lands on", and a generated§reference is layer chrome rather than document prose, so that is the ink it should have been wearing. The two differ by two points per channel, so nothing visibly moves and the reading clears.Worth a maintainer's eye separately:
--mutedalso measures 4.469:1 on--chip, so the same shortfall exists anywhere the document's quiet ink lands on a layer surface. Nothing reads it today, and widening the repair past the one element the gate names did not seem mine to decide.revealnow requires the intent its caller retained#982 removed
reveal's default second argument and made a missing one aTypeError, so no delayed caller can take a fresh intent after its wait.test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpuscallsrevealthrough__lfRuntimeImportto open whatever container a ring specimen sits in, and still passed one argument.That disclosure is not a reader's delayed work a later input may supersede — it is the arrangement saying what the page must show next — so it hands over the intent that always holds.
Return submits from a Leaf composer; Shift+Return is the line break
#986 moved the shared composer's submit onto Return.
test_a_growing_reply_keeps_its_send_in_the_listgrows a reply box by typing a line and pressing Enter, so each press sent that line as its own reply instead of inserting a newline.The card still overran the list — on eleven arriving messages rather than on the box — so the
assert overranguard that exists to catch a vacuous run passed, and the failure surfaced thirty seconds later as await_for_functiontimeout on the Send button. The test now presses Shift+Enter and reads the reply box's own height before and after the typing, so the next time that key's meaning moves the failure names the cause instead of timing out on a symptom.Two commits gave a scoped chrome class a document-level face
test_a_coined_class_cannot_reach_the_chromes_rulesprobes for a scoped rule leaking onto a page element, and keeps an explicit list of the classes held out of that probe because the theme dresses them at document level on purpose. #991 put.lf-compose-placeholderin both sheets, and #995 did the same for.lf-action-icon,.lf-conversation-headand.lf-msg-sendingwhile rebuilding the margin card's sticky head.All four are the case the list already documents — the theme dresses a shared control or message part wherever it renders, while the chrome's scope only places its own copy — so the exception is widened with each one's reason, which is what the assertion asks for.
Verification
Run on this branch under Ubuntu 24.04 with
--run-nightly: all four failing cases pass, as dotest_projected_request_rows_have_independent_buttons,test_the_feature_gallery_has_no_serious_wcag_a_or_aa_violations,test_the_adopted_sheet_decides_nothing_by_standing_last, andtest_render_options.py/test_render_options_addition.py— 74 passed, one failure. Each of the four was reproduced first on unmodified main, so none of them is the run's own noise. Pre-commit passes on the changed files.That one failure,
test_a_widget_move_keeps_one_target_seat_across_revisions_until_honored, is not this branch's and is not in the run being fixed: it passed on 1b4fb67, and it fails identically on unmodified 895a629 — alone, under-n0, in 10 seconds, onexpect(receipt).to_have_attribute("data-lf-kinds", "sent"). It is a later regression from the seven commits that landed after this run, and main's in-flight nightly will report it on its own.The run's five failures, and where each stands on current main
The contrast reading was pinned against the last green nightly (00d7a41), where the same test passes and the exported chosen option computes
background-color: rgba(0, 0, 0, 0); on current main the same node computesrgb(223, 237, 223).