← Back to Pull requests

fix(tui): shaded code blocks are shaded to the full width #159

Open
unknown opened this pull request with 294 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 25, 2026 13:02 UTC
Author

With shadedCodeBlocks on, 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: continue gets a short bar next to a long for line.

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 -->

Diff: 294 lines (+220 / -74) across 3 files Reviewer: claude[bot] Review duration: 8m
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
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.9% (MEDIUM) · Higher = larger blast radius
39.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 21.3% · Safe to merge
21.3%