Repository navigation
Strip decorative padding and borders from terminal review text - #18
Closed
serrebidev wants to merge 1 commit into
Closed
serrebidev wants to merge 1 commit into
serrebidev wants to merge 1 commit into
Conversation
Terminal cells are space-padded to the column width and TUI apps reserve whole rows/columns for borders and status chrome. Captured as a UNIT_STORY, a Windows Terminal review fills with blank padding and box-drawing-only lines that bury the real content when navigated line by line. Add _cleanTerminalText(): strip per-line trailing whitespace and drop lines whose only non-whitespace characters are Unicode box-drawing glyphs (U+2500-U+257F). Content lines that merely contain a border character are kept. Applied to both TermControl captures in obtainUWPWindowText(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
|
This PR is the terminal text cleanup — stripping padding and border-only lines from captured terminal text.
Notes for review:
|
|
Ported to ragb#5, where maintenance now continues. Credited via Co-Authored-By. Thanks @serrebidev. |
Author
1 of 3 tasks
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
Cleans up the text captured from a Windows Terminal
TermControlbefore it is shown in the review window.Why
Terminal cells are space-padded to the column width, and TUI apps (Claude Code,
htop, editors, etc.) reserve whole rows and columns for borders and status chrome. Captured as aUNIT_STORY, the review fills with runs of blank padding and box-drawing-only lines. Navigating that line by line in the review window means paging past a lot of empty and border-only lines to reach the real content.How
Adds
_cleanTerminalText(), applied to bothTermControlcaptures inobtainUWPWindowText():Content lines that merely contain a border character (e.g.
│ some text │) are preserved, because the letters and digits inside fall outside that range.🤖 Generated with Claude Code