Skip to content

Commit 8564c54

Browse files
committed
fix(cli): drop the timer as a last resort to fit status chips
The selectStatusBarChips shrink ladder could exit while the chip cluster still exceeded the width budget. With a warning or error index chip present, the ladder ran out of steps after dropping cost, model, git, and context, so the cluster measured 18 against a budget of 17 and the test-cli overflow test failed in CI. Add a last-resort step that drops the timer even during an active run, after the context-drop step. The index chip is never dropped or relabeled by that step, so an index alert still survives the narrowest rows. Follow-up hardening from review: export shared statusBarClusterWidth, statusBarChipBudget, and STOP_BUTTON_WIDTH so tests reuse the production width math instead of duplicating it; name the budget constants; truncate model names by stringWidth on grapheme cluster boundaries; drop an index chip that would clamp to an uninformative ellipsis-only label; and derive the context label from a single source shared with the overflow-shorten step. Expand status-bar-chips coverage: tone thresholds, sub-cent, zero, and negative cost, zero-diff git and deletions, xs timer, stop-hint, and non-error index paths, active versus idle timer priority, budget invariants, and wide-character and ZWJ truncation. 48 pass / 0 fail locally, typecheck green.
1 parent bcff8be commit 8564c54

2 files changed

Lines changed: 932 additions & 108 deletions

File tree

0 commit comments

Comments
 (0)