Repository navigation
Make line wrapping adapt to the terminal width - #2
Merged
Merged
Conversation
Width was handled in three broken ways: monitor transcript lines were truncated to whatever the width was when they arrived (and never re-flowed on resize), the report browser computed its table columns and markdown word wrap once from a hardcoded 100-column startup fallback, and plain output clipped at a fixed 200 characters regardless of the terminal. Transcript lines now wrap ANSI-aware instead of truncating, and every retained line re-wraps when the terminal resizes, so the transcript stays complete and readable at any width. The monitor header and status bar clip to one line at the current width (the budget bar yields cells first), the report browser rebuilds its columns and re-renders its markdown on resize while preserving the cursor, and plain output plus the run summary wrap to the measured terminal width. Regression tests pin the behaviors: re-wrap on resize, one-line header invariant from 40 to 200 columns, adaptive report columns, ANSI-preserving wrap/truncate. Verified live in a 50-column PTY: transcript, status bar and summary all fit. 💘 Generated with Crush Assisted-by: Crush:rits/zai-org/glm-5-3
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
Width was handled in three broken ways, all fixed:
--no-monitor, summaries): clipped at a fixed 200 characters. Now wraps to the measured terminal width (120-col fallback when not a TTY), including thekvsummary lines that previously overflowed with long journal paths.Verification
qafter completion.💘 Generated with Crush