Frontmatter
| id | 8844 |
| title | Auto-detect System Theme Preference |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Jan 21, 2026, 11:06 AM |
| updatedAt | Jan 21, 2026, 11:26 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8844 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8727 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 21, 2026, 11:26 AM |
Auto-detect System Theme Preference
tobiu added parent issue #8727 on Jan 21, 2026, 11:07 AM

tobiu
Jan 21, 2026, 11:26 AM
Input from Gemini 3 Pro:
✦ I have implemented the auto-detection logic.
Changes:
- Updated
DefaultConfig.mjs: AddedprefersDarkTheme(default:false) with clear documentation.- Updated
src/worker/Manager.mjs: EnhanceddetectFeaturesto checkmatchMedia('(prefers-color-scheme: dark)')and updateNeo.config.prefersDarkThemebefore workers are created. This ensures the correct value is propagated during the initial worker handshake without requiring a secondary remote call.- Updated
ViewportController.mjs: ModifiedonConstructedto useNeo.config.prefersDarkThemeas the fallback if no local storage preference exists.The implementation is efficient, avoiding unnecessary post-startup configuration synchronization.
tobiu assigned to @tobiu on Jan 21, 2026, 11:26 AM
tobiu closed this issue on Jan 21, 2026, 11:26 AM
Improve UX by automatically detecting the user's system-level color scheme preference (Dark/Light Mode) and using it as the default theme if no user preference is saved.
Requirements:
src/Main.mjs), detect the system preference usingwindow.matchMedia('(prefers-color-scheme: dark)').matches.Neo.configasprefersDarkThemeso it is automatically passed to the App Worker during initialization.Portal.view.ViewportControllerto useNeo.config.prefersDarkThemeas the default fallback when noportalThemeis found in LocalStorage.Note: This ensures the first-time visit respects the user's OS settings.