Skip to content

fix(tui): restore chat after transient layout shrink - #333

Merged
hetaoBackend merged 1 commit into
mainfrom
fix/tui-transient-layout-restoration
Sep 23, 2026
Merged

hetaoBackend merged 1 commit into
mainfrom
fix/tui-transient-layout-restoration

Conversation

@hetaoBackend

@hetaoBackend hetaoBackend commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Change

Closing /theme with Escape could leave a blank region above the conversation. The same rendering rule affected settings and history pickers, panel replacement, completion menus, image previews, multiline drafts, task/Goal summaries, queued messages and asynchronously disappearing notices. Earlier fixes in #328 and #331 covered only selected close paths.

Classify shrink from the rendered layout. ChatLayout records the heights of its transient sections, SurfaceHost includes the active feature, and MainScreen preserves background scroll position only while every root declares an unchanged layout key and no overlay was present. Changed or unknown layouts restore exposed chat rows; short documents still update in place. Remove the completion-specific callback and full-viewport close exception. Update capability documentation and the engine change ledger.

Validation

  • /theme → Escape failed before the fix: the physical viewport contained blank rows where the current conversation should be visible. The regression passes with the unified rule.
  • Focused application/editor/surface/renderer group: 470 tests passed; the subsequently expanded renderer suite passed all 77 tests, and the Tasks panel suite passed all 10 tests.
  • Coverage includes /theme, /settings, prompt-history search, image-preview dismissal, multiline draft clearing and the existing /usage/autocomplete cases. Repeated expansion and shrink cover eight transient layout sections under xterm and an ED 2 clear-to-scrollback model, with exact viewport and unique-history assertions. Overlay hide/setHidden, mixed roots, short-document clearing and background scroll preservation are covered.
  • pnpm verify on a42d54d7672803aacdcdda25ceb3defb446bf555: PASS, all 14 applicable macOS gates. Typecheck and git diff --check also passed.
  • Performance: automatic basic suite. This presentation repair does not change conversation history construction, token processing, storage, streaming or tool execution.
  • NOT RUN locally: Windows-specific and npm release-archive gates; native iTerm2/Apple Terminal interactive acceptance. Emulator evidence is not native-terminal acceptance. When reconstruction is necessary, the existing tradeoff of clearing pre-launch shell scrollback remains.

Publication and contribution checks

  • Changes use the existing applicable licenses; no imported material was added and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • No files were added or removed; tests extend existing declared files, so inventory and suite declarations did not need changes.
  • Capability documentation and engine records are updated. Shared English/Chinese documentation is unaffected; validation boundaries are explicit.

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 76262af into main Sep 23, 2026
16 checks passed
@hetaoBackend
hetaoBackend deleted the fix/tui-transient-layout-restoration branch September 23, 2026 07:11
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