GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — feat(tui): add Mode 2031 theme detection with tri-state appearance mode by kavhnr · Pull Request #13233 · anomalyco/opencode Conversation
|
| Approach | PR | Problem |
|---|---|---|
| Poll terminal bg every 5s | #7182, #7162 | Wastes CPU, delayed detection, races with palette queries |
execSync("defaults read") / gsettings every 3s |
#9719 | Platform-specific, breaks in SSH/containers/tmux, spawns child processes |
| Mode 2031 (this PR) | — | Terminal-native, event-driven, zero overhead |
Edge cases handled:
detectedMode stays at initial OSC 11 value. No degradation.activeThemeMode() falls back to "dark". Existing custom themes work identically.onCleanup(() => renderer.off("theme_mode", ...)) prevents leaks.bun run typecheck passes (12/12 packages, zero errors)"theme": "opencode" works, "theme": { "light": "github", "dark": "catppuccin" } worksaura and ayu (single-palette) unaffected by mode changes
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found 3 related PRs that address similar appearance/theme functionality:
Note: The current PR (#13233) explicitly compares itself against these older approaches, explaining why Mode 2031 is superior (event-driven vs. polling/platform-specific). These appear to be alternative/prior attempts at the same feature rather than exact duplicates. If any of these are still open, they may need to be closed in favor of this Mode 2031 implementation. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@kavhnr any reason you closed this? I think this approach is more elegant than the polling approach explored by some other PRs? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mitchelljphayes our org (I think anyone using foundry/gotham) flagged opencode as not approved from some weird behavior on our VMs, so I ended up removing opencode and this PR to finish the clean up. Plus, this didn’t seem like a priority and would likely be stale by the time it’s reviewed and I didn’t want to add noise to an already busy team. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[FEATURE]: Add support for OpenTUI's new themeMode detection (Mode 2031)
There was an error while loading. Please reload this page.