fix(tui): shaded code blocks are shaded to the full width #159
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 294 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.340
Real PR Conversation Timeline
1 comments
"Review active on #159"
general
weight: 0.35
claude[bot]
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).
<!-- codesmith:footer -->
---
<a href="https://app.blacksmith.sh/opensec-git/codesmith/Pi-Bolt/pr/159?autoLogin=true&ref=codesmith_pr_footer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png" width="162" height="28"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1795525346&installation_model_id=445139&pr_number=159&ref=codesmith_pr_footer&repository=opensec-git%2FPi-Bolt&return_to=https%3A%2F%2Fgithub.com%2Fopensec-git%2FPi-Bolt%2Fpull%2F159&signature=249a88df481c79db1541b15a1907ecb4e915586cb7d86428acbd1ed2d0d4a860"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup>
<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->