Skip to content

Keep a turn's scroll request when its link resolves again - #483

Merged
benschac merged 1 commit into
mainfrom
viewer/turn-scroll-reresolve
Dec 1, 2026
Merged

benschac merged 1 commit into
mainfrom
viewer/turn-scroll-reresolve

Conversation

@benschac

@benschac benschac commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #481 and #482, which merged before Codex's second-round finding was fixed.

When a pending link resolves again because its patch or session arrived, openedFrom applies every step again, and the turn step bumped turnScrollRequest. If the session was already loaded, the turn list had already scrolled to the turn, so the new request pulled the session pane back to it even if the reader had scrolled away while the diff loaded. A link that resolves again now keeps the request ID when it names the same turn. The list waits for its target, so the first request is enough. A new link still makes a new request.

Tests

  • links-open.test.ts: a turn that waited for its session keeps request 1 after the session arrives. With the fix removed, it fails with 2.

Review by Codex

No findings. It checked that a link resolving again keeps the request for the same turn, and that opening the link again still makes a new one.

🤖 Generated with Claude Code

When a pending link resolves again because its patch or session arrived,
every step is applied again, and the turn step asked the session's turn
list to scroll once more. With a cached session the list had already
scrolled to the turn, so the second ask pulled the pane back to it even if
the reader had moved while the diff loaded. A link resolved again now keeps
turnScrollRequest when it names the same turn: the list waits for the turn,
so the first ask is enough. Found by Codex's second review of #482.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

benschac commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@benschac
benschac merged commit bd1c312 into main Dec 1, 2026
3 checks passed
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.

1 participant