Skip to content

feat: light mode theme and transparency redesign - #276

Open
dimavedenyapin wants to merge 7 commits into
mainfrom
feat/light-mode-theme-redesign
Open

feat: light mode theme and transparency redesign#276
dimavedenyapin wants to merge 7 commits into
mainfrom
feat/light-mode-theme-redesign

Conversation

@dimavedenyapin

@dimavedenyapin dimavedenyapin commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Light/dark theme support with CSS custom properties (data-theme attribute), Tailwind CSS 4 @theme tokens, and a Light/Dark/System toggle in Settings
  • Native macOS glass transparency using electron-liquid-glass — uses NSGlassEffectView on macOS 26+ (Liquid Glass) and falls back to NSVisualEffectView on older macOS
  • Theme-aware canvas — all hardcoded hex colors in canvas components replaced with CSS variables that adapt to light/dark mode
  • Theme-aware terminal — xterm.js gets light and dark color palettes that switch live when the app theme changes
  • Windows support — titlebar overlay colors update on theme switch via IPC handler
  • Mobile sync — mobile globals.css updated with the same theme variable structure

Key design values

  • Light: #FFFFFF bg, #1A1C1F fg, #339CFF accent, translucent sidebar rgba(255,255,255,0.70)
  • Dark: #181818 bg, #FFFFFF fg, #339CFF accent, translucent sidebar rgba(24,24,24,0.70)

Native glass approach (macOS)

  • Uses electron-liquid-glass which wraps native NSGlassEffectView
  • transparent: true + backgroundColor: '#00000000' on BrowserWindow
  • No vibrancy option — it conflicts with the glass view and makes things blurry
  • Glass view applied after did-finish-load via liquidGlass.addView()
  • Glass sits behind ALL web content — CSS semi-transparent areas (sidebar rgba(255,255,255,0.70), top bar bg-background/80) let it through; opaque areas (bg-background) block it
  • Auto dark mode adaptation via system appearance listener
  • Falls back gracefully to NSVisualEffectView on older macOS, no-op on Windows/Linux

Test plan

  • All 88 test files pass (1275 tests)
  • TypeScript compiles cleanly (both tsconfig.node.json and tsconfig.web.json)
  • Production build succeeds for renderer and mobile
  • Manual: verify glass transparency shows desktop wallpaper through sidebar on macOS
  • Manual: verify Light/Dark/System toggle in Settings works
  • Manual: verify terminal colors change when switching themes
  • Manual: verify canvas panels, minimap, context menu use correct colors in both themes
  • Manual: verify Windows titlebar overlay colors match the theme

🤖 Generated with Claude Code

dimavedenyapin and others added 6 commits May 9, 2026 10:39
Introduce a complete theme system with light and dark mode support,
matching the Codex desktop app design reference. Replace all hardcoded
dark-only colors with CSS custom properties that adapt to the active theme.

Key changes:
- Add light/dark theme CSS variables in globals.css with @theme registration
  for Tailwind CSS 4 utility class generation
- Add theme toggle (Light/Dark/System) to Settings > Application Preferences
- Add theme state to ui-store with localStorage persistence and system
  preference detection
- Replace 20+ hardcoded hex colors (#141a26, #1a2030, #131820, #0d1117,
  #161b22, etc.) in canvas components with theme-aware CSS variables
- Add translucent sidebar with backdrop-blur-xl effect
- Add IPC handler to sync window titlebar/background color on theme change
- Update mobile CSS with matching theme variable structure
- Update remotion/theme.ts with new palette values
- Apply data-theme attribute early in main.tsx to prevent flash

Light mode palette: Background #FFFFFF, Foreground #1A1C1F, Accent #339CFF
Dark mode palette: Background #181818, Foreground #FFFFFF, Accent #339CFF

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable Electron's native vibrancy effect on macOS so the sidebar shows
the desktop wallpaper through it, matching the Codex design reference.

- BrowserWindow: transparent + vibrancy 'under-window' + visualEffectState 'active'
- html/body/#root backgrounds transparent on macOS so native blur shows through
- Top bar gets backdrop-blur-xl with semi-transparent background
- Sidebar's rgba background (0.70 opacity) + backdrop-blur lets vibrancy through
- Main content area retains opaque bg-background
- Windows/Linux keep opaque backgrounds (no native vibrancy available)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove transparent:true from BrowserWindow (conflicts with vibrancy on Electron 34)
- Re-apply setVibrancy('under-window') in ready-to-show and on theme switch
- Disable CSS backdrop-filter on macOS vibrancy elements to prevent compositing layer conflicts
- Add light/dark terminal color palettes with live theme switching
- Terminal background and colors now update when app theme changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Electron's built-in vibrancy API with electron-liquid-glass which
uses native NSGlassEffectView on macOS 26+ (Liquid Glass) and falls back
to NSVisualEffectView on older systems.

Key changes:
- Install electron-liquid-glass for native glass effect
- Remove `vibrancy` from BrowserWindow (conflicts with glass view)
- Keep `transparent: true` + `backgroundColor: '#00000000'`
- Apply glass view after did-finish-load via liquidGlass.addView()
- Glass sits behind all web content — semi-transparent CSS areas
  (sidebar, top bar) let it through; opaque areas block it
- Add light/dark terminal color palettes with live theme switching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…canvas minimap

Use dark: variant prefixes for text colors that were too faint on light backgrounds
(badges, dashboard status columns, source badges). Update dialog overlays to use
--color-overlay CSS variable for proper theme-aware dimming. Make canvas minimap
viewport rect and panel strokes adapt to current theme. Reduce shadow intensity
in light mode for a softer look.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dimavedenyapin
dimavedenyapin force-pushed the feat/light-mode-theme-redesign branch from 0beb73d to d65f328 Compare May 9, 2026 03:39
The rebase conflict resolution incorrectly kept select-none on panels,
conflicting with PR #285 which intentionally removed it for text selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.

1 participant