Skip to content

Preserve thread reading position when a touch panel reopens - #2048

Merged
max-sixty merged 2 commits into
mainfrom
codex/structural-css-repairs
Oct 8, 2026
Merged

max-sixty merged 2 commits into
mainfrom
codex/structural-css-repairs

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

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 t navigation. 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.

This was written by Codex on behalf of max-sixty

leaf-agent
leaf-agent previously approved these changes Oct 8, 2026

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
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.
@max-sixty
max-sixty merged commit b6c72ce into main Oct 8, 2026
6 checks passed
@max-sixty
max-sixty deleted the codex/structural-css-repairs branch October 8, 2026 10:05
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.

2 participants