Skip to content

fix: read a thread card's message when its placement moves it into view, and adapt two journeys to the end room - #7288

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7282
Nov 26, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7282

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

All three nightly journeys that #7188's end room turned red now pass. One of them caught a real defect: a thread card could stay unread after the user opened it.

Product fix: a card the placement brings into view is read. records/thread/read.js ran an exposure pass on scrolls, room changes (watchRoom) and body resizes, but not when a body moved without any of those. With the end room, pressing t on a page scrolled below its top scrolls the page, which is instant under reduced motion. The card's floating placement then moves the card from its anchor to the window's foot. Its message goes from 818–997 px (24 px seen) to 504 px and up, wholly in view, and no pass runs after that move. So the message, its thread's "1 unread" and On Me's "1 thread with news" stayed until the next scroll, and the render gate saw the second open mark it read. Each observed body now also has an IntersectionObserver at thresholds 0 and 1, so a pass runs when a body enters the window or comes wholly into it. This is the same primitive whenChanges in dom/geometry.js uses for layout moves. test_a_card_its_placement_brings_into_view_is_read (browser tier) fails on main (the news dot stays shown) and passes here. The render gate's thread-choice-hints case fails before and passes after.

Two journeys read a place the room moved. #7188 meant the room for these column pages, so both tests keep what they protect:

  • test_the_page_end_clears_the_bottom_chrome_around_a_workspace: its first page is a column document with a pane, not a workspace. Its assertion that the body keeps no panel room read the end room's 584.8 px. It now reads the page through without_end_room, the helper Adapt the browser tests to a document's end room, and keep the room off the root headers' observer #7244 introduced. The workspace pages in the test are unchanged and still pass.
  • test_hiding_annotations_gives_marked_words_their_own_colours_back: t walks from the reader's place. Before the room, centring the document's last line clamped at the page's end. Now it centres exactly, and t reached the document's "resend now" thread instead of the link's. The test now scrolls to the top before t. It passes in Chromium, Firefox and WebKit.

Checked: each of the three tests run alone with --run-nightly (failing on ab811b350, passing here), the neighbouring read-state browser tests, pnpm run test:runtime, pnpm run check and pre-commit.

#7245, the sidebar track's end-of-scroll decision, is separate and untouched.

Closes #7282 — automated triage

…ew, and adapt two journeys to the end room

Read tracking ran a pass on scrolls, room changes and body size changes,
but not when a body moved without any of them. With #7188's end room, `t`
on a page scrolled below its top now scrolls the page (at once, under
reduced motion) and the card's placement then holds the card at the
window's foot, carrying its message from mostly below the window to wholly
in it. No pass followed, so the message stayed unread until the next
scroll. An IntersectionObserver on each observed body, at thresholds 0 and
1, now brings a pass as a body enters the window or comes wholly into it.
The new browser test fails without it.

Two journeys read coordinates the room moved:
- The bottom-chrome journey asserts the body keeps no panel room; it now
  reads the page without the end room, as `without_end_room` does for the
  browser tests #7244 adapted.
- The hidden-annotations journey pressed `t` from wherever reading the
  document's last lines left the reader; with the room that place is past
  the link, so `t` reached the document's thread. It now scrolls to the
  top first.

Closes #7282
@leaf-agent
leaf-agent merged commit 6fb3111 into main Nov 26, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7282 branch November 26, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Three nightly journeys fail since #7188's end room: comment location, thread-card news, workspace body padding

1 participant