Repository navigation
Preserve thread reading position when a touch panel reopens - #2048
Merged
Merged
Conversation
leaf-agent
previously approved these changes
Oct 8, 2026
leaf-agent
reviewed
Oct 8, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The test check fails on this head, and the same test passes at the merge base. In test_context_paste_after_rewrap_keeps_the_previous_panel_turn_visible, opening Threads at 300 px and widening to 1600 px leaves the previous agent turn below the viewport instead of above the pinned reply box, so the test fails before its paste step. The changed fallback classifies the initial panel entry as a return, suppressing the Threads list's arrival handling as well as the unwanted reopen jump. Preserve the return cause when reopening a retained reading position while keeping a fresh entry's landing behavior.
leaf-agent
dismissed
their stale review
October 8, 2026 09:30
CI failed: fresh Threads entry loses its arrival landing
A posture change now retains reading rather than navigating to the latest turn. Start the context-paste regression at the native list end before its wheel-back gesture, keeping the rewrap, paste-event, growth and prior-turn visibility checks unchanged.
leaf-agent
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closing and reopening Threads on touch could jump from an earlier turn to the latest message, even though the reply draft survived. The modal boundary's fallback focus was classified as a fresh navigation move. It now uses the existing focus-return mechanism, preserving the reading position while explicit thread navigation still lands at the latest message.
The touch regression fails on the former implementation and passes with the repair, covering native close/reopen, a long draft, retained caret and deliberate
tnavigation. The context-paste regression now places the latest turn beside the editor explicitly, instead of relying on resize to navigate there; its paste-growth assertions are unchanged. Focused browser checks and all 247 runtime checks pass against current main; independent code and rendered reviews accepted the behavior. The served startup comparison adds no presentation requests.PR #2036 rewrites this same fallback through
focusDestination; that integration must preserve the return cause established here. Its explicit navigation route still needs the move cause.