fix(tui): align running shell output - #41880
Merged
Merged
Conversation
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
Keep the shell card's layout stable between the running and settled states. Two related alignment bugs:
v2-migrationbranch and never reachedv2.$prefix was baked into the flat text, so continuation lines jumped back to the card inset.Before / After
Before: While a shell command ran, its multiline streamed output rendered inside the spinner's text column, indented two columns right of where it belongs. When the command completed, the output jumped two columns left while wrapped command lines jumped from a hanging indent to the card inset.
Running (output indented under the command; wrapped command aligned under the command):
Completed (output shifted left; wrapped command line now at the card inset):
After: Nothing moves when the command settles. Output renders at the card's content inset in both states, and wrapped command lines keep the same hanging indent in both states.
Running:
Completed:
How
Both in
Shellinpackages/tui/src/routes/session/index.tsx:Spinner; streamed output renders in its own<text>below, shared by the running and settled branches (newlimitedInput/limitedOutputmemos split from the existing collapsed-content memo).$, or{workdir}$) as its own row column mirroring the spinner's glyph-column geometry, instead of prefixing$into the command text.input()no longer changes shape between states for the default-workdir case.Scope
fix(tui): show completed write output) and fix(tui): open authorization links #40905 (fix(tui): open authorization links) were also merged intov2-migrationby accident and still need the same porting treatment; not included here.Testing
bun typecheckinpackages/tuiv2).