Repository navigation
Finish workflow UI cutover in nightly tests and standalone export - #969
Conversation
Replace stale receipt selectors with canonical message workflow lines, and follow the current accessible description and prior-data labels in two page journeys.
leaf-agent
left a comment
There was a problem hiding this comment.
Feedback on work in progress, not a merge verdict — mark it ready when you want the full review.
The readings themselves are right. On this branch all five updated test_render_startup.py cases pass, and test_render_widgets.py + test_render_visual_review_journey.py pass 185/185. What I'd weigh before this leaves draft is what the update is recording.
.lf-receipt is now a dead class, and the export still strips by that name
Nothing in the runtime emits .lf-receipt any more — conversation/messages.js renders <span class="lf-msg-sending" title=${model.workflowTitle}>. Four places still select the old name:
render-checks/standalone.js— its removal list is'script, link[rel="canonical"], .lf-chrome, .lf-receipt, .lf-say, ' + 'leaf-anchor-note, …', under a comment that reads "A thread's own line is built as.lf-receipt" and "Sent, Waiting for pickup, and Picked up are news about a live handoff. A file has no session behind it, so keeping one would turn provisional news into a statement." That selector now matches nothing, so the standalone copy keeps the line.render-checks/reachability.js—if (el.closest(".lf-receipt")) continue;, the skip that stops a workflow line inside a widget being read as unreachable authored prose.runtime/widget-elements.js—[...held, WORKS, "[data-lf-offer]", ".lf-receipt"].join(","), the guard that keeps a gesture on the status from casting onto the widget part it sits in.assets/shadow.css—.lf-receipt.lf-message-receipt,.lf-receipt-state,.lf-receipt-live, and.lf-message-receipt[data-lf-dropped].
The export one is live, not theoretical:
Reproduction — a standalone copy keeps "Working"
An lf-diff page with one anchored comment, leaf status … working "checking the shard" --on <comment>, then exporting.export_page(...) and open the file:
LIVE workflow count: 1 text: ['Working']
COPY workflow count: 1 text: ['Working']
Against .lf-receipt the copy count was 0. The strip needs .lf-msg-sending, and reachability.js / widget-elements.js need the same name.
Nothing caught it because every surviving .lf-receipt reading in the suite is an absence assertion — expect(thread.locator("button, textarea, .lf-receipt")).to_have_count(0) in test_render_export.py, and the same shape in test_render_options.py and test_render_conversations.py. A to_have_count(0) on a renamed selector passes for the wrong reason, so the rename silently converted the export's guard into a no-op. That is the thing above the individual readings: this PR finishes the rename in the suite's positive assertions while the negative ones keep standing on the dead name.
The dropped-vs-quiet distinction is no longer observable on a message
activity.py still computes item["dropped"] per workflow, and the roster still spends it: live-leaves.js builds const silence = dropped ? `Left (${ago(entry.turn_closed)})` : `Quiet (${ago(ts)})`;. On a message both collapse to Update stale with no time and the same --muted — the only rule that read the distinction was .lf-message-receipt[data-lf-dropped] on the dead class above.
That is why test_a_work_line_says_when_its_claim_has_gone_quiet reads oddly now. Its two arrangements — 40m quiet under a live turn, and 6m under a closed turn — assert the identical text, title and colour, and expect(work_line.locator("time")).to_have_count(0) is asserting against a span that never held a time. The rewritten docstring drops the old one's premise ("The roster's answer is a point in time on the shared rope, and this says it as the past tense of the same state") without saying the seat stopped answering, and the name still promises a "when" the body no longer proves.
Worth deciding which way it goes before this lands, since the test name is the durable claim: either the message line regains the date the roster still gives, or the test says what it now proves. The rename is the minimal consistent form if the collapse is intended.
Replace obsolete receipt selectors in export, print, reachability and widget gesture guards. Assert a live workflow exists before export and disappears from print and the copy; remove dead receipt styles.
leaf-agent
left a comment
There was a problem hiding this comment.
Feedback on work in progress, not a merge verdict — mark it ready when you want the full review.
The cutover moved the emitter but not the shadow-tree rule
Deleting the .lf-receipt.lf-message-receipt block takes away shadow.css's only statement of the message workflow line's face, and nothing re-states it under .lf-msg-sending. The one rule for that class lives in runtime/chrome.css inside @scope (.lf-chrome), so it stops at the chrome panel. A thread seated in a declared widget tree — the case this file exists for, and the case this PR's own new export test renders — falls back to inherited text.
Measured in the merged tree on lf-diff .lf-conversation-thread (the test_inline_threads_keep_their_words_without_live_controls_in_static_media arrangement), against the same line in the panel:
| widget tree | chrome panel | |
|---|---|---|
color |
rgb(28, 27, 24) (--ink) |
rgb(111, 106, 96) (--muted) |
font-weight |
400 |
600 |
white-space |
normal |
nowrap |
::before |
none |
"·" |
So "Working" reads inside the diff as full-ink body text at the same weight as the author's name beside it, with no separator dot.
This is not a regression the commit introduces: .lf-receipt was already unemitted at the merge base (e84a03ad emits .lf-msg-sending from conversation/messages.js and names .lf-receipt only in widget-elements.js), so the deleted rules were already dead. But it is the other half of the cutover the title claims, and the deletion removes the last record that the shape was ever there. Two lines below it, .lf-msg-meta's own comment still says "the state uses the remaining width", naming a state rule the file no longer has — and .lf-msg-failure, the neighbouring header span, is still repeated through the boundary, so the asymmetry reads as an oversight rather than a decision.
The inline suggestion mirrors chrome.css's shape the way .lf-chip in this same file already does ("Repeated here on the terms the chrome rule sets"). If the ellipsis the .lf-msg-meta comment promises is meant to come back with it, that is a second decision — chrome.css does not implement it either (overflow: visible, text-overflow: clip on both readings above), so the comment is describing the old .lf-receipt-state rule rather than anything shipping.
How the readings were taken
A temporary case in tests/, built from the export test's arrangement — an lf-diff page with one comment anchored on a datum, then leaf status … working … --on <comment> — reading getComputedStyle off lf-diff .lf-conversation-thread .lf-msg-sending and off .lf-chrome .lf-thread-root-meta .lf-msg-sending on the same page. line.getRootNode() confirms the first is inside a shadow root and closest('.lf-chrome') is null for it. Nothing outside chrome.css selects .lf-msg-sending: no package theme.css or shadow.css names it, and assets/shadow.css names it only in the @media print rule.
The rest of the push verifies. All the targeted cases pass on this head: both parametrizations of test_inline_threads_keep_their_words_without_live_controls_in_static_media, test_an_export_drops_a_live_widget_work_claim, test_local_work_chrome_does_not_take_its_holder_gesture, test_a_widget_without_a_thread_says_what_the_agent_is_doing, test_a_specimen_in_a_reply_is_quoted_there_too, test_a_widget_move_keeps_one_target_seat_across_revisions_until_honored, test_a_coined_class_cannot_reach_the_chromes_rules, test_a_durable_reply_completes_an_empty_stream_placeholder, test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure, and test_an_exact_workflow_reports_stale_work_beside_a_live_page_claim.
leaf-agent
left a comment
There was a problem hiding this comment.
test_a_coined_class_cannot_reach_the_chromes_rules fails on 921675fd. Moving .lf-msg-sending out of chrome.css's @scope (.lf-chrome) block took it out of the chrome's scoped vocabulary, but the themed inventory the previous commit added still lists it — and themed is scoped ∩ documentGlobal, so a class the runtime sheet no longer names anywhere cannot be a member:
E - 'lf-msg-sending',
E Full diff:
E {
E ...
E 'lf-msg-meta',
E - 'lf-msg-sending',
E 'lf-preview',
1 failed, 101 deselected in 3.70s
tests/test_render_conversations.py is pytestmark = pytest.mark.nightly, and ci.yaml's nightly job carries github.event_name != 'pull_request', so this PR's own gate will be green with the failure in it. It surfaces on main's push run — which is the class of failure this PR exists to clear.
The entry and its comment both go; nothing else in that set describes a class the runtime sheet has stopped naming. Inline suggestion below.
The face itself verifies. Reading getComputedStyle off every .lf-msg-sending in the document and in each open shadow root, an lf-diff inline thread and the panel row for the same comment now agree exactly — rgb(111, 106, 96), 600, nowrap, "·" at rgb(109, 105, 96) — where before this commit the inline one was rgb(28, 27, 24) at weight 400 with no separator. Stating it once in shadow.css rather than repeating it across the boundary is the better shape, and the new export parity assertion is the right place to hold it; the one thing that assertion cannot catch is both seats losing the face together, since it compares them to each other rather than to the intended one.
One thing left over from the first commit. .lf-msg-sending is emitted at exactly one site — conversation/messages.js, inside the <span class="lf-msg-meta"> of a message header — so it can never be a direct child of a thread or a widget. expect(held_thread.locator(":scope > .lf-msg-sending")).to_have_count(0) (three times in test_a_thread_says_what_the_agent_is_doing_about_it), #jobs > .lf-msg-sending, #card-migration > .lf-msg-sending, #rp-live > .lf-msg-sending, and expect(workflow.locator("time")).to_have_count(0) now hold by construction. Under .lf-receipt they named a real alternative seat, and the comments beside them still claim it — "closing that row rather than taking a full-width row of its own". A to_have_count(0) that passes for the wrong reason is how the dead selector survived in the export strip this long, so each of these is worth either a reading that can still fail or deletion with its comment.
How the readings were taken
The failing test was run on the merge ref for 921675fd (uv run pytest tests/test_render_conversations.py -q -n0 -k coined_class); the same selection passes on 4ca056ba, so the last commit is what moved it.
tests/test_render_export.py -k "inline_threads_keep_their_words or export_drops_a_live_widget_work_claim" passes on both heads (3 passed).
The export strip is correct end to end: exporting the inline-thread arrangement with leaf status … working "checking the shard" --on <comment> produces a copy whose raw HTML contains neither Working nor checking the shard. No lf-receipt or lf-message-receipt string survives anywhere in the tree.
The style figures come from a temporary case built on the export test's arrangement, walking the document and every open shadow root for .lf-msg-sending; getRootNode() confirms the inline one is inside a shadow root and closest('.lf-chrome') is null for it.
… label (#974) On a 320px phone the Threads button sat past the window's right edge, at every unread count. `.lf-threads-toggle::after` reserved an inline 6px dot with a 5px inline-start margin whether or not anything was unread, which made the button 124px wide instead of 113px. The banner's primary row is sized to seat its controls on that phone with nothing to spare, so those eleven pixels put the button's right edge at 321px and overflowed the row past its own clip. This paints the marker as an absolutely positioned dot inside the box the button already reserves, so it costs no width at any count — the treatment the rest of that row already uses for state, where `.lf-banner-more[data-lf-news]` recolours the control's border and an open auxiliary toggle wears an inset shadow, neither of them taking width. Nothing else on the page reads the marker's box, and the reserved-width intent behind the old rule is better served by a dot that is out of flow than by one that is in it. The regression arrived with [642c553](642c553), whose nightly `ci` run ([35803415808](https://github.com/max-sixty/leaf/actions/runs/35803415808)) failed 31 browser cases. Twenty-nine of those were readings of contracts that had moved, which #969 and #972 have since repaired. These two are the product regression, and they are the ones still red on `main`: - `test_the_responsive_action_row_keeps_primary_actions_in_reach` — `.lf-threads-toggle is outside the first 320px view: {'left': 197, 'right': 321, 'width': 124, ...}` - `test_the_banner_uses_the_page_mark_and_puts_each_edge_by_its_panel` — `{'shown': 320, 'needed': 331, 'pageShown': 320, 'pageNeeded': 320, ...}` Both reproduce on `main` at `ee7f973e` and pass with this change. `tests/test_render_controls.py` and `tests/test_render_navigation.py` pass whole (271), and `tests/test_render_read_state.py` passes whole (13) — including its assertion that filling and emptying the marker leaves the button's measured width unchanged, which now holds because the marker never enters that measurement. The everyday suite passes 1,332 with five failures this sandbox owns rather than the change: three need `AF_UNIX`, which it blocks, one reads a umask it does not apply, and one shells out to an `esbuild` bundle. All five fail identically on unmodified `main` here, and CI's `test` job runs them green. <details><summary>Why an overlay rather than making room on the row</summary> The row already carries `max-width: calc(100% - var(--lf-status-floor) - var(--lf-mark-w) - 2 * var(--lf-banner-gap))` and `overflow: hidden`, with `flex: none` on each primary control so a control keeps its words at every width. That arrangement has no slack to give back: widening the cap trades the status sentence's floor for the marker, and narrowing the controls' padding trades the aim floor for it. The marker is not content the reader reads, it is state — so the row's own rule for state, paint on the box the control already holds, is the one that applies. Visual check at 1200px and 320px: the dot reads as a badge over the button's inline-end corner in both, and the button no longer moves when the count fills. </details> Co-authored-by: leaf-agent <[email protected]>
The complete suite on #960's merge commit failed in 17 browser cases while its four new inline-thread alignment cases passed. #951 and #962 subsequently repaired several unrelated failures. This PR updates the remaining stale readings and completes the old receipt-to-workflow selector cutover in export and browser guards.
The browser tests now read the exact message workflow's label and title, the notification marker's detailed
aria-description, and the visual review's “Earlier data” label. The stale-work case names the current message contract: both an old claim and one from an ended turn read “Update stale” beside an independently live page claim.A draft review found that standalone export still stripped
.lf-receipt, a class the runtime no longer emits. It now removes.lf-msg-sendingfrom document and shadow roots; print, reachability, and widget gesture guards use the same current class. Dead receipt styling and vacuous negative selectors are removed. A positive inline-thread export test sees “Working” live, proves it absent in print and the standalone copy, and fails when the old export selector is restored. The same test compares computed workflow styling inside a widget shadow tree and the thread panel. Their shared face now lives inshadow.css, so both seats use the same muted label and separator.Verification: all 17 node IDs from the failed merge run pass on this branch; the startup file passes 97/97, widget and visual-review files 185/185, export file 59/59, and the targeted option/conversation cases pass after updating the scoped-class vocabulary. The everyday suite passes 1,323/1,323, runtime folds 47/47, and pre-commit passes. The exact pre-#960 Linux control failed 18 cases; its failed-node set contains all 17 from #960’s merge run, proving none of those failures was introduced by the alignment fix. Final-head PR lint, test, and automated review pass.