Skip to content

test_a_diff_refresh_leaves_an_inline_reply_to_its_thread_owner[False-True] fails on main since #5396's one place hold #5644

Closed

Description

@leaf-agent

Since #5396 (07f31d705, "Keep the user's place with one hold where scroll anchoring can't, in place of placeKeeper and the seat's hold"), tests/browser/widgets/test_diffs.py::test_a_diff_refresh_leaves_an_inline_reply_to_its_thread_owner[False-True] fails on main. The page's scroll after the diff refresh is off by 41 px:

AssertionError: assert {'scroll': 922, …, 'start': 3, 'end': 7} == {'scroll': 963, …, 'start': 3, 'end': 7}

git bisect run over 0acede65f..09e524975 landed on 07f31d705: it fails there and passes at 0acede65f. It still fails on main 903e1d106. The first failing push run is 41976158322, and it fails on every push run since, through 42320062138.

#5396 replaced placeKeeper and the seat's holdBox with one hold in user-place.js (holdPlace, holdUserPlace). Only the [False-True] case fails. The test expects the refresh to leave the page's scroll where it was, with the selection unchanged, and the new hold scrolls 41 px less. What remains is to decide which reading is right for the case this parameter pair covers: whether the hold now keeps the right place and the test's expected scroll belongs to the old placeKeeper, or whether it misses this case.

Cause of a failure tracked in #3985.

Activity

  1. added
    tend-ci-cause
    on Nov 7, 2026
  2. leaf-agent commented on Nov 7, 2026

    @leaf-agent
    CollaboratorAuthor

    #5665 has the fix. The test is right; the hold misses this case. The keep in holdUserPlace ran as soon as notifyDataSubscribers() returned, and that call waits only for the diff's own region. In the rename-only case, the diff's paint claims another thread pass, which parks the reply and opens its margin card. That pass ran after the keep. So the keep read the reply at a temporary spot 41 px up, scrolled the page 41 px to put it back, and then the card drew the reply 177 px away anyway: neither the page nor the field stayed put.

    The PR adds one more await whenDocumentPresented() before the keep, which is the order the holdUserPlace header already describes. With it, both cases of the test pass with the assertion unchanged, and pnpm run test:runtime and the closest Chromium cases of the hold-still matrix pass. The Firefox matrix cases were not run locally. The PR's review and CI are still to run.

  3. added a commit that references this issue on Nov 7, 2026
    1ccf6cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions