Skip to content

test: read a shadow-tree thread's page order through the t walk, since Threads lists newest first - #7274

Merged
max-sixty merged 1 commit into
mainfrom
fix/thread-shadow-order-walk
Nov 26, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/thread-shadow-order-walk

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_thread_on_words_a_widget_renders_stands_where_the_widget_does failed on main (run 45789964594). It read the page's order of threads off the Threads list, and #7258 made that list newest first, so its three threads came back reversed. After #7258 the page's order governs only the t walk (placement.js), so the test now walks t from the page's top. It expects the lede's thread first, then the thread on the diff's words (which opens in the diff), then the one below. #7258's intent and the protected behavior both hold: Threads stays newest first, and a passage inside a widget's shadow tree still stands where the widget does.

Verification: the test fails on main with the reversed list and passes on this branch. With byRenderedOrder temporarily changed to sort by a plain compareDocumentPosition, which can't order across shadow trees, the new test fails at the widget's thread, so it still guards the cross-tree ordering. LIST_ORDER lost its only caller, so it is removed.

The same report's other failure, test_a_stuck_sidebar_track_keeps_its_place_to_the_page_end, waits on the maintainer's decision in #7245 and is untouched here.

Refs #7271 — automated triage

test_a_thread_on_words_a_widget_renders_stands_where_the_widget_does read
the page's order of threads off the Threads list. #7258 made that list
newest first, so the test saw its three threads reversed and failed on
main. The page's order now governs the `t` walk (records/thread/placement.js),
so the test walks `t` from the page's top and expects the lede's thread,
then the thread on the diff's words, then the one below. The behavior it
protects is unchanged: a passage inside a widget's shadow tree stands where
the widget does. LIST_ORDER loses its only caller and goes.

Refs #7271
@max-sixty
max-sixty merged commit 52fb9b0 into main Nov 26, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/thread-shadow-order-walk branch November 26, 2026 12:13
leaf-agent added a commit that referenced this pull request Nov 26, 2026
…ince #7267 made its host a group (#7277)

`test_on_me_claims_nothing_before_the_first_replay` failed on main ([run
45808911571](https://github.com/max-sixty/leaf/actions/runs/45808911571),
`dcf5eb41c`). It asserted `to_be_editable()` on the `leaf-text` host,
and #7267 made that host `role="group"` so a screen reader hears one
inner textbox. Playwright refuses that assertion on a group ("Element is
not an <input>, <textarea>, <select> or [contenteditable]…"). The test
now types a character into the page's comment field while the first
state answer is still held, checks the field holds it, and deletes it.
The behavior it protects is the same: the field takes words before the
log has answered. #7267's change stays as it is.

Verification: the test fails on main with the error above and passes on
this branch (Chromium, locally).

The same run's other failures already have owners:
`test_a_stuck_sidebar_track_keeps_its_place_to_the_page_end` is waiting
on the maintainer in #7245, and #7274 fixed
`test_a_thread_on_words_a_widget_renders_stands_where_the_widget_does`
after this run's commit.

Refs #7276 — automated triage

Co-authored-by: leaf-agent <[email protected]>
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.

2 participants