Repository navigation
Align inline thread Dismiss and Resolve controls - #960
Conversation
Keep Dismiss on the thread metadata row when a target has multiple conversations. Cover both single and multiple threads in pointer and touch layouts so the navigation row cannot shift one action away from Resolve. > _This was written by Codex on behalf of max-sixty_
leaf-agent
left a comment
There was a problem hiding this comment.
tests/test_render_margin.py::test_a_shared_passage_steps_between_single_conversation_cards asserts the arrangement this change replaces, and the PR leaves it standing, so nightly on main goes red once this merges. That case opens the two-conversation card and holds Dismiss to the navigation row:
assert controls[".lf-margin-preview-nav"]["middle"] == pytest.approx(
controls[".lf-margin-preview-close"]["middle"], abs=1
), controlsRun on this head it fails with nav's middle at 501.3 and Dismiss's at 541.3 — Dismiss is on Resolve's row, which is the point of the change. It passes with the base stylesheet restored, so it is this branch's. The everyday gate says nothing about it because test_render_margin.py is pytestmark = pytest.mark.nightly, which is the same shape #910 repaired: the contract that owns this corner lives in the nightly selection, and the change was validated against the gate that runs before merge.
What still holds there is navigation above the pair, so the assertion can read the pair instead:
assert controls[".lf-resolve"]["middle"] == pytest.approx(
controls[".lf-margin-preview-close"]["middle"], abs=1
), controlsSay the word and I'll push that.
Second, worth naming rather than blocking: inset-block-start: calc(12px + max(28px, var(--aim-floor)) + 8px + var(--sp-1)) re-derives the card's box from four values declared elsewhere — the card's own 12px padding, the icon-action hit size (--lf-icon-action-hit: max(28px, var(--aim-floor)), in skills/leaf/assets/shadow.css), the head's margin-bottom: 8px from the rule above it, and the thread's --sp-1. .lf-thread-root-meta in the same block already restates the hit-size half to reserve its gutter (padding-inline-end: calc(max(28px, var(--aim-floor)) + 4px)), so this is the third hand-derived copy of that geometry and the second alignment repair in that corner in two days. What produces it is that Dismiss and Resolve are one control group rendered in two subtrees — Dismiss in .lf-margin-preview-head, Resolve inside the sticky .lf-thread-root-meta — so nothing but arithmetic can hold them on a line, and each new row in the head costs another offset. Giving the card's meta-actions group the Dismiss button would let flexbox settle it and retire both absolute rules and the gutter; that is not a two-line move, since lf-thread-meta-actions is rebuilt by replaceChildren from what ThreadCard is handed and the panel's cards have no Dismiss.
Leaving it narrow is defensible — the new test_chrome_contracts.py case reddens the everyday gate if the head's margin or the card's padding moves without the calc, which is more than this corner had before. The description is where to say that, so the next reader of the fourth offset knows it was a choice.
What was run
tests/test_chrome_contracts.py::test_page_thread_dismiss_and_resolve_share_the_metadata_row— 4 passed.tests/test_render_margin.py::test_a_shared_passage_steps_between_single_conversation_cards— failed on this head, passed withskills/leaf/assets/runtime/chrome.csstaken from the merge base.- The other nav-present margin cases (
agent_progress_stays_on_the_thread_control,a_secondary_thread_keeps_card_ownership_through_membership_and_posture,an_open_desktop_preview_reconciles_arriving_meanings,the_margin_groups_meanings_at_one_destination_without_moving_the_page) — 5 passed, so the regression is confined to the one assertion. - Dismiss stays reachable: with the head no longer positioned, the button loses the
z-index: 3that kept it over the sticky opaque meta row, butdocument.elementFromPointat its centre returns the button and the click dismisses the card in both the one- and two-conversation cards. pre-commitclean on both changed files.
The nightly margin test followed Dismiss in the navigation row. Assert that it aligns with Resolve while navigation stays above both controls. > _This was written by Codex on behalf of max-sixty_
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-sending` from 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 in `shadow.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. > _This was written by Codex on behalf of max-sixty_
When two conversations share a page target, the inline preview adds a navigation row. That row moved Dismiss above Resolve, even though the controls belong together beside the first message's metadata. Keep Dismiss on the metadata row while navigation has its own row.
Dismiss is owned by the preview header while Resolve is owned by the retained thread card. This keeps their current ownership and aligns the header control with the card's metadata row using the existing navigation height and spacing. The browser contract checks both centers for one and two conversations, with pointer and touch target sizes. The nightly margin check now asserts the same relationship. The full Python suite, runtime tests, and pre-commit pass.