Skip to content

(tui) add theme manager support#452

Closed
J3y0r wants to merge 6 commits into
esengine:mainfrom
J3y0r:main
Closed

(tui) add theme manager support#452
J3y0r wants to merge 6 commits into
esengine:mainfrom
J3y0r:main

Conversation

@J3y0r

@J3y0r J3y0r commented May 8, 2026

Copy link
Copy Markdown

Closes #449

What

增加了themes支持 dark light......

目前只做了通过配置文件修改,有点累了明天试试做/theme命令交互

只支持tui而不是web dashboard

Why

仅仅是作为完善整个体系

How to verify

修改配置文件然后运行tui

Checklist

  • [ ✓] npm run verify passes locally (lint + typecheck + tests + comment-policy gate)
  • [ ✓] No Co-Authored-By: Claude trailer in commits
  • [✓ ] Comments follow CONTRIBUTING.md (no module-essay headers, no incident history)
  • [ ✓] No edits to CHANGELOG.md — release notes are maintainer-written at release time

J3y0r added 3 commits May 8, 2026 13:43
Wire UI rendering through theme tokens that follow the active provider and validate persisted theme configuration at runtime.
@esengine

esengine commented May 8, 2026

Copy link
Copy Markdown
Owner

Thanks for picking this up — linking it to #449 from the PR body so it auto-closes on merge.

What's done from #449's goals: dark + light selectable via ~/.reasonix/config.json. Still pending:

  • high-contrast themeTheme switching support #449 calls for three first-party themes; only two here.
  • /theme <name> slash command — you noted you'll try this tomorrow. Without it, users have to hand-edit JSON and restart, which is exactly the workflow the issue is trying to replace.

I'd rather hold and merge as one cohesive feature than land config-only now and the slash command later — cleaner user-facing story, one changelog entry instead of two.

Also: the PR is currently CONFLICTING. A bunch of i18n work landed on main today (#424, #447, #448). When you're back at it, merge main and resolve any conflicts.

git fetch upstream main
git merge upstream/main
git push

Take your time.

@J3y0r

J3y0r commented May 9, 2026

Copy link
Copy Markdown
Author

Thanks for picking this up — linking it to #449 from the PR body so it auto-closes on merge.

What's done from #449's goals: dark + light selectable via ~/.reasonix/config.json. Still pending:

  • high-contrast themeTheme switching support #449 calls for three first-party themes; only two here.
  • /theme <name> slash command — you noted you'll try this tomorrow. Without it, users have to hand-edit JSON and restart, which is exactly the workflow the issue is trying to replace.

I'd rather hold and merge as one cohesive feature than land config-only now and the slash command later — cleaner user-facing story, one changelog entry instead of two.

Also: the PR is currently CONFLICTING. A bunch of i18n work landed on main today (#424, #447, #448). When you're back at it, merge main and resolve any conflicts.

git fetch upstream main
git merge upstream/main
git push

Take your time.

I think I've done everything I should have

@esengine

esengine commented May 9, 2026

Copy link
Copy Markdown
Owner

Resolved the conflicts and pushed the result upstream as pr452-rebased. npm run verify is green (2275 tests pass).

Where the conflicts came from

Two PRs landed on main after your branch point and touched the same files:

Final shape of each conflict

File Resolution
src/cli/ui/slash/commands.ts theme entry tagged group: "advanced", placed next to language (both are runtime preference toggles)
src/cli/ui/SlashSuggestions.tsx Kept your useColor() runtime + main's SlashGroup type import; MAX uses main's groupMode ? 24 : 8
tests/config.test.ts Both sides' imports preserved, sorted alphabetically
tests/slash.test.ts branch removed from the expected list (it's gone from main); theme kept

Picking it up on your fork

From your fork's local clone:

git remote add upstream https://github.com/esengine/DeepSeek-Reasonix.git  # if not already added
git fetch upstream pr452-rebased
git reset --hard upstream/pr452-rebased
git push --force-with-lease origin main

The PR will refresh automatically.

On the interactive /theme picker

No rush on the follow-up you mentioned — the PR as it stands (config-file persist + load on startup) is already a complete loop, fine to merge. The interactive picker can land in a follow-up PR.

esengine pushed a commit that referenced this pull request May 9, 2026
Closes #449

- Theme runtime via useColor() hook + ThemeProvider context
- Built-in themes: default, dark, light, tokyo-night, github-dark, github-light, plus auto/high-contrast
- Persisted via config: theme.name, with auto resolving against terminal background
- /theme slash command (advanced group) with arg completer

Merged through #453 slash refactor (theme placed in advanced group) and #424 semantic config additions.
@J3y0r

J3y0r commented May 9, 2026

Copy link
Copy Markdown
Author

Resolved the conflicts and pushed the result upstream as pr452-rebased. npm run verify is green (2275 tests pass).

Where the conflicts came from

Two PRs landed on main after your branch point and touched the same files:

Final shape of each conflict

File Resolution
src/cli/ui/slash/commands.ts theme entry tagged group: "advanced", placed next to language (both are runtime preference toggles)
src/cli/ui/SlashSuggestions.tsx Kept your useColor() runtime + main's SlashGroup type import; MAX uses main's groupMode ? 24 : 8
tests/config.test.ts Both sides' imports preserved, sorted alphabetically
tests/slash.test.ts branch removed from the expected list (it's gone from main); theme kept

Picking it up on your fork

From your fork's local clone:

git remote add upstream https://github.com/esengine/DeepSeek-Reasonix.git  # if not already added
git fetch upstream pr452-rebased
git reset --hard upstream/pr452-rebased
git push --force-with-lease origin main

The PR will refresh automatically.

On the interactive /theme picker

No rush on the follow-up you mentioned — the PR as it stands (config-file persist + load on startup) is already a complete loop, fine to merge. The interactive picker can land in a follow-up PR.

thanks. I'm done already

@J3y0r J3y0r closed this May 9, 2026
@esengine

esengine commented May 9, 2026

Copy link
Copy Markdown
Owner

Closed because the contents already landed on main as 636ad7e (squash-merge). GitHub didn't tag this as merged since the squash changed the commit SHAs, but the diff against main is empty — everything is in.

Thanks for the contribution — theming has been on the wishlist for a while and you got it across the finish line. The interactive /theme picker you mentioned can come in a follow-up PR whenever you're ready.

@esengine esengine mentioned this pull request May 9, 2026
ChasLui pushed a commit to ChasLui/DeepSeek-Reasonix that referenced this pull request May 23, 2026
Closes esengine#449

- Theme runtime via useColor() hook + ThemeProvider context
- Built-in themes: default, dark, light, tokyo-night, github-dark, github-light, plus auto/high-contrast
- Persisted via config: theme.name, with auto resolving against terminal background
- /theme slash command (advanced group) with arg completer

Merged through esengine#453 slash refactor (theme placed in advanced group) and esengine#424 semantic config additions.
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.

Theme switching support

2 participants