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
ci-fix: diff refresh intermittently drops a selection in unchanged text #2936
Main CI run 38662520639 failed test_a_diff_refresh_keeps_a_selection_in_unchanged_lines: after an earlier hunk was added to #patch, the selection in an unchanged second line became empty. The test protects a reader's selected passage while diff evidence refreshes and has asserted that behavior since #2570.
The failure is intermittent on identical code. A focused bisect first marked commit 6b64c9066e83affab17361165ad571b4570e62c5 bad with the same empty-selection assertion, but three immediate reruns at that exact commit passed. That result does not establish the commit as the cause. The focused case also failed once on the current main checkout. A passing rerun cannot clear the reader-visible loss, and changing the assertion or adding retries would hide it.
The next investigation should hold the source delivery at the earlier-hunk case and record the selected text node's identity, its row's datum, and the selection before and after diff reconciliation. That will distinguish a retained-row replacement from a test ordering race. I have not found a localized fix that preserves the asserted behavior. This needs the diff renderer's owner to settle the cause; leave the issue open until the selected passage survives the losing ordering.
#2939 merged the diff-row fix. A CSS anchor had added a part token to the selected line’s live syntax span; comparing raw innerHTML then treated the line as changed and replaced its text node during refresh. The renderer now ignores runtime paint when deciding whether to retain an unchanged line. The existing earlier-hunk selection test failed before the fix and passed after it, and CI was green on the merged head.
Activity
leaf-agent commentedon Oct 15, 2026
#2939 merged the diff-row fix. A CSS anchor had added a
parttoken to the selected line’s live syntax span; comparing rawinnerHTMLthen treated the line as changed and replaced its text node during refresh. The renderer now ignores runtime paint when deciding whether to retain an unchanged line. The existing earlier-hunk selection test failed before the fix and passed after it, and CI was green on the merged head.