Skip to content

feat(context-bar): add a thin line display mode - #794

Open
Yongzhaooo wants to merge 1 commit into
sirmalloc:mainfrom
Yongzhaooo:feat/context-bar-line-mode
Open

Yongzhaooo wants to merge 1 commit into
sirmalloc:mainfrom
Yongzhaooo:feat/context-bar-line-mode

Conversation

@Yongzhaooo

Copy link
Copy Markdown

Summary

Adds a line display mode to the Context Bar widget. Used context is drawn with ━ and the remainder with ─, at the same 16-cell width as the medium bar:

Context: ━━━━━─────────── 60k/200k (30%)

The block bars (█░, ▓░) look heavy in light terminal themes and in non-Powerline layouts. This mode keeps the bar readable there without adding color logic.

Changes

  • ContextBar: new line display mode, rendered in both the live and preview paths. It appears in the editor as "(line bar)".
  • The p cycle is now progress-short → progress → slider → slider-only → line → progress-short. The new mode is last in the cycle, so existing configurations render the same as before.
  • docs/USAGE.md: keybind description updated.
  • Tests: the cycle test covers the new step, and a new test covers line rendering and the editor label.

Testing

  • bun test src/widgets/__tests__/ContextBar.test.ts: 10 pass.
  • bun run lint: clean.
  • Full bun test on Windows 11: 33 failures, the same 33 tests that fail on an unmodified main in this environment (claude-status fetch locks, custom command capture and similar). None of them involve this widget.

Block glyphs (█░, ▓░) read heavy in light themes and plain-text layouts.
The new 'line' mode draws used context as ━ and the rest as ─, at the
same 16-cell width as the medium bar. It joins the end of the p cycle,
so existing configurations are unchanged.
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