-
Notifications
You must be signed in to change notification settings - Fork 338
Open
Description
Problem
When the terminal window is narrow, the status line content overflows and wraps, making it hard to read:
Context ░░░░░░░░░░ 4% │ Usage ███░░░░░░░ 27% (2h 49m / 5h) | ██░░░░░░░░ 16% (5d 5h / 7d)
The progress bars (coloredBar / quotaBar) are hardcoded to width: 10 in session-line.ts, lines/identity.ts, and lines/usage.ts. The render function already detects terminal width via getTerminalWidth() and wraps lines, but the bars themselves never shrink.
Proposed Solution
Dynamically scale the bar width based on process.stdout.columns. For example:
- Wide terminal (≥100 cols): keep
width: 10(current default) - Medium terminal (60–99 cols): reduce to
width: 6 - Narrow terminal (<60 cols): reduce to
width: 4or hide bars entirely, showing only the percentage
This way the most important information (percentages, reset times) stays visible even in small windows.
Current Behavior
- Bar width is always 10 characters regardless of terminal size
- Narrow terminals cause line wrapping via
wrapLineToWidth, breaking the layout
Expected Behavior
- Bars scale down proportionally when terminal is narrow
- Critical info (percentages, times) is always visible
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels