You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a light/dark mode toggle button (sun/moon icon) to the settings bar on the home page and the session page header
Theme preference is persisted to localStorage and defaults to dark mode, preserving the existing look
All components updated with Tailwind dark: variants for proper light mode styling
Changes
Area
What changed
tailwind.config.ts
Enabled darkMode: "class" strategy
src/context/theme-context.tsx
New ThemeProvider + useTheme hook with localStorage persistence
src/components/theme-toggle.tsx
New ThemeToggle button component (sun/moon icons from lucide)
src/app/layout.tsx
Wrapped app in ThemeProvider, set class="dark" on <html> by default
src/app/globals.css
Added light mode base + dark: body styles
All components
Added dark: Tailwind variants alongside light mode base colors
Screenshots
Dark mode (default):
The existing dark UI is fully preserved -- no visual changes when the toggle is set to dark.
Light mode:
Clean light theme with white/zinc-100 backgrounds, proper contrast, and matching borders/text colors.
Summary by cubic
Adds a light/dark theme toggle (sun/moon) in the settings bar and session header. Introduces a ThemeProvider with localStorage persistence, enables Tailwind darkMode: class, sets the html element to dark by default, and updates component styles for proper light mode.
Written for commit 57ed918. Summary will update on new commits.
- Add ThemeContext with localStorage persistence (defaults to dark)
- Enable Tailwind class-based dark mode strategy
- Add dark: variants to all components for proper light mode styling
- Add ThemeToggle button (sun/moon icon) in SettingsBar and session page
- Wire ThemeProvider into root layout
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 15 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/app/layout.tsx">
<violation number="1" location="src/app/layout.tsx:24">
P2: Hard-coding `className="dark"` on `<html>` forces an incorrect initial theme for users who previously selected light mode, causing a dark-to-light flash after hydration.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
The reason will be displayed to describe this comment to others. Learn more.
P2: Hard-coding className="dark" on <html> forces an incorrect initial theme for users who previously selected light mode, causing a dark-to-light flash after hydration.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/app/layout.tsx, line 24:
<comment>Hard-coding `className="dark"` on `<html>` forces an incorrect initial theme for users who previously selected light mode, causing a dark-to-light flash after hydration.</comment>
<file context>
@@ -20,10 +21,12 @@ export default function RootLayout({
return (
- <html lang="en">
+ <html lang="en" className="dark">
<body className="min-h-screen">
<QueryClientProvider client={queryClient}>
</file context>
The reason will be displayed to describe this comment to others. Learn more.
P2: Hard-coding className="dark" on <html> forces an incorrect initial theme for users who previously selected light mode, causing a dark-to-light flash after hydration.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/app/layout.tsx, line 24:
<comment>Hard-coding `className="dark"` on `<html>` forces an incorrect initial theme for users who previously selected light mode, causing a dark-to-light flash after hydration.</comment>
<file context>
@@ -20,10 +21,12 @@ export default function RootLayout({
return (
- <html lang="en">
+ <html lang="en" className="dark">
<body className="min-h-screen">
<QueryClientProvider client={queryClient}>
</file context>
The reason will be displayed to describe this comment to others. Learn more.
@fiona15hermoxa-dotcom I can help — what did you want me to do?
Manage learnings: reply in the relevant thread and say @cubic add this to our learnings (I'll extract the learning from context). For delete/update, paste the learning link from Settings → AI review → Learnings.
Make a code change: @cubic fix this and push commits (or open a PR)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary
localStorageand defaults to dark mode, preserving the existing lookdark:variants for proper light mode stylingChanges
tailwind.config.tsdarkMode: "class"strategysrc/context/theme-context.tsxThemeProvider+useThemehook with localStorage persistencesrc/components/theme-toggle.tsxThemeTogglebutton component (sun/moon icons from lucide)src/app/layout.tsxThemeProvider, setclass="dark"on<html>by defaultsrc/app/globals.cssdark:body stylesdark:Tailwind variants alongside light mode base colorsScreenshots
Dark mode (default):
The existing dark UI is fully preserved -- no visual changes when the toggle is set to dark.
Light mode:
Clean light theme with white/zinc-100 backgrounds, proper contrast, and matching borders/text colors.
Summary by cubic
Adds a light/dark theme toggle (sun/moon) in the settings bar and session header. Introduces a ThemeProvider with localStorage persistence, enables Tailwind darkMode: class, sets the html element to dark by default, and updates component styles for proper light mode.
Written for commit 57ed918. Summary will update on new commits.