GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: auto-detect system theme changes at runtime by RhysSullivan · Pull Request #7162 · anomalyco/opencode

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Jan 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Another option other than polling is on focus if we want to do that instead, opus got this one to work but fair note it's AI generated and I'm not familiar enough with the render to know for accuracy atm - I can investigate this more deeply if needed

Screen.Recording.2026-01-06.at.8.23.46.PM.mov

==== AI Generated Below ===

Summary

  • Polls terminal background color every 5 seconds to detect system theme changes
  • Updates theme mode (dark/light) automatically when terminal colors change
  • Works for both system theme and named themes with dark/light variants (like opencode)

Changes

  • Added detectMode() helper to calculate dark/light from terminal background color
  • Added polling interval that re-queries terminal palette and updates mode when changed
  • Updated resolveSystemTheme() to detect and apply the correct mode

Testing

  1. Set theme to opencode (or any theme with dark/light variants)
  2. Change system/terminal theme from light to dark (or vice versa)
  3. Wait ~5 seconds - opencode should automatically switch to match

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@RhysSullivan
fix: auto-detect system theme changes at runtime
7d42d1c
@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, here are related PRs that may be relevant:

Potentially Related PRs:

  1. feat(theme): custom themes can use calculated system colors #6321 - feat(theme): custom themes can use calculated system colors

    • Related because it deals with system color handling and theme calculation
  2. feat: add theme hot-reload functionality #4879 - feat: add theme hot-reload functionality

    • Related because it involves dynamic theme updates, which is similar to the auto-detection and runtime switching in this PR

The current PR (#7162) is the only one specifically addressing runtime auto-detection of theme changes via terminal background color polling. The other PRs are tangentially related but address different aspects of theme management.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RhysSullivan
RhysSullivan marked this pull request as ready for review January 7, 2026 04:30
@github-actions github-actions Bot mentioned this pull request Jan 7, 2026
feat(tui): add appearance setting with dark/light/system modes #7182
Closed
@thdxr
thdxr force-pushed the dev branch from cbab81f to 2d3c7a0 Compare January 30, 2026 04:50
@opencode-agent
opencode-agent Bot force-pushed the dev branch from 00637c0 to 71e0ba2 Compare January 30, 2026 14:32
@thdxr
thdxr force-pushed the dev branch 3 times, most recently from f1ae801 to 08fa7f7 Compare January 30, 2026 14:37
@kavhnr kavhnr mentioned this pull request Feb 12, 2026
feat(tui): add Mode 2031 theme detection with tri-state appearance mode #13233
Closed
@kavhnr kavhnr mentioned this pull request Feb 25, 2026
feat(tui): add Mode 2031 theme detection with tri-state appearance mode #15089
Closed
4 of 6 tasks
@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Closing 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@RhysSullivan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.