Skip to content

add darkmode and migrate to semantic tokens#5495

Open
ejc wants to merge 10 commits into
fastrepl:mainfrom
ejc:feat/dark-mode-semantic-tokens
Open

add darkmode and migrate to semantic tokens#5495
ejc wants to merge 10 commits into
fastrepl:mainfrom
ejc:feat/dark-mode-semantic-tokens

Conversation

@ejc
Copy link
Copy Markdown

@ejc ejc commented Jun 6, 2026

Description

  • Add light, dark, and system appearance preference in desktop settings with persisted theme state and flash-free startup
  • Define warm stone semantic tokens in @hypr/ui, including alert and sidebar accent colors, with desktop dark-mode overrides
  • Migrate desktop shell, settings, chat, session, calendar, onboarding, and shared packages from hardcoded neutral/stone colors to semantic tokens
  • Theme TipTap and CodeMirror editors, provider icons, settings alerts, and sidebar nav hover/selected states for dark mode

Test plan

  • Toggle Appearance between Light, Dark, and System in Settings → App
  • Verify settings sidebar hover and selected item highlights in both themes
  • Spot-check session editor, chat panel, calendar, account page, and changelog in dark mode
  • Confirm provider icons remain readable in dark mode while Anarlog logo stays full color
  • Run pnpm -F desktop typecheck and pnpm -F desktop test

Made with Cursor


Note

Medium Risk
Very broad visual refactor across most desktop surfaces; regressions are likely in contrast or hover states, though behavior is unchanged. Theme boot and settings sync must stay aligned to avoid a flash of wrong appearance.

Overview
Adds light / dark / system appearance with flash-free startup: theme-boot.js toggles dark on <html> before React, then AppThemeProvider and bootstrapThemeFromSettings sync preference from settings into localStorage (hypr-theme).

Across the desktop app, hardcoded neutral-* / stone-* Tailwind classes are replaced with semantic tokens (background, card, foreground, muted-foreground, accent, primary, destructive, border, etc.) so shell areas follow the active theme—calendar, contacts, onboarding, billing dialogs, top meeting timeline, composer, changelog, and more.

Chat and composer keep a dedicated dark “stone” chrome via new chat/surface.ts and useChatAppearance: panels use bg-primary / elevated inputs and bubbles use primary-foreground, independent of whether the rest of the app is light. Contact avatars gain ContactFacehash with dark-aware palette classes.

Tests are updated/added for chat surfaces, input styling, timeline selection, and panel shells.

Reviewed by Cursor Bugbot for commit 800d1cb. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 6, 2026

👷 Deploy request for old-char pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 800d1cb

Comment thread apps/desktop/src/chat/components/context-bar.tsx Outdated
Comment thread apps/desktop/src/chat/components/message/shared.tsx
Comment thread apps/desktop/src/chat/components/message/shared.tsx Outdated
Comment thread apps/desktop/index.html Outdated
Comment thread apps/desktop/src/chat/components/input/index.tsx Outdated
Comment thread apps/desktop/src/chat/components/body/index.tsx Outdated
Comment thread apps/desktop/src/composer/index.tsx Outdated
Comment thread apps/desktop/index.html Outdated
Comment thread apps/desktop/src/shared/theme/provider.tsx
Comment thread apps/desktop/src/main/top-meeting-timeline.tsx
Comment thread apps/desktop/public/theme-boot.js
Comment thread apps/desktop/src/main.tsx Outdated
Comment thread apps/desktop/src/shared/theme/provider.tsx
ejc and others added 9 commits June 5, 2026 19:09
Wire up light/dark/system appearance preference, warm stone semantic palettes, and replace hardcoded neutral/stone colors across the desktop shell and shared UI packages.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace invalid bg-muted0 and hover:bg-accent0 classes with semantic
muted/accent opacity utilities so pending chips and controls render correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use primary-foreground bubbles on the dark chat panel instead of card,
keep dark text on light-blue user messages, and toggle the dark class
from stored hypr-theme before React hydrates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use primary-foreground surfaces on the dark chat panel so the message
input and context bar stay distinct from bg-primary in dark mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drive chat panel, toolbar, bubbles, and elevated chrome from the saved
light/dark/system theme instead of always using the dark stone shell, and
set explicit text colors on the input surface so ProseMirror content stays
readable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Chat floating window and sidebar always use the original stone shell
regardless of app theme, with white elevated inputs and readable text.
Also gate theme hydration behind settings load, align boot script tokens,
and use dark drop shadows on floating chat surfaces.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use accent fill and ring border for selected cards so selection stays visible when primary and card share the same dark palette value.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apply dprint formatting and minor class-order cleanup left unstaged after the dark mode work.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bootstrap appearance from persisted settings before React renders and mirror theme changes into hypr-theme whenever settings load or save.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ejc ejc force-pushed the feat/dark-mode-semantic-tokens branch from ecfb435 to 22ca911 Compare June 6, 2026 02:09
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 22ca911. Configure here.

Comment thread apps/desktop/src/chat/components/message/normal.tsx Outdated
Regenerate control hover now brightens like copy, and React mounts
immediately while theme bootstrap runs in parallel instead of blocking
on settingsCommands.load().

Co-authored-by: Cursor <cursoragent@cursor.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