Skip to content

feat: selectable themes, theme chooser, and line-1 refinements - #15

Merged
vtmocanu merged 20 commits into
mainfrom
feature/themes
Oct 9, 2026
Merged

vtmocanu merged 20 commits into
mainfrom
feature/themes

Conversation

@vtmocanu

@vtmocanu vtmocanu commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Selectable themes, a packaged theme chooser, and a few line-1 refinements.

  • Themes via STATUSLINE_THEME or the saved choice in $XDG_CONFIG_HOME/cc-statusline/theme: tokyo-auto (new default, follows OS light/dark with a 60s cache), tokyo-night, tokyo-day (official tokyonight.nvim Day palette), classic (the previous look, byte-identical), hue-dark, nord, phosphor, synthwave (post-layout neon gradient), gruvbox, dracula, catppuccin; default aliases tokyo-auto. Users with ~/.claude/statusline-color-overrides.json and no explicit choice keep classic.
  • cc-statusline-theme chooser, shipped with brew and install.sh: fzf picker with the list on top and a full-width 2-row live preview (numbered menu without fzf), current theme marked, list/current/set/reset/preview. Previews use isolated caches, no fetchers, no tab-title writes, fsmonitor off. Reports when a change applies and whether settings.json overrides it.
  • Line 1: repo session counts move next to @handle (dropped whole after k8s on overflow); only the update notice stays right-aligned. The auto session title is remembered across /rename, and a title equal to the visible handle is hidden.
  • Fix: install.sh could fail intermittently (git archive SIGPIPE under pipefail); the archive is now staged to a private temp file.
  • New STATUSLINE_TAB_TITLE=0 to skip the tab-title write.

Invariants kept

  • Width is still measurement-driven, WIDTH_SLOP=0; segment caps/joins are measured, and the Synthwave gradient pass only adds zero-width SGRs after all width decisions.
  • classic matches the v3.6.0 output byte for byte (108 renders across all fixtures, widths and phone layout; permanent ANSI goldens added).
  • OSC 8 only wraps fixed glyphs.

Validation

  • task ci green locally in both locales: 1202 render, 75 fetch, 3 installer tests each.
  • task test-themes-full (opt-in exhaustive: every theme x fixture x width plus a 20..60 column sweep) green in both locales.
  • One UX review pass over all themes (contrast, status semantics), applied tweaks are palette-only.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added selectable statusline themes, including an interactive chooser, theme previews, and options to save or reset a choice.
    • Themes can adapt to your system’s light or dark appearance, with an environment setting available to override the selection.
  • Improvements
    • Session titles retain their last automatically generated description when a session is renamed.
    • Peer counts now appear in the statusline flow, with improved layout and truncation on narrow displays.
    • The installer now includes the theme chooser when it is available.

Darken Synthwave's magenta, purple, and cyan gradient stops so phone
service glyphs and wide peer/update text remain readable. Across the
gradient, minimum white/cyan/yellow/pink contrast improves to
12.26/7.06/7.76/3.39:1. Keep the neon caps and status foreground hues.

Brighten dim text in seven themes so held context and empty bars remain
readable while staying secondary to live percentages. Give Synthwave
idle peers a subdued accent. Use code/my-project in chooser previews
for a stable sample folder label.

One UX reviewer inspected 189 real renders, including all service states,
phone/wide layouts, peers, updates, dirty branches, cache inversion, and
transcript-proven held context. No glyph changes were recommended.

Validation: task ci passed 963 checks and 75 fetcher checks in each locale;
task test-themes-full passed 1681 checks in each locale. Unset/default/
unknown theme snapshots each matched all 108 original baseline renders.
@vtmocanu

vtmocanu commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 54166ac7-04b8-4fbe-8d89-d7d1ea4361c9

📥 Commits

Reviewing files that changed from the base of the PR and between 5c22086 and ccc89b8.


📒 Files selected for processing (2)
  • Formula.rb.tmpl
  • install.sh


No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c975d644-cdbb-4133-bdfe-a95f957f5d31

📥 Commits

Reviewing files that changed from the base of the PR and between 108227a and 5c22086.


📒 Files selected for processing (13)
  • CHANGELOG.md
  • CLAUDE.md
  • Formula.rb.tmpl
  • README.md
  • Taskfile.yml
  • cc-statusline-theme
  • install.sh
  • statusline.sh
  • tests/golden/README.md
  • tests/golden/classic-phone.ansi
  • tests/golden/classic-wide.ansi
  • tests/run-install-tests.sh
  • tests/run-tests.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The renderer now supports selectable themes, appearance-aware resolution, updated session-title and peer-count behavior, and theme-specific statusline rendering. A new command lists, previews, and saves themes. The installer stages Git archives through a temporary file.

Changes

Statusline themes and display

Layer / File(s) Summary
Theme resolution and appearance
statusline.sh, tests/run-tests.sh, README.md, CLAUDE.md, Taskfile.yml
The renderer lists and resolves themes, detects and caches system appearance, and applies project color overrides only for classic and hue-dark. Tests and documentation cover appearance, theme configuration, and exhaustive theme runs.
Theme-based rendering
statusline.sh, tests/run-tests.sh, tests/golden/*, tests/golden/README.md, CHANGELOG.md
The renderer uses theme palettes and segment styles across statusline rows, indicators, and alerts. Golden snapshots and theme-matrix tests cover output and layout.
Session titles and peer layout
statusline.sh, tests/run-tests.sh, README.md, CLAUDE.md
The renderer caches sanitized auto-generated titles across empty frames and user renames. Peer counts move into the line flow and follow updated placement and truncation rules. Tab-title output can be disabled.
Theme chooser and distribution
cc-statusline-theme, Formula.rb.tmpl, install.sh, README.md, CLAUDE.md, Taskfile.yml
The new command lists, previews, selects, and saves themes. Homebrew and installer packaging expose it, and the documentation describes its commands, paths, and selection behavior.
Installer archive staging
install.sh, tests/run-install-tests.sh, Taskfile.yml, README.md, CHANGELOG.md, CLAUDE.md
The installer writes Git archive output to a temporary tar file before extraction. Regression tests cover padded archives, archive failures, and preservation of the existing installation.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant ThemeCommand as cc-statusline-theme
  participant Renderer as statusline.sh
  participant ThemeFile as XDG theme file
  User->>ThemeCommand: Request theme list or preview
  ThemeCommand->>Renderer: List themes or render preview
  Renderer-->>ThemeCommand: Theme names or rendered output
  User->>ThemeCommand: Save selected theme
  ThemeCommand->>ThemeFile: Atomically write selection
Loading

Merge Risk: ⚪ Minimal · up to 5c220

No actionable issue remains from this review; the PR is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 43.59% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 4 files. (9 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main changes: selectable themes, the theme chooser, and line-1 refinements.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 43.59% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 4 files. (9 skipped: 9 unsupported.)



✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@vtmocanu

vtmocanu commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@vtmocanu
vtmocanu merged commit 961e05c into main Oct 9, 2026
2 checks passed
@vtmocanu
vtmocanu deleted the feature/themes branch October 9, 2026 16:24
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