Skip to content

fix: system theme - #2524

Merged
RohitKushvaha01 merged 3 commits into
Acode-Foundation:mainfrom
RohitKushvaha01:fix/system-theme-editor-update
Jul 26, 2026
Merged

fix: system theme#2524
RohitKushvaha01 merged 3 commits into
Acode-Foundation:mainfrom
RohitKushvaha01:fix/system-theme-editor-update

Conversation

@RohitKushvaha01

Copy link
Copy Markdown
Member

Closes #2521

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR switches system-theme synchronization to browser color-scheme events. The main changes are:

  • Replaces periodic theme polling with a MediaQueryList change listener.
  • Applies the preferred editor theme when the OS color scheme changes.

Confidence Score: 5/5

The changed flow looks mergeable after two small compatibility and notification fixes.

  • Older MediaQueryList implementations can fail when the watcher starts.
  • Automatic OS theme changes can display a misleading settings-saved toast.
  • Listener registration and removal otherwise use the same stable callback.

src/palettes/changeTheme/index.js and src/theme/preInstalled.js

Important Files Changed

Filename Overview
src/palettes/changeTheme/index.js Replaces polling with a MediaQueryList listener, but lacks the legacy listener fallback.
src/theme/preInstalled.js Synchronizes the editor theme with the OS theme, but enables save notifications for automatic updates.

Reviews (1): Last reviewed commit: "fix: system theme" | Re-trigger Greptile

Comment thread src/palettes/changeTheme/index.js Outdated
Comment thread src/theme/preInstalled.js Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@RohitKushvaha01 RohitKushvaha01 added the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Jul 23, 2026
@github-actions github-actions Bot removed the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Jul 23, 2026
@github-actions

This comment has been minimized.

@Acode-Foundation Acode-Foundation deleted a comment from github-actions Bot Jul 26, 2026
@RohitKushvaha01
RohitKushvaha01 added this pull request to the merge queue Jul 26, 2026
Merged via the queue into Acode-Foundation:main with commit a72b4f7 Jul 26, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Jul 26, 2026
@RohitKushvaha01
RohitKushvaha01 deleted the fix/system-theme-editor-update branch July 26, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

System theme doesnt work

1 participant