Skip to content

fix(tui): restore chat viewport after autocomplete shrinks - #331

Merged
hetaoBackend merged 1 commit into
mainfrom
fix/tui-autocomplete-blank-render
Sep 23, 2026
Merged

hetaoBackend merged 1 commit into
mainfrom
fix/tui-autocomplete-blank-render

Conversation

@hetaoBackend

@hetaoBackend hetaoBackend commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Change

Typing / and then pressing Escape in a long regular-mode conversation could move the visible chat downward, leaving the completion menu's former rows blank at the top. Filtering or accepting candidates could cause the same problem. This follows up on #328, which covered full-viewport interaction panels.

Report completion layout changes from the editor and restore the exposed chat rows when the menu shrinks. Reconstruct history only when scrolled rows must return to the viewport; short documents retain incremental rendering. Ordinary activity shrink keeps its existing native-scroll protection. Update the TUI capability documentation and engine change ledger.

Validation

  • The initial / → Escape regression failed with the first nonblank row moving from index 2 to 11; it passes after the repair.
  • Focused application, editor and renderer suites: 390 tests passed. Regression coverage compares the complete viewport and checks unique long history for Escape, Tab, Backspace, asynchronous empty results and filtering under xterm and an ED 2 clear-to-scrollback model. Short-document and fullscreen cases check that unnecessary reconstruction is avoided.
  • pnpm typecheck and git diff --check: PASS.
  • pnpm verify on 55d68c874ec7dada29cb8cd47a6a34413ee42206: PASS, all 14 applicable gates on macOS.
  • Performance: automatic basic suite. This focused presentation fix does not change history construction, storage, streaming or the tool execution loop.
  • NOT RUN locally: Windows-specific and npm release-archive gates; interactive acceptance in real iTerm2 or Apple Terminal. Emulator checks do not establish native terminal acceptance. Required history reconstruction retains the existing tradeoff of clearing pre-launch shell scrollback.

Publication and contribution checks

  • These changes use the existing applicable licenses; no imported material was added and notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • No source files were added or removed; existing declared tests were extended, so inventory and suite declarations did not need regeneration.
  • Capability documentation and engine records are updated. Shared English/Chinese documentation is unaffected; emulator results are distinguished from native terminal acceptance.

Maintainer handoff

Publication scope or license changes: none.

Shared-source port: pending maintainer review after this public PR.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@hetaoBackend hetaoBackend added bug Something isn't working tui Interactive terminal UI (TUI) cli Standalone mcode: TUI, headless, ACP and source builds/tooling labels Sep 23, 2026
@hetaoBackend
hetaoBackend merged commit ffbfff6 into main Sep 23, 2026
17 checks passed
@hetaoBackend
hetaoBackend deleted the fix/tui-autocomplete-blank-render branch September 23, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli Standalone mcode: TUI, headless, ACP and source builds/tooling tui Interactive terminal UI (TUI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant