Fix layout consistency across all widths - #118
Merged
Merged
Conversation
- Center the elapsed timer properly in justify mode: drop the baked-in rjust padding and rebalance even when a sibling field consumes all slack in the same pass (widths 102/112) - Align leading numbers on the context-fill and input-token rows, with reserved width so growing values (25.9K -> 123.0K) don't shift alignment or touch a border - Add a trailing space to the model section's non-pill branch so digits never sit flush against the closing border (widths 79-81) - Map ascii-mode pill corner glyphs to '+' instead of ' ' so a pill can no longer erase structural border elbows/corners - Align TOKENS_COST_MIN_WIDTH with MEDIUM_WIDTH so the rich context row and tokens/cost dividers appear from the wide layout's floor, removing the inconsistent terminal-width 86-90 band Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Context
Refine the statusline layout so it's consistent and well behaved at all widths. An exhaustive width sweep (40–200, dense 60–130, ascii-mode analysis) surfaced five layout bugs — justify-mode padding asymmetry, misaligned leading numbers, digits flush against borders, ascii-mode pill corners erasing border structure — plus a threshold inconsistency where the plugin row appeared at a narrower width than the context row's rich form. This PR fixes all of them and bumps the version to v0.7.1.
Changes
Justify-mode centering
rjust(8)before layout's fair 50/50 split, leaving it visibly off-center; the value is now centered by the justify pass itself.Row padding & border adjacency
25.9K→123.0Kdoesn't shift alignment or touch a border.ASCII glyph mode
' 'and could erase structural border elbows/corners; they now map to+.Width-threshold alignment
TOKENS_COST_MIN_WIDTHnow referencesMEDIUM_WIDTH(85 → 80 box width), so the rich context row (150.0K (75%) 100%) and the tokens/cost dividers appear from the wide layout's floor — removing the terminal-width 86–90 band where the plugin row showed but the context row stayed degraded.Checklist
Screenshots / recording
Benchmark
mainPRSystem info
🤖 Generated with Claude Code