You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_a_press_in_the_task_a_script_repeats_a_marked_phrase_opens_nothing: an ambiguous quote's press opens a margin card (since #7563) #7581
tests/browser/test_render_anchors.py::test_a_press_in_the_task_a_script_repeats_a_marked_phrase_opens_nothing, in both [browser] and [firefox_browser], fails on every run from #7563 (6e7004dbd) through current main (3cce8ff2c), and passes on its parent b67c5abf7.
In the test, a script adds a second copy of a marked phrase, and a press on the phrase in that same task should open no margin card, since nothing tells the two copies apart (AGENTS.md, "Validate once and share readings": an ambiguous quote stands on its section or in Threads). Instead a card opens:
#7563 changed the render's handling of the selected card in margin-projection.js. Before, a card whose entry left the inventory closed (closePreview()). Now followCardThread first tries openInlineThread(id, { unfold: false, card: true }) for the card's thread, and showNextAtTarget then opens the next thread threadEntryAt finds at the old target. Either path may now reopen a card that the ambiguous quote should have taken out of the margin. The mechanism I'd check first is that threadEntry(id) or threadEntryAt(target) still finds an entry for the thread while its quote is ambiguous. This is a code reading I haven't confirmed.
Seen in run 46202905667 on 73e842a64. Reproduced locally on 3cce8ff2c with uv run pytest -n 3 -p no:randomly over that node id. Bisected over 25f9d33f9..73e842a64 by running the test at b67c5abf7 (pass) and 6e7004dbd (fail).
Fix in #7584. The ambiguous quote did move the thread off the phrase. The press reopened the card because the anchor paint's replace returned to a whole repaint before it dropped the passage's pieces from the hit-test index, so markHit in the same task still found the old mark. That press already opened a card at b67c5abf7, but the next margin render closed it again. #7563's followCardThread now keeps the card with the thread in its new row, which is why the test went red at that commit. Neither threadEntry nor threadEntryAt was at fault, and #7563's behavior stays as it is.
The test fails in both engines on 9e2e64d34 and passes with the fix, and the threads, margin-opening and runtime tests pass too. The PR's own CI and landing are next, and tend-land handles them.
Activity
leaf-agent commentedon Nov 29, 2026
Fix in #7584. The ambiguous quote did move the thread off the phrase. The press reopened the card because the anchor paint's
replacereturned to a whole repaint before it dropped the passage's pieces from the hit-test index, somarkHitin the same task still found the old mark. That press already opened a card atb67c5abf7, but the next margin render closed it again. #7563'sfollowCardThreadnow keeps the card with the thread in its new row, which is why the test went red at that commit. NeitherthreadEntrynorthreadEntryAtwas at fault, and #7563's behavior stays as it is.The test fails in both engines on
9e2e64d34and passes with the fix, and the threads, margin-opening and runtime tests pass too. The PR's own CI and landing are next, and tend-land handles them.