Skip to content

fix: keep a thread message the user clicked still as a message above it grows - #5693

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5687
Nov 8, 2026
Merged

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Since #5551, a reply box under the floating panel counts as unseen. When the user clicked a message's words, the keep therefore fell back from the thread's reply box to the thread's top, and a message above the clicked one that grew by 63px pushed the clicked message down by 63px. Now the keep first holds the caret that the click left in the focused container, as long as the caret lies outside the box the container stands at (standsAt) and the container isn't a text field. So the clicked message stays put when a message above it grows or an answer joins below it, and the reply box moves instead. This matches the rule thread/reply-landing.js already states ("a message they stand on stays and the box below it moves down"). A thread focused with its caret in the reply box, or with no caret in it, keeps the reply box's hold as before, so a send still holds the emptied box.

#5551's rule that a box under the panel counts as unseen still holds. This change gives the keep a better place than the thread's top when that rule applies.

Verification:

  • test_page_holds_still.py::…[message-edit-above-chromium] and [message-edit-above-firefox] fail on main 0534adc7d with the place moved 63.0px. Both pass with this change.
  • The whole of tests/journeys/test_page_holds_still.py --run-nightly passes: 94 passed, and its 14 strict xfails still fail as recorded. That includes the message-reply-below cases, which test: update ten nightly journeys to the behavior #5448, #5508, #5537, #5551, #5552 and #5566 chose #5685 had just un-xfailed.
  • pnpm run test:runtime (896 pass) and pnpm run check:browser pass.
  • One failure came up in the held-news browser tests I ran, test_summaries.py::test_a_root_summary_keeps_thread_actions_outside_its_fold[1400-True-10] (labelLines 3.0 > 1.1). It fails the same way on main without this change.

One known gap: if the change rewrites the very words the caret sits in, the caret's range leaves with them, so this hold keeps nothing and the browser's scroll anchoring takes over.

Closes #5687 — automated triage

…it grows

Since #5551 a reply box under the floating panel counts as unseen, so the
keep fell back from the thread's reply box to the thread's top, and a message
above the clicked one growing by 63px pushed it down by 63px. The keep now
holds the caret a click on a focused container's words leaves, where it lies
outside the box the container stands at and outside a text field, before the
container's own place. A message the user clicked stays as a message above it
grows or an answer joins below it, and the reply box moves; a thread focused
with its caret in the reply box, or none in it, is held as before.

test_page_holds_still.py's message-edit-above cases fail before and pass after,
on Chromium and Firefox; the rest of the file holds.

Closes #5687
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.

test_the_page_holds_still_under_the_user[message-edit-above]: a clicked message moves 63px as a message above it grows, since #5551

1 participant