Commit 2641b0a
feat: extra-usage gating, color hierarchy, test coverage, bug fixes
Add --extra flag (always/on-limit/off) to control when extra-usage
component appears. on-limit shows it only when 5h >= 80% or 7d >= 70%,
keeping the statusline compact until quota pressure makes the budget
actionable. developer theme defaults to on-limit, minimal to off.
Color hierarchy overhaul: path demoted to dim cyan, dirty git branch
pops yellow while clean recedes to dim yellow, time goes plain dim to
reduce color noise, user tier label gets semantic color (MAX=green,
PRO=cyan).
Bug fixes found by code review:
- Color variables used before definition (git info had no ANSI codes)
- format_duration(0) returned "1m" instead of "0m"
- Division by zero when CLAUDE_CONTEXT_LIMIT=0
Also: integer quota percentages (12% not 12.0%), refresh indicator
(~ in flight, ! on error), 1h30m for sessions over 60 minutes,
space between model[1m] and context bar, dead code removal.
85 bats tests (was 56). README rewritten.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ddca5aa commit 2641b0a
5 files changed
Lines changed: 449 additions & 312 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
17 | 48 | | |
18 | 49 | | |
19 | 50 | | |
| |||
0 commit comments