Repository navigation
fix(tui): restore the input position after an inline dialog closes - #375
Merged
Merged
Conversation
ZouR-Ma
requested review from
MelodyVAR,
Uking-xxx and
liuedcson
as code owners
November 29, 2026 06:11
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.
Problem
In regular terminal mode, open
/model, then press Esc without changing the model. The taller selector can scroll the terminal; after it closes, clearing its rows does not bring the preceding document rows back into view, leaving the input above a blank area. Asynchronous completion-menu updates can leave the same gap. Separately, nativeclarify_userkept its working indicator running while blocked on the user.Changes
waitingForApprovalpresentation for native clarification dialogs. The focus and synchronized-output fixes remain in fix(coding-agent,tui): keep the clarification cursor inside the dialog #322; this PR does not duplicate their changes.Behavior and compatibility
No settings, persisted data, or accepted input change. Existing
requestRendercalls keep their behavior; the new interaction option is optional. When re-anchoring is required, regular mode rebuilds terminal scrollback from the document; it cannot restore the terminal emulator's previous scroll position. Fullscreen rendering is unaffected by this recovery path.Validation
pnpm run check(passed).TMPDIR=/tmp ./test.sh(passed; the shorter temp root avoids macOS's Unix socket path limit).cd packages/tui && node --test --test-name-pattern='shrink after interaction' test/tui-render.test.ts(4 passed).cd packages/coding-agent && pnpm exec vitest --run test/step-capabilities-extension.test.ts(8 passed with host overrides unset).Limitations
The scan for a viewport gap relies on terminal buffer coordinates rather than the terminal emulator's scroll thumb. Native IME candidate placement is tracked by #322; it is not assessed by this change.