Skip to content

Add light theme with light/dark/system toggle#6

Draft
BenItBuhner wants to merge 1 commit into
mainfrom
cursor/add-light-theming-8dff
Draft

Add light theme with light/dark/system toggle#6
BenItBuhner wants to merge 1 commit into
mainfrom
cursor/add-light-theming-8dff

Conversation

@BenItBuhner

Copy link
Copy Markdown
Owner

Summary

Resolves OSP-104 by adding a full light theme and an easy three-way toggle to switch between Light, Dark, and System theming across the Model Proxy control surface.

Changes

  • CSS variable theming — Moved ink, bone, phosphor, and alert palette tokens to CSS variables in globals.css, with light values on :root and dark values on .dark
  • Tailwind integration — Enabled darkMode: "class" and mapped Tailwind color/shadow tokens to the new CSS variables so existing component classes work in both themes without a large refactor
  • Theme provider — Added ThemeProvider with localStorage persistence (mp_theme), system preference detection, and live updates when OS theme changes
  • Flash prevention — Inline init script in the root layout applies the stored theme before first paint
  • Theme toggle UI — Segmented control in the app shell sidebar and on the login page
  • Minor fixes — Replaced hardcoded #CDFF00 row highlights with var(--phosphor-500)

Testing

  • npm run typecheck — pass
  • npm run build — pass (static export)

Screenshots

Toggle appears in the sidebar (authenticated pages) and top-right on the login page. Selecting Light/Dark/System updates the full page background, panels, text, and accents immediately.

Linear Issue: OSP-104

Open in Web Open in Cursor 

Introduce CSS variable-based theming so the control surface supports both
light and dark palettes without duplicating Tailwind classes. Add a theme
provider that persists the user preference to localStorage, applies the
resolved theme before first paint to avoid flash, and listens for system
preference changes when set to system mode. Place a three-way theme toggle
in the app shell sidebar and on the login page.

Co-authored-by: Bennett Buhner <BenItBuhner@users.noreply.github.com>
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.

2 participants