Skip to content

TUI: add light/dark theme support#393

Merged
cjimti merged 2 commits intomasterfrom
feature/tui-light-theme
Feb 10, 2026
Merged

TUI: add light/dark theme support#393
cjimti merged 2 commits intomasterfrom
feature/tui-light-theme

Conversation

@cjimti
Copy link
Copy Markdown
Member

@cjimti cjimti commented Feb 10, 2026

Summary

  • Add --theme flag (light/dark) and KUBEFWD_THEME env var to control TUI color scheme
  • Replace hardcoded dark-only colors with switchable palette via styles.SetDarkTheme()
  • Light palette uses darker color variants (dark gold, dark green, dark teal, black text) optimized for light terminal backgrounds

Closes #392

Usage

sudo -E kubefwd svc -n ns --tui --theme light
KUBEFWD_THEME=light sudo -E kubefwd svc -n ns --tui

Test plan

  • go build ./... compiles cleanly
  • go test ./... all tests pass
  • --theme light on a light terminal: text is readable with dark/muted colors
  • --theme dark (or no flag): original bright colors unchanged
  • KUBEFWD_THEME=light env var works as override

Replace hardcoded dark-theme colors with a switchable palette via
styles.SetDarkTheme(). The light palette uses darker color variants
(dark gold, dark green, dark teal, black text) optimized for light
terminal backgrounds.

Add --theme CLI flag and KUBEFWD_THEME env var to override the default
dark theme. Priority: flag > env var > default (dark).

Usage:
  sudo -E kubefwd svc -n ns --tui --theme light
  KUBEFWD_THEME=light sudo -E kubefwd svc -n ns --tui
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 84.00000% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.15%. Comparing base (c08d613) to head (33b455d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cmd/kubefwd/services/services.go 5.88% 16 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #393      +/-   ##
==========================================
+ Coverage   81.13%   81.15%   +0.02%     
==========================================
  Files          70       71       +1     
  Lines       12665    12765     +100     
==========================================
+ Hits        10276    10360      +84     
- Misses       1985     2001      +16     
  Partials      404      404              
Files with missing lines Coverage Δ
pkg/fwdtui/styles/styles.go 100.00% <100.00%> (ø)
cmd/kubefwd/services/services.go 11.16% <5.88%> (-0.24%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

FOSSA's JS dependency scanning requires a paid account for exclusions
and consistently fails on documentation build dependencies.
@cjimti cjimti merged commit 1835394 into master Feb 10, 2026
13 checks passed
@cjimti cjimti deleted the feature/tui-light-theme branch February 10, 2026 19:00
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.

TUI Light terminal color scheme support

1 participant