anthropics / anthropics/claude-code

[Feature Request] Document statusline usable width and fix right-aligned element truncation

Open
#81,454 0 comments 0 reactions 0 assignees View on GitHub
area:tui stale
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

**Bug Description**
The /statusline docs imply a script can use the full COLUMNS width, but in practice Claude Code renders the status-line row in a field ~3 columns narrower than COLUMNS (a fixed right margin), and truncates any overflow with a …. A right-anchored element (e.g. a context-usage bar) built to COLUMNS therefore loses its last characters to …, with no way to discover the reserve from the docs.

Requests:
1. Document the exact usable width (e.g. "the status line renders in COLUMNS − N; build to that, not COLUMNS").
2. Have the statusline-setup agent account for it when generating right-aligned scripts.
3. Related gotchas worth documenting/handling in generated scripts: width math must count codepoints, not bytes (multibyte Nerd Font glyphs need a UTF-8 locale), and Nerd Font glyph cell-width varies by font/terminal (1 vs 2 cells), which shifts alignment.

**Environment Info**
- Platform: linux
- Terminal: WezTerm
- Version: 2.1.197
- Feedback ID: b54eaf06-e663-42cc-864a-d646237a2a7c

**Errors**
```json
[]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the /statusline documentation and the statusline-setup agent referenced in the request. Verify how the rendered width relates to COLUMNS and inspect how generated right-aligned scripts calculate width, including codepoint and terminal glyph-width concerns. Done means the usable-width rule is documented and generated scripts account for the reserve and stated width caveats.

Written by the indexing model from the issue text.

Assessment

Domain
cli, documentation, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.