Give the usage bars a line of their own, always
Squeezing the 5h/7d group onto line one was what cost the reset times and the pace figure at laptop width, and it made the layout jump between one and two lines as the branch name or the cost changed width. Line two is now the group's own at every terminal size, so both timestamps and the burn rate fit; the ladder only starts giving things up below ~80 columns. The bars also survive down to 35 columns now rather than being dropped below 68, since a line of their own is all they need. Every rung of the ladder is fit-checked, the last one included: with the floor that low, a percentage the API reports in more digits than anyone expects would otherwise have overflowed the line rather than dropped the group. The two timestamps still cost ~10 subprocesses to format on a line that redraws per keystroke, so that is skipped when line two provably cannot show them -- an under-estimate, so the fit check stays the decider. With nothing left to squeeze, WRAP_NARROW, the wrap band and the split tier go: line one is the full tier down to 150, wide to 68, then narrow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2a785a55a7
commit
ab96dfc52a
7 changed files with 148 additions and 155 deletions
|
|
@ -20,7 +20,12 @@ SCRIPT = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))
|
|||
BRANCHES = ["main", "feature/some-longer-branch-name",
|
||||
"feature/an-extremely-long-branch-name-that-keeps-going-and-going"]
|
||||
MODELS = ["Opus 5", "Opus 5 (1M context)"]
|
||||
WIDTHS = range(64, 245, 10)
|
||||
# Starts at the narrowest terminal line ONE fits on with the longest branch
|
||||
# below (measured: 44 usable columns, i.e. 49 with padding 2) -- the pre-existing
|
||||
# narrow-tier floor, which width_test.sh marks XFAIL. Everything above it is
|
||||
# fair game, and that now includes the band from RL_MIN_WIDTH up, where the
|
||||
# usage group is shown but has few columns to spare.
|
||||
WIDTHS = range(49, 245, 10)
|
||||
# The cwd basename is rendered at the widest layouts and is capped by
|
||||
# CWD_MAX_LEN; vary it, since a long project directory was one of the ways
|
||||
# line one used to overflow.
|
||||
|
|
|
|||
Loading…
Reference in a new issue