Skip to content

Fix skills+plugins section collapse and loc/cost label visibility - #121

Open
tmck-code wants to merge 2 commits into
mainfrom
fix/skills-plugins-loc-cost-labels
Open

Fix skills+plugins section collapse and loc/cost label visibility#121
tmck-code wants to merge 2 commits into
mainfrom
fix/skills-plugins-loc-cost-labels

Conversation

@tmck-code

@tmck-code tmck-code commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Context

Fixes three related statusline rendering bugs surfacing across width/config combinations users actually hit:

  1. The skills + plugins trailing column vanished entirely (instead of rendering as an empty bordered section) when there were no skills/plugins loaded, which dragged the borders and labels for the neighboring loc r/w and cost sess/day sections along with it.
  2. The loc r/w and cost sess/day labels silently disappeared from the border row when show_icons=False, because label detection sniffed for an icon glyph that's gated on show_icons instead of using an explicit flag.
  3. The loc r/w label wasn't centered within its section — it centered against the long label form's width instead of the abbreviated form actually rendered.

Also adds a new optional "tokens over time" full-width row (off by default, YAS_SHOW_TOKENS_OVER_TIME).

Bumps version to 0.7.2 (patch — bug fixes only, no new user-facing features).

Changes

Renderer / layout

  • claude/yas/renderer.pytokens_cost no longer gates the skills+plugins trailing column on non-empty content; it now always renders (blank-padded) when width allows. Also returns an explicit has_lines flag instead of forcing callers to re-derive presence from rendered glyphs.
  • claude/yas/layout.py — consumes has_lines directly for the loc r/w label anchor; centers the loc r/w label using the abbreviated label form's width (matching what _fit_label actually renders) instead of the long form's width.
  • claude/yas/render/text.py, claude/yas/config.py, claude/yas/constants.py — support for the new tokens-over-time row and related label constants.

Tests

  • Updated test_tokens_cost.py, test_layout_seam.py, test_labels_layout.py, test_tool_counts_row.py, test_config.py for the new column/border layout.
  • Added test/test_tokens_over_time.py for the new row.
  • Regenerated test/fixtures/claude_dark_wide.ansi snapshot to match the corrected renderer output.

Checklist

  • Tests added or updated for new/changed behaviour
  • (bug fixes) a regression test now covers the situation so it can't come back

Screenshots / recording

before / after
kitchen-sink kitchen-sink
no-icons no-icons
empty-skills-plugins empty-skills-plugins
tokens-over-time tokens-over-time

Benchmark

Command Mean [ms] Min [ms] Max [ms] Relative
main 45.6 ± 3.2 42.6 65.5 1.01 ± 0.08
PR 45.2 ± 1.3 42.4 48.7 1.00

System info

Key Value
OS Linux archlinux 7.1.8-arch1-3 #1 SMP PREEMPT_DYNAMIC Tue, 11 Aug 2026 09:16:08 +0000 x86_64 GNU/Linux
Claude Code 2.1.235 (Claude Code)
Terminal TERM=tmux-256color TERM_PROGRAM=tmux SHELL=/bin/bash COLORTERM=truecolor
Locale LANG=en_AU.UTF-8 LC_ALL=
Python Python 3.13.13
uv uv 0.12.3 (507230998 2026-08-07 x86_64-unknown-linux-gnu)

Test and others added 2 commits August 19, 2026 21:21
The skills+plugins trailing column vanished entirely when empty instead
of rendering as a blank bordered section, dragging the loc r/w and cost
sections' borders/labels along with it. Separately, the loc r/w and cost
labels silently disappeared with show_icons=False because label
detection sniffed for an icon glyph instead of using an explicit flag.
Also centers the loc r/w label within its section using the abbreviated
label form actually rendered.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tmck-code
tmck-code marked this pull request as ready for review August 19, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant