Skip to content

Fix/light mode#3

Merged
jona7o merged 6 commits intomainfrom
fix/light-mode
Feb 17, 2026
Merged

Fix/light mode#3
jona7o merged 6 commits intomainfrom
fix/light-mode

Conversation

@mikeboe
Copy link
Contributor

@mikeboe mikeboe commented Jan 28, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates theme handling and branding assets to improve light/dark mode behavior and surface theme switching on the login screen.

Changes:

  • Add a dark/light mode toggle to the login page.
  • Align global CSS variables with MUI’s data-mui-color-scheme attribute and add a theme “synchronizer” in the MUI provider.
  • Add favicon/app icon assets and wire them into Next.js metadata.icons.

Reviewed changes

Copilot reviewed 4 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/app/login/page.tsx Adds a bottom-right theme toggle to the login page.
src/app/layout.tsx Adds metadata.icons entries for favicon + Apple touch icon.
src/app/globals.css Maps CSS variables to MUI’s data-mui-color-scheme attribute.
src/app/context/theme-provider.tsx Adds a theme synchronization effect using useColorScheme().
public/maskable-icon.png Adds a new maskable icon asset.
public/logo.svg Adds a new logo asset.
public/icon-192x192.png Adds a 192×192 app icon asset.
public/favicon-32x32.png Adds a 32×32 favicon asset.
public/favicon-16x16.png Adds a 16×16 favicon asset.
public/apple-touch-icon-180x180.png Adds an Apple touch icon asset.
package.json Adds SWC-related dev dependencies.
package-lock.json Lockfile updates to reflect dependency changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +14 to +17
const systemPrefersDark = window.matchMedia(
"(prefers-color-scheme: dark)",
).matches;
setMode(systemPrefersDark ? "dark" : "light");
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ThemeSynchronizer sets an explicit mode ("dark"/"light") when there is no stored mode, even though the provider is configured with defaultMode="system". This overrides system-following behavior for new users and won’t react to later OS theme changes. Prefer leaving mode as "system" when nothing is stored (or explicitly calling setMode("system")), and avoid overriding it based on a one-time matchMedia read.

Suggested change
const systemPrefersDark = window.matchMedia(
"(prefers-color-scheme: dark)",
).matches;
setMode(systemPrefersDark ? "dark" : "light");
setMode("system");

Copilot uses AI. Check for mistakes.
@jona7o jona7o merged commit ec0e357 into main Feb 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants