Repository navigation
fix(tui): shaded code blocks are shaded to the full width - #159
Conversation
Each line was shaded up to the end of its text, so a block had a ragged right edge: short lines got short bars. Every line, the language label included, is now padded to the width inside the shading, so the block is one rectangle and keeps its shape while a reply streams in.
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
With
shadedCodeBlockson, each code line was shaded only up to the end of its text (#96's choice, so copied code has no trailing spaces), which leaves a ragged right edge:continuegets a short bar next to a longforline.Every line of a shaded block, the language label included, is now padded with spaces to the content width inside the shading, so the block is one rectangle. Padding to the widest line instead would make the block grow and redraw earlier lines as longer ones stream in.
Trade-off: selecting code with the mouse may copy trailing spaces, depending on the terminal.
Tests: markdown-shaded-code (including the 24 randomized stream/resize/theme cases) and markdown tests updated to the new shape; tui suite 1403/1403, coding-agent theme-style 11/11. Checked visually with Pi's dark theme (before/after render).
Need help on this PR? Tag
@codesmith-botwith what you need.