Skip to content

style(context_bar): add space between bar and percentage#179

Merged
stephenleo merged 1 commit into
stephenleo:mainfrom
ikhurramraza:style/context-bar-space
May 12, 2026
Merged

style(context_bar): add space between bar and percentage#179
stephenleo merged 1 commit into
stephenleo:mainfrom
ikhurramraza:style/context-bar-space

Conversation

@ikhurramraza
Copy link
Copy Markdown
Contributor

@ikhurramraza ikhurramraza commented May 12, 2026

Summary

  • Insert a single space between the context bar and its percentage text so the output reads ███░░░░░░░ 35% instead of ███░░░░░░░35%.
  • Update the module docstring and the inline test comment to reflect the new format.

Why

With the default empty character (light shade) sitting flush against a digit, the percentage looks visually cramped. A single space cleanly separates the bar from the number without affecting width-sensitive consumers (the bar width itself is unchanged; only one extra space is appended before the percentage text).

Test plan

  • cargo fmt
  • cargo clippy -- -D warnings
  • cargo test — 68 passed, 0 failed (including test_context_bar_35_percent_3_filled_7_empty, which asserts on filled/empty char counts and the "35%" substring — both still hold)
  • cargo build --release

🤖 Generated with Claude Code

The rendered context bar previously printed the percentage directly
adjacent to the trailing empty character (e.g. `███░░░░░░░35%`), which
looked cramped — especially with `░` shading next to digits. Insert a
single space so the output reads `███░░░░░░░ 35%`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stephenleo
Copy link
Copy Markdown
Owner

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@stephenleo stephenleo merged commit c105b2d into stephenleo:main May 12, 2026
3 checks passed
@stephenleo
Copy link
Copy Markdown
Owner

Merged! Thank you for your submission. Will release a new version over the weekend

@stephenleo stephenleo mentioned this pull request May 12, 2026
7 tasks
@ikhurramraza ikhurramraza deleted the style/context-bar-space branch May 12, 2026 16:10
yonas pushed a commit to yonasBSD/cship that referenced this pull request May 13, 2026
- Bump crate version to 1.7.1 and unify the tagline across crate description, README hero, and docs/index.md hero
- Center the README title block (heading, badges, tagline, hero image) via `<div align="center">`
- Showcase: drop the redundant "Full Starship Prompt" example and fold the Catppuccin Powerline `starship.toml` into the Hero example, labelled alongside `~/.config/cship.toml`
- Refresh example screenshots
- Include stephenleo#179's space-between-bar-and-percentage `context_bar` fix in the release notes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants