Skip to content

feat: add color theme setting with light and auto modes - #22

Merged
night-slayer18 merged 2 commits into
night-slayer18:devfrom
johnnybakucz:feat/add-color-theme
Aug 6, 2026
Merged

feat: add color theme setting with light and auto modes#22
night-slayer18 merged 2 commits into
night-slayer18:devfrom
johnnybakucz:feat/add-color-theme

Conversation

@johnnybakucz

Copy link
Copy Markdown
  • Add workspace-scoped theme setting (dark/light/auto, default auto)
  • Ship dark + light palettes in src/tui/theme.ts; colors is now a mutable object so all views re-read the active palette
  • Auto mode probes the terminal via OSC 11 and falls back to COLORFGBG, then dark, if the terminal doesn't respond in 100ms
  • Wire the setting into the TUI config screen (hot-applies on save) and the CLI: 'leetcode config --theme <dark|light|auto>' plus the interactive prompt

- Add workspace-scoped theme setting (dark/light/auto, default auto)
- Ship dark + light palettes in src/tui/theme.ts; colors is now a
  mutable object so all views re-read the active palette
- Auto mode probes the terminal via OSC 11 and falls back to COLORFGBG,
  then dark, if the terminal doesn't respond in 100ms
- Wire the setting into the TUI config screen (hot-applies on save)
  and the CLI: 'leetcode config --theme <dark|light|auto>' plus the
  interactive prompt
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Thanks for the PR, @johnnybakucz! 🎉

Before this gets reviewed, please make sure the following are checked:

  • Tests pass locally (npm test)
  • Type check passes (npm run typecheck)
  • Lint passes (npm run lint)
  • New features include tests
  • Documentation updated if needed
  • PR targets the dev branch (not main)

See CONTRIBUTING.md for full guidelines.

The CI pipeline will also run build, test, lint, and typecheck automatically.

@johnnybakucz
johnnybakucz changed the base branch from main to dev August 4, 2026 11:49
@johnnybakucz

johnnybakucz commented Aug 4, 2026

Copy link
Copy Markdown
Author

Checklist status:

  • Tests pass locally (npm test) — 280 passed, 53 skipped (2 pre-existing failures unrelated to this PR: integration tests that require npm run build state)
  • Type check passes (npm run typecheck)
  • Lint passes (npm run lint) — 0 errors, 31 pre-existing warnings
  • New features include tests — none added; happy to add coverage for normalizeThemeInput, parseOsc11, and resolveTheme if desired
  • Documentation updated if needed — README not updated yet; can add a short section under Configuration if the theme is worth documenting there
  • PR targets the dev branch — retargeted from main to dev

@johnnybakucz

Copy link
Copy Markdown
Author

Updated:

  • New features include tests — added src/__tests__/tui/theme.test.ts covering normalizeThemeInput, resolveTheme (dark/light/auto + COLORFGBG detection), and applyTheme palette swap
  • Documentation updated — README Configuration section now documents --theme and how auto detection works

@johnnybakucz johnnybakucz changed the title Add color theme setting with light and auto modes feat: Add color theme setting with light and auto modes Aug 4, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Aug 4, 2026
@johnnybakucz johnnybakucz changed the title feat: Add color theme setting with light and auto modes feat: add color theme setting with light and auto modes Aug 4, 2026
@night-slayer18
night-slayer18 merged commit 538df8a into night-slayer18:dev Aug 6, 2026
9 checks passed
@night-slayer18

night-slayer18 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution!
I have verified the changes 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants