fix(ui): reset chat scroll to bottom when a confirm modal mounts#643
Merged
Conversation
If the user has scrolled up in the chat history and a pauseGate request arrives — shell command, plan proposal, plan checkpoint, plan revision, or ask_choice — the modal mounts at the bottom of the chat area, which is off-screen below the scroll position. The picker captures arrow keys, so the user can't scroll back down to see the options either, and looks stuck. Calling chatScroll.jumpToBottom() once at the top of the pauseGate listener flips pinned back on; the modal's useReserveRows triggers setMaxScroll, which snaps scrollRows to the new bottom under the existing pinned-mode invariant. Closes #642
This was referenced May 11, 2026
Closed
Merged
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
…ngine#643) If the user has scrolled up in the chat history and a pauseGate request arrives — shell command, plan proposal, plan checkpoint, plan revision, or ask_choice — the modal mounts at the bottom of the chat area, which is off-screen below the scroll position. The picker captures arrow keys, so the user can't scroll back down to see the options either, and looks stuck. Calling chatScroll.jumpToBottom() once at the top of the pauseGate listener flips pinned back on; the modal's useReserveRows triggers setMaxScroll, which snaps scrollRows to the new bottom under the existing pinned-mode invariant. Closes esengine#642
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.
Summary
When the user has scrolled up in the chat and a confirm modal arrives —
run_command,run_background,plan_proposed,plan_checkpoint,plan_revision, orchoice— the modal mounts at the bottom of the chat area, which is off-screen. The picker captures arrow keys, so scroll-down inputs no longer move the viewport either, and the user is visually stuck.src/cli/ui/App.tsx'spauseGate.on(...)listener now callschatScroll.jumpToBottom()once before the kind switch. That flipspinned: true; the modal'suseReserveRowsshrinks the chat area, which triggerssetMaxScroll, which under the pinned-mode invariant snapsscrollRowsto the new bottom. Single line; covers all five modal kinds.Closes #642
Test plan
npm run verify— 2562 passed, 2 skippedtests/modal-scroll-reset.test.ts:scrollPageUpthenjumpToBottom, the nextsetMaxScrollsnapsscrollRowsto the max.jumpToBottomreseats the viewport on every modal kind.