Repository navigation
Keep a thread's head controls off its first message's words - #3851
Merged
Merged
Conversation
A page thread's Resolve control and its held-news notice shared one `.lf-thread-controls` box spanning the first header's whole line, since the notice was positioned inside it from `--lf-thread-news-start`. The box painted nothing, but axe finds what covers words by geometry alone, so it read no contrast for the author, time and receipt under it (`overlapped_words`). Each is now its own box anchored to the header: the controls box is the action room past `anchor(right)`, and the notice is a child of `.lf-thread-content` at `anchor(left) + --lf-thread-news-start`, bounded by `anchor-size(width)`. `#retainHeaderSlot` writes its readings onto the notice and measures the line's visible end from the header. A notice inside the controls box could not anchor to the header, whose box is outside the notice's containing block. On a seated thread at 1200px the controls box went from 257→956 to 928→956 while Resolve (928→956) and the notice (380→454) kept their places, in Chromium and Firefox, and `overlapped_words` went from three words to none. The inline placement test and the held-news seat test assert both, and the chrome axe sweep now runs the overlap check too; it passed before as well, since the panel's thread view has no `.lf-thread-controls`, so the TODO sentence saying it could not is dropped. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Takes main's TODO.md, whose backlog moved to GitHub issues in #4090. Main moved three held-news tests from tests/journeys/test_render_read_state.py to tests/browser/test_render_read_state.py; the merge keeps them there and carries this branch's edits to them: the notice located under .lf-thread-content, and the page-seat case's overlapped_words check. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
max-sixty
marked this pull request as ready for review
October 27, 2026 05:15
leaf-agent
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A page thread's head controls (Resolve, or Reopen in its place) and its held-news notice were children of one
.lf-thread-controlsbox that spanned the first message's whole header line, from the header's left edge to the end of the action room: the notice was positioned inside that box from--lf-thread-news-start, so the box had to be that wide. The box painted nothing and passed pointer events through, but axe finds what covers words by geometry alone, so it read no contrast for the author, the time and the sending receipt under it, and theoverlapped_wordscheck reported them (#4028, "Reconsider thread navigation", last part).Now each is a box of its own, anchored to the header (
--lf-thread-headline):.lf-thread-controlsstarts atanchor(right) + --sp-2and is--lf-thread-action-roomwide, the room the header'smargin-inline-endalready keeps. Itspointer-eventsrules go, since it covers nothing..lf-thread-newsis a child of.lf-thread-contentbeside the controls, atanchor(left) + --lf-thread-news-start + --sp-2, with its width bounded byanchor-size(width)in place of the old box's100%.#retainHeaderSlot(thread-card.js) writes its two readings onto the notice itself and measures the line's visible end from the header rather than the controls box;#releaseHeaderSlotclears them.A notice inside an absolutely positioned controls box could not anchor to the header, since an anchor must be laid out in the positioned box's containing block, which is why the notice moves up to
.lf-thread-content. The notice carriesdata-lf-reflow="text"in the head place, the credit the controls box gave it, so the shift watch still allows its words to change in place.Geometry
Seated page thread (
TASK_SEAT_PAGE, one user comment on#jobs, then one agent reply held behind the notice), 1200×900, Chromium. Numbers aregetBoundingClientRectleft→right in px.btime.lf-thread-controlsoverlapped_wordsb,time,.lf-msg-sendingPlaywright Firefox, after: controls 928→956, notice 380→454, no overlapped words; Firefox resolves both anchors.
Tests
tests/browser/navigation/test_threads.py::test_inline_thread_surface_has_room_without_focus_reflowasserts the controls box starts past the header's right edge andoverlapped_words(page) == []; the held-news seat test intests/browser/test_render_read_state.py(test_replies_held_in_a_page_seat_show_when_the_user_turns_to_them) asserts the latter with a notice standing.test_the_chrome_a_key_opens_has_no_serious_violations) now runsoverlapped_wordson each surface. It passed before this change too: the panel's thread view is a primary reader without.lf-thread-controls, so Reconsider thread navigation #4028's claim that this sweep could not hold the check was stale; the check stays since it is cheap and covers the chrome's other surfaces..lf-thread-controlsnow locate it through.lf-thread-content.Ran:
pnpm run test:runtime(545 pass),pnpm run check:browser, and-kselections overtests/browser/navigation/test_threads.py,tests/journeys/test_render_read_state.py,tests/browser/test_render_read_state.py,tests/browser/test_render_floating_panel.py,tests/browser/test_render_pages.py,tests/browser/test_render_reactions.py,tests/browser/margin/test_card_placement.py,tests/browser/threads/test_summaries.pyand the chrome sweep intests/journeys/test_render_controls.py(27 tests, all pass).test_a_reopening_in_a_folded_diff_thread_waits_in_its_summaryfails at teardown on a startup layout shift of the diff page's tail paragraphs; it fails the same way with this branch's files swapped for main's, so it is not this change's.After merging main (no source conflict; the kernel rebuilt),
pnpm run test:runtime,pnpm run checkand the changed browser tests pass again.Not verified: WebKit; a checkpoint-headed thread (
.lf-summary-header) with news standing, beyondtest_a_root_summary_keeps_thread_actions_outside_its_foldpassing; the thread appearance snapshots, whose gate is paused.Calls Max may reverse: the empty
.lf-thread-controlsbox is still rendered while news stands with no settlement, so the header's:has(> .lf-thread-controls)reservations keep applying;anchor(right)/anchor(left)stay physical, as the file's other anchors are.Part of #4028: its last sentences, on the header controls' box, are what this fixes.
On landing, update #4028: drop "The redesign also gives a thread's header controls a box no wider than they are" (
overlapped_words).