Add light/dark theme toggle with full app retheme - #42
Merged
Siddharth-732 merged 2 commits intoJul 5, 2026
Conversation
|
@Flashl3opard is attempting to deploy a commit to the Siddharth Pandey's projects Team on Vercel. A member of the Team first needs to authorize it. |
Flashl3opard
force-pushed
the
feature/theme-toggle
branch
from
July 5, 2026 09:52
89c994c to
cf4fa3e
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces an application-wide light/dark theme system for the Next.js frontend, including persistence, pre-hydration theme bootstrapping to prevent flashes, and a CSS-token-based Tailwind color approach to retheme major UI surfaces.
Changes:
- Adds a persisted theme store (Zustand) and a sidebar theme toggle component.
- Adds a pre-hydration script in the root layout and introduces CSS-variable-backed Tailwind tokens (including a custom
darkvariant). - Rethemes multiple pages/components to use
bg-surface,text-primary,border-subtle,brand, and related tokens instead of hardcoded colors.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/store/useThemeStore.ts | New persisted theme store that applies/remembers the .dark class. |
| frontend/components/ThemeToggle.tsx | New animated sidebar theme toggle wired to the store. |
| frontend/components/PostCard.tsx | Rethemes post card surfaces/typography/borders to token utilities. |
| frontend/components/ConfirmModal.tsx | Rethemes modal surfaces, text, and hover states to tokens. |
| frontend/components/AvatarSelectionModal.tsx | Rethemes modal UI and interactive states to tokens. |
| frontend/app/register/page.tsx | Rethemes register flow UI to tokens. |
| frontend/app/page.tsx | Rethemes main app shell (nav/chat/lodge/settings) and wires Settings → Appearance to the theme store. |
| frontend/app/login/page.tsx | Rethemes login UI to tokens. |
| frontend/app/layout.tsx | Adds inline theme bootstrap script and suppresses hydration warnings at <html>. |
| frontend/app/globals.css | Defines CSS variable tokens for light/dark and maps them into Tailwind via @theme inline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
LGTM !😉 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Notable fixes along the way
Screenshots