fix(tui): scroll to bottom on submit, space above busy indicator - #26
Merged
Conversation
refresh() only sticks to the bottom when already there, so hitting Enter while reading scrollback left the new message out of view. Submitting is an explicit 'show me the latest' signal: GotoBottom on send, and on the mid-turn queue path for consistency.
Gives the thinking/tool indicator breathing room between the transcript and the input box; inputAreaHeight accounts for the extra row so the layout math stays exact.
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.
What
refresh()only stuck to the bottom when already there, so submitting while reading scrollback left the new input out of view. Streaming events keep the old stick behavior — no yanking readers around.inputAreaHeight()accounts for the extra row so the layout math stays exact.Tests
TestSubmitJumpsToBottom: scrolled-up viewport, submit fresh and mid-turn-queue, assertsAtBottom().TestStatusLinePlacementupdated for the two-row status line cost and the leading blank row.make fmt && make vet && make lint && make test— all green (lint 0 issues, race-enabled suite).