fix(tui): clip host display names by terminal columns #4203
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 261 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.333
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4203"
general
weight: 0.35
openrig-review
What a user gets
Host display names now fit the explorer's available terminal columns without splitting a grapheme. For example,
東京開発機previously produced a 17-column label in a 13-column budget, and clipping👩💻stationcould leave a partial joined emoji. Reuse the existingcolumnsandcolumnIndexhelpers while reserving space for the host identity and reachability suffix.How you verified it
Tested commit
41960cead4773c670bef85bb7e8e42dcc1abad86on Windows, Node 24.14.1:f2fe3e529failed in four cases: three wide labels and the joined emoji.npx vitest run packages/tui/test/host-label-width.test.ts packages/tui/test/terminal-safe-text.test.ts packages/tui/test/emoji-truncation.test.ts— 25 passed.npm run build— passed.npm run lint— passed.git diff origin/main...HEAD --check— passed.npm test— incomplete: repository script checks reported failures in unchanged packaging/policy/POSIX-oriented checks, and the run stopped making progress and was interrupted. Workspace suites were not reached.Anything you were unsure about
Rendering is verified through deterministic unit tests; no native terminal session was exercised. As before, the command identity and reachability suffix are retained when they alone exceed the available width.
If this is security-related
N/A.
CHANGELOG.mdedit<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Host labels now fit the available terminal width more accurately, including names with wide characters and emoji.
Command identity remains visible when there is no room for a display name.
Tests
* Added coverage for host label clipping and fitting across different host states.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->