Repository navigation
fix(tui): reconcile terminal size before inline redraws - #408
Merged
Merged
Conversation
- centralize Claude profile path resolution - use the selected profile for settings, trust, and file credentials - resolve auto memory under the selected configuration directory - add profile isolation regression coverage and documentation
- route live size changes through resize handling before surface rebuilds - keep inline draws on the recorded size to preserve purge and replay decisions - cover streaming, 200 PTY resizes, subsequent input, and graceful shutdown
- stream a short follow-up reply from the fake bridge so its start marker stays in the visible viewport - set the follow-up length explicitly in the terminal resize test - fix the Ubuntu failure where a slower debug build drew the marker and scrolled it off between screen polls
This was referenced Oct 2, 2026
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
Route live terminal size changes through the existing resize handler before rebuilding or drawing a surface. Inline chat draws use the recorded size, preserving the purge/replay decision and the existing checks for a resize during drawing.
Include the existing
CLAUDE_CONFIG_DIRsupport as a separate prerequisite commit so the real terminal regression test uses an isolated profile for settings, trust, and file credentials.Why
When the terminal grows taller during a streamed reply, drawing could record the new size before the resize event arrived. The resize handler then classified that event as unchanged, skipped the required purge/replay, and allowed the viewport to outgrow the owned region, causing the app to exit.
Closes #407.
Validation
claude-rsbinary in a PTY with a deterministic fixture bridge: stream 1,500 lines, alternate between 87×38 and 87×55 for 200 resizes, verify the completed reply and a subsequent prompt on the rendered screen, and exit through Ctrl+Q with status zero. The test uses an existing terminal parser and cleans up its child on failure.cargo test --all-features --quieton Windows. Formatting, Clippy with warnings denied, locked dependency fetching, dependency policy/advisories, and duplicate-code checks pass. Rust 1.88.0 also passes checks with all features and all targets.Notes
docs/src/settings.md.