Skip to content

feat(line-themes): per-status-line theme overrides - #40

Merged
axisrow merged 1 commit into
mainfrom
feat/line-themes
Sep 28, 2026
Merged

axisrow merged 1 commit into
mainfrom
feat/line-themes

Conversation

@axisrow

@axisrow axisrow commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Per-status-line theme overrides via the additive lineThemes setting: each line can use its own theme ("lineThemes": ["dracula", "nord-aurora"]), so status lines can be multicolored
  • Undefined entries (or a short/absent array) inherit the global theme (settings.theme in regular mode, powerline.theme in powerline mode); 'none' disables theming for a line — configs without the key render byte-identically
  • In powerline mode an own-theme line restarts its palette at slot 0 and breaks the continueThemeAcrossLines chain; the next global line restarts the global sequence at 0
  • TUI: new "Line Themes" menu entry → LineSelector → the existing theme picker in per-line mode (Inherit/None options, no 'custom' bake); line append/delete/move keeps lineThemes aligned; LineSelector blocks color editing only when every line is theme-managed
  • Additive optional schema key, no version bump, no migration (same precedent as theme)

Testing

  • bun test: 2596 pass / 0 fail (11 new cases across renderer regular/powerline, powerline-theme-index, config, App, PowerlineThemeSelector, StatusLinePreview, and a new LineSelector test)
  • bun run lint: clean
  • Piped CLI smoke (regular): 3 lines render three different themes (BD93F9 / BF616A / 88C0D0); the inherit line is byte-identical to output without lineThemes
  • Piped CLI smoke (powerline, continueThemeAcrossLines): after an own-theme line, the next global line restarts at slot 0

🤖 Generated with Claude Code

Each status line can now carry its own theme via the additive
`lineThemes` setting (parallel to `lines`): an undefined entry (or a
short/absent array) inherits the global theme (settings.theme in
regular mode, powerline.theme in powerline mode) and 'none' disables
theming for that line, so existing configs render byte-identically.

- renderer: resolve the theme per line at both choke points
  (regular + powerline); an own-theme powerline line restarts its
  palette at slot 0
- render loop / StatusLinePreview: an own-theme line breaks the
  continueThemeAcrossLines chain — the next global line restarts at 0
- config load: normalizeLineThemes clamps the array to the line count
- TUI: new "Line Themes" menu entry (LineSelector -> theme picker in
  per-line mode with Inherit/None options); line add/delete/move keeps
  lineThemes aligned with lines; LineSelector blocks color editing
  only when every line is theme-managed

Co-Authored-By: Claude Code <[email protected]>
@axisrow
axisrow merged commit ab3d263 into main Sep 28, 2026
9 checks passed
@axisrow
axisrow deleted the feat/line-themes branch September 28, 2026 18:23
axisrow added a commit that referenced this pull request Oct 11, 2026
Merge upstream/main (sirmalloc/ccstatusline, v2.2.32) resolving 60
conflicting files. All fork features are preserved and ported onto the
upstream structure; nothing from the fork was removed.

Upstream infrastructure adopted:
- widget base classes (git-count, token-count, extra-usage-amount),
  SearchableOptionEditor, label editing ('e' keybind), useTextCursor
- git security hardening (GIT_HARDENING_ARGS, resolveExecutable,
  git-hardening.ts) - the daemon async git twin is hardened too
- sanitizeTerminalText on all render output paths
- NO_PROXY exclusion and closable proxy agents in usage/status fetches

Fork features kept on top: daemon (#14-#54), compact labels (#10/#21/#27,
routed through the upstream label override with preset priority),
line themes (#40), zero-hide states, maxWidth + lazy editors, fishStyle
abbreviation, env snapshots (#15/#18), lazy proxy-agent loading (sirmalloc#397),
keep-existing install, fork version suffix (2.2.32.fork1).

Known test failure kept as-is: git-hardening-exec "keeps Git LFS
installed into the repository config" also fails on a clean
upstream/main checkout under macOS (verified in a worktree); upstream CI
runs Linux.

Co-Authored-By: Claude Code <[email protected]>
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