feat(context_bar): reveal text as the bar fills - #207
Draft
AlexS-scale wants to merge 3 commits into
Draft
AlexS-scale wants to merge 3 commits into
AlexS-scale wants to merge 3 commits into
Conversation
Add `filled_text`, which fills the bar with successive characters of a string instead of repeating `filled_char`, so the bar can spell out a word or phrase as the context window fills. The bar is as wide as the text, so `width` is ignored. [cship.context_bar] filled_text = "CONTEXT WINDOW" # CONTEXT░░░░░░░ 50% Each slot is one visible character: zero-width characters such as combining accents join the character before them, and the track takes the hidden text's display width, so wide characters don't make the bar grow as it fills. A `filled_text` with no visible characters is ignored with a warn-once diagnostic, like `family_style`'s empty key. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add `full_at`, the percentage at which the bar is drawn full (default 100). Claude Code auto-compacts before the context window reaches 100%, so a bar scaled to 100% never completes; setting `full_at` to your auto-compact point fills it in time. Thresholds still compare the real percentage, and a `full_at` at or below 0 is ignored with a warn-once diagnostic. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add `filled_style` and `track_style`, which style the filled slots and the empty slots (the track) on their own instead of sharing one style with the percentage. The threshold style then covers only the percentage, and each unset part style falls back to it, so a bar can keep a fixed look while its percentage still escalates: [cship.context_bar] filled_text = "CONTEXT WINDOW" filled_style = "bold fg:#FFFFFF bg:#4C4C4C" track_style = "fg:#929292 bg:#000000" The painted parts are never wrapped in an outer style, because an outer style's attributes such as bold would otherwise leak into parts that don't reset them: a `format` string's `$style` is left empty for them, and the bar starts from a reset, so a style written directly in `format` doesn't reach it (documented). With neither field set, the existing format and default paths run unchanged. `empty_style` still covers the no-data state. An empty part (the text at 0%, the track at 100%) is left out rather than painted as bare escape codes. Adds a FAQ entry and an end-to-end CLI test with a TOML fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AlexS-scale
force-pushed
the
AlexS/context-bar-filled-text
branch
from
September 25, 2026 15:35
6f72c01 to
765cc49
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds four optional
[cship.context_bar]fields:filled_text: fills the bar with successive characters of a string instead of repeatingfilled_char, so the bar can spell out a word as the context window fills (CONTEXT░░░░░░░ 50%).full_at: the percentage at which the bar is drawn full (default100). Claude Code auto-compacts before the window reaches 100%, so a bar scaled to 100% never completes.filled_style/track_style: style the filled slots and the track separately. Text on a track needs different styles for the letters and the track; today one style covers the whole bar and the percentage.With none of the fields set, output is unchanged: every existing test fixture renders byte-identically to
main. Docs, FAQ, CHANGELOG and schema are updated.TODO (Alex): attach a screenshot or GIF of the bar filling here, or delete this line.