refactor(tui): make Static the only history renderer; drop virtual-viewport machinery (stage 2 of #1529)#1534
Merged
Merged
Conversation
…virtual-viewport machinery Stage 2 of #1529. StaticCardStream landed behind a flag in Stage 1 and worked end-to-end; this stage promotes it to the only path and deletes the parts of the codebase whose job description was "fight the terminal for scrollback": - Remove the REASONIX_STATIC_HISTORY gate; Static is unconditional. - Delete CardStream (virtual viewport + height measurement + scroll delta math), chat-scroll-store, chat-scroll-provider, the unused InputAreaWithHistoryHint, and the application-level copy-mode along with its OSC52 snapshot helper and `/copy` slash command. - Drop the keystroke handler that routed PgUp/PgDn/End/wheel/arrows through chat-scroll; the terminal owns these now. - Drop the absolute IME cursor write in PromptInput (its math required the persistent UI to be anchored at terminal bottom). - mouse-mode defaults to "off" everywhere; REASONIX_MOUSE_MODE override stays as an escape hatch. - ComposerArea no longer wraps its input area in the "scrolled-up history hint" branch — pinning is no longer a concept we track. Net: 1545 deletions, 48 insertions across 26 files.
This was referenced May 22, 2026
esengine
pushed a commit
that referenced
this pull request
May 22, 2026
…, theme) (#1524) Localizes the remaining hardcoded CLI output strings — `reasonix mcp list / search / install` flow, `sessions` listing, `prune-sessions`, and the `/theme` slash handler — so zh-CN users see translated text instead of mixed EN/CN output. 31 new keys across `sessions` / `mcpCli` / `app` namespaces with full EN ↔ zh-CN parity. Mechanical migration — `t()` calls replace each string with the same parameters; no behavior change. Verified clean rebase on top of the stage-1-through-4 refactor (#1530 / #1534 / #1536 / #1537) plus the path-approval bridge (#1540): typecheck + lint + 3528 tests all pass.
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
Stage 2 of #1529.
StaticCardStreamlanded in Stage 1 (#1530) behindREASONIX_STATIC_HISTORY=1and held up under real use. This PR promotes it to the only path and deletes the machinery whose entire job was fighting the terminal for scrollback.Deleted
src/cli/ui/layout/CardStream.tsx— virtual viewport, height measurement, monotonic-shrink lock, scroll indicatorsrc/cli/ui/state/chat-scroll-store.ts+chat-scroll-provider.tsx— scroll state + contextsrc/cli/ui/copy-mode/— application-level vim/tmux copy mode + OSC 52 snapshot helpersrc/cli/ui/layout/InputAreaWithHistoryHint.tsx— unused dead leaf (no JSX caller)tests/card-stream-items.test.ts,tests/chat-scroll-wheel.test.ts,tests/copy-mode-snapshot.test.ts,tests/input-area-history-hint.test.tsx,tests/modal-scroll-reset.test.ts/copyslash command +openCopyModeslash result + the qq-channel terminal-only notice + thecopyModei18n blockTrimmed
App.tsxdropsSTATIC_HISTORYflag,HistoryTypingCaptureleaf,ChatScrollProviderwrapper,useChatScrollActions/Statesubscriptions,pendingCopyModestate, the keystroke scroll handler (PgUp/PgDn/End/wheel/arrows), and the conditional outer Box height — terminal owns scrolling now (-114 lines net).ComposerArea.tsxno longer wraps the input area in the "scrolled-up reading history" hint branch — pinning isn't a concept we track anymore.PromptInput.tsxdrops the absolute IME cursor write — its math required the persistent UI to be anchored at terminal bottom, and the Static frame floats.mouse-mode.tsdefaults tooffeverywhere (terminal owns the wheel).REASONIX_MOUSE_MODE=sgr|alternate-scrollremains as an escape hatch. On startup we emit disables for every common mouse-capture mode so stale state from a prior crashed TUI in the same terminal can't keep eating wheel events.Net diff: 1545 deletions, 48 insertions across 26 files.
Test plan
npm run typechecknpm run lint(no new errors; 2 pre-existing biome suggestions remain)npm run buildnpm run test— all 3566 tests pass (5 obsolete tests deleted, 3 updated for new defaults)Part of #1529.