Uh oh!
There was an error while loading. Please reload this page.
feat: add theme hot-reload functionality - #4879
Conversation
arthur404dev
commented
Dec 16, 2025
Is this feature still being worked on? Hot reloading the theme would be a really nice functionality for theme switching! |
653a64b to
6216894Comparemalhashemi
commented
Dec 19, 2025
@rekram1-node would you please review this PR and let me know if you have any changes. |
| { | ||
| display: "/reload-theme", | ||
| description: "reload theme from config", | ||
| onSelect: () => command.trigger("theme.reload"), |
There was a problem hiding this comment.
Instead of slash command can we do command panel?
Like reload themes or something?
Also you are using a watcher is it possible to 'hot reload' them since you are filewatching?
rekram1-node
commented
Dec 21, 2025
/review |
If im not looking at something that u need, feel free to dm on discord or x I get like 200 github notifications a day so Im doing my best to go through them but stuff will always sneak through |
lgtm |
ddd6482 to
2c96b0cCompare- Add /reload-theme command for manual theme reloading - Add file watchers for config and theme file changes - Add SIGWINCH handler to re-query terminal colors on resize - Add SIGUSR1/SIGUSR2 signal handlers for external automation - Make system theme background transparent for terminal opacity - Move getTerminalBackgroundColor to theme context Fixesanomalyco#815
2c96b0c to
8723897Comparearthur404dev
commented
Jan 21, 2026
Maybe can this be merged in? There's even two more PRs trying to achieve this same achievable, but this one already have the lgtm |
f1ae801 to
08fa7f7CompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
fsiraj
commented
Apr 22, 2026
Can this still be merged in? The repo has 1.7k PRs so guessing this slipped through the cracks. |
Summary
Adds the ability to reload themes without restarting opencode. Provides multiple reload triggers to support different workflows:
/reload-themecommandAlso makes "system" theme background transparent to support terminal opacity.
Changes
Architecture
Key Decisions
Why move
getTerminalBackgroundColorto theme.tsx?Needed by both initial detection (app.tsx) and reload (theme.tsx). Moving it eliminates duplication.
Why
fs.watch()instead of@parcel/watcher?Simpler API, no extra dependencies, sufficient for watching 2 files.
Why transparent background for "system" theme?
Allows terminal opacity/blur to show through while keeping panel/menu backgrounds solid.
Why SIGWINCH handler?
Event-driven color re-detection without polling. Only active for "system" theme.
Testing
Checklist
Fixes#815