Skip to content

Where agent teams gather. Cross-platform team chat where AI agents are first-class teammates — with cloud or bring-your-own (Claude Code / Codex) brains.

TypeScript

feat(ui): add per-device appearance with a One Dark Pro dark theme (#68)

Kelvinf666ced1ea07
diff --git a/electron/main.cjs b/electron/main.cjs
index 712f189..8d76769 100644
--- a/electron/main.cjs
+++ b/electron/main.cjs
@@ -1389,6 +1389,22 @@ ipcMain.handle('app:is-focused', () => {
return !!(mainWindow && !mainWindow.isDestroyed() && mainWindow.isFocused())
})
+ipcMain.on('theme:set', (_event, source) => {
+ if (source !== 'system' && source !== 'light' && source !== 'dark') return
+ nativeTheme.themeSource = source
+ if (mainWindow && !mainWindow.isDestroyed()) {
+ const dark = source === 'dark' || (source === 'system' && nativeTheme.shouldUseDarkColors)
+ mainWindow.setBackgroundColor(dark ? '#21252b' : '#E6F3FB')
+ }
+})
+
+nativeTheme.on('updated', () => {
+ if (nativeTheme.themeSource !== 'system') return
+ if (mainWindow && !mainWindow.isDestroyed()) {
+ mainWindow.setBackgroundColor(nativeTheme.shouldUseDarkColors ? '#21252b' : '#E6F3FB')
+ }
+})
+
// Renderer asks main to open a URL in the user's default browser
// (used for OAuth — embedded webviews are banned by Google and the
// experience is better in a familiar browser anyway). Restricted to
@@ -1471,9 +1487,11 @@ app.on('second-instance', (_event, argv) => {
}
app.whenReady().then(() => {
- if (process.platform === 'darwin') {
- nativeTheme.themeSource = 'light'
- }
+ // Follow the OS so `prefers-color-scheme` in the renderer is honest.
+ // The renderer sends `theme:set` when the user pins light or dark.
+ // Previously this was forced to light on Darwin because the UI had
+ // no dark palette.
+ nativeTheme.themeSource = 'system'
// Wire the app:// protocol handler. protocol.handle is the modern
// API (Electron 25+) — gives us a streaming Response back so the
diff --git a/electron/preload.cjs b/electron/preload.cjs
index dca1a94..67e5d7c 100644
--- a/electron/preload.cjs
+++ b/electron/preload.cjs
@@ -92,6 +92,16 @@ contextBridge.exposeInMainWorld('cumora', {
},
},
+ /**
+ * Appearance preference. Mirrors the renderer's `system | light | dark`
+ * so Chromium's `prefers-color-scheme` (and the traffic lights) stay
+ * honest. Previously main forced `light` because the UI had no dark
+ * palette.
+ */
+ theme: {
+ set: (source) => ipcRenderer.send('theme:set', source),
+ },
+
/**
* Auto-update bridge. Mirrors alma's pattern:
* - getAppInfo() — current version + autoupdate capability flag
diff --git a/index.html b/index.html
index 15d68d6..463ec11 100644
--- a/index.html
+++ b/index.html
@@ -19,11 +19,25 @@
`#notifications` hash. Its window is backed by NSVisualEffectView
(vibrancy) and must show the vibrant material straight through —
no white flash. Inline this BEFORE any stylesheet (including
- globals.css) loads so the body never paints opaque at any point. -->
+ globals.css) loads so the body never paints opaque at any point.
+
+ Appearance is the same constraint: without a blocking read of
+ `cumora.appearance` / prefers-color-scheme, the first paint is
+ always light and then snaps. -->
<script>
- if (location.hash === '#notifications') {
- document.documentElement.classList.add('cumora-notif-window')
- }
+ (() => {
+ if (location.hash === '#notifications') {
+ document.documentElement.classList.add('cumora-notif-window')
+ return
+ }
+ try {
+ const pref = localStorage.getItem('cumora.appearance')
+ const dark = pref === 'dark' || ((pref === 'system' || pref === null) && matchMedia('(prefers-color-scheme: dark)').matches)
+ if (dark) document.documentElement.classList.add('dark')
+ } catch {
+ /* private mode / storage disabled */
+ }
+ })()
</script>
<style>
html.cumora-notif-window,
diff --git a/src/components/AppearancePicker.tsx b/src/components/AppearancePicker.tsx
new file mode 100644
index 0000000..2977564
--- /dev/null
+++ b/src/components/AppearancePicker.tsx
@@ -0,0 +1,33 @@
+/**
+ * Appearance picker — system / light / dark.
+ *
+ * Shared by desktop Preferences and the mobile You screen so the two
+ * shells can't drift apart on which choices exist or how they're worded.
+ * Lives next to the language picker: both are per-device, apply
+ * immediately, and never round-trip through server preferences.
+ */
+import { Select } from '@/components/Select'
+import { useT, type MessageKey } from '@/lib/i18n'
+import { useAppearanceStore, type Appearance } from '@/lib/theme'
+
+const OPTIONS: Array<{ value: Appearance; label: MessageKey }> = [
+ { value: 'system', label: 'common.appearance.system' },
+ { value: 'light', label: 'common.appearance.light' },
+ { value: 'dark', label: 'common.appearance.dark' },
+]
+
+export function AppearancePicker({ className }: { className?: string }) {
+ const t = useT()
+ const appearance = useAppearanceStore((s) => s.appearance)
+ const setAppearance = useAppearanceStore((s) => s.setAppearance)
+
+ return (
+ <Select<Appearance>
+ className={className}
+ value={appearance}
+ ariaLabel={t('common.appearance')}
+ onValueChange={setAppearance}
+ options={OPTIONS.map((o) => ({ value: o.value, label: t(o.label) }))}
+ />
+ )
+}
diff --git a/src/components/AuthScreen.tsx b/src/components/AuthScreen.tsx
index 419cfbf..9553bcc 100644
--- a/src/components/AuthScreen.tsx
+++ b/src/components/AuthScreen.tsx
@@ -209,7 +209,7 @@ export function AuthScreen() {
type="button"
onClick={() => go('google')}
disabled={busy !== null}
- className="h-11 rounded-[10px] border border-ink-200 bg-white hover:bg-cloud transition-colors flex items-center justify-center gap-3 text-[14px] text-ink-800 disabled:opacity-60"
+ className="h-11 rounded-[10px] border border-ink-100 bg-cloud hover:bg-sky2-50 text-ink-900 transition-colors flex items-center justify-center gap-3 text-[14px] font-medium disabled:opacity-60"
>
<GoogleMark />
{busy === 'google' ? t('auth.redirecting') : t('auth.continueWithGoogle')}
@@ -218,7 +218,7 @@ export function AuthScreen() {
type="button"
onClick={() => go('github')}
disabled={busy !== null}
- className="h-11 rounded-[10px] bg-[#1f2328] hover:bg-[#2a3037] text-white transition-colors flex items-center justify-center gap-3 text-[14px] disabled:opacity-60"
+ className="h-11 rounded-[10px] bg-[#1f2328] hover:bg-[#2a3037] text-white transition-colors flex items-center justify-center gap-3 text-[14px] font-medium disabled:opacity-60"
>
<GitHubMark />
{busy === 'github' ? t('auth.redirecting') : t('auth.continueWithGithub')}
@@ -272,20 +272,20 @@ function ServerSwitch({ open, onToggle }: { open: boolean; onToggle: () => void
)
}
return (
- <div className="w-full border border-ink-200 rounded-[10px] p-3 bg-white/60 flex flex-col gap-2">
+ <div className="w-full border border-ink-100 rounded-[10px] p-3 bg-cloud flex flex-col gap-2">
<div className="flex items-center justify-between">
- <div className="text-[12px] font-display text-ink-700">{t('auth.apiServer')}</div>
- <button type="button" onClick={onToggle} className="text-[11px] text-ink-300 hover:text-ink-500">{t('common.close')}</button>
+ <div className="text-[12px] font-display text-ink-900">{t('auth.apiServer')}</div>
+ <button type="button" onClick={onToggle} className="text-[11px] text-ink-500 hover:text-ink-900">{t('common.close')}</button>
</div>
{PRESETS.map((p) => (
<button
key={p.origin}
type="button"
onClick={() => apply(p.origin)}
- className={`text-left h-9 px-2 rounded-[6px] text-[12px] flex items-center justify-between hover:bg-cloud transition-colors ${current === p.origin ? 'bg-cloud' : ''}`}
+ className={`text-left h-9 px-2 rounded-[6px] text-[12px] flex items-center justify-between hover:bg-paper transition-colors ${current === p.origin ? 'bg-paper' : ''}`}
>
- <span className="font-display text-ink-800">{PRESET_LABEL_KEY[p.label] ? t(PRESET_LABEL_KEY[p.label]) : p.label}</span>
- <span className="text-[10px] text-ink-400">{p.origin}</span>
+ <span className="font-display text-ink-900">{PRESET_LABEL_KEY[p.label] ? t(PRESET_LABEL_KEY[p.label]) : p.label}</span>
+ <span className="text-[10px] text-ink-500">{p.origin}</span>
</button>
))}
<div className="flex items-stretch gap-2 pt-1">
@@ -294,13 +294,13 @@ function ServerSwitch({ open, onToggle }: { open: boolean; onToggle: () => void
value={custom}
onChange={(e) => setCustom(e.target.value)}
placeholder="https://your-server"
- className="flex-1 h-9 px-2 rounded-[6px] border border-ink-200 text-[12px] focus:outline-none focus:border-ink-400"
+ className="flex-1 h-9 px-2 rounded-[6px] border border-ink-100 bg-paper text-ink-900 placeholder:text-ink-300 text-[12px] focus:outline-none focus:border-sky2-300"
/>
<button
type="button"
disabled={!custom.trim()}
onClick={() => apply(custom.trim())}
- className="h-9 px-3 rounded-[6px] bg-ink-800 text-white text-[12px] disabled:opacity-40"
+ className="h-9 px-3 rounded-[6px] bg-skype hover:bg-skype-deep text-white text-[12px] disabled:opacity-40"
>
{t('common.use')}
</button>
@@ -309,7 +309,7 @@ function ServerSwitch({ open, onToggle }: { open: boolean; onToggle: () => void
<button
type="button"
onClick={() => apply(null)}
- className="text-[11px] text-ink-400 hover:text-ink-600 self-start"
+ className="text-[11px] text-ink-500 hover:text-ink-900 self-start"
>
{t('auth.clearOverride')}
</button>
diff --git a/src/components/Combobox.tsx b/src/components/Combobox.tsx
index a7f817c..67bdc0b 100644
--- a/src/components/Combobox.tsx
+++ b/src/components/Combobox.tsx
@@ -102,9 +102,9 @@ export function Combobox<T extends string = string>({
'group relative flex h-11 w-full items-center rounded-[14px] border border-ink-100 bg-cloud text-left text-[13px] font-semibold text-ink-900 outline-none transition',
'shadow-[0_1px_0_rgba(255,255,255,0.92)_inset,0_10px_24px_-24px_rgba(26,78,120,0.55)]',
'hover:border-sky2-200 hover:bg-sky2-50/60',
- open && 'border-sky2-300 bg-white ring-4 ring-sky2-100',
+ open && 'border-sky2-300 bg-cloud ring-4 ring-sky2-100',
)}
- style={{ backgroundImage: 'linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,253,0.94))' }}
+ style={{ backgroundImage: 'var(--select-face)' }}
>
<input
ref={inputRef}
@@ -142,7 +142,7 @@ export function Combobox<T extends string = string>({
onClick={() => { if (open) { setOpen(false); setQuery('') } else openMenu() }}
className={cn(
'absolute right-2 grid h-7 w-7 place-items-center rounded-[9px] border border-sky2-100 bg-sky2-50 text-skype-deep transition',
- 'group-hover:bg-white',
+ 'group-hover:bg-cloud',
open && 'border-sky2-200 bg-sky2-50',
)}
>
diff --git a/src/components/DocumentEditor.tsx b/src/components/DocumentEditor.tsx
index ed0cb0c..ba12aab 100644
--- a/src/components/DocumentEditor.tsx
+++ b/src/components/DocumentEditor.tsx
@@ -150,12 +150,12 @@ export function DocumentEditor({ documentId, variant = 'full', onClose, onOpenFu
}, [documentId, user])
if (!doc) return (
- <div className="h-full flex items-center justify-center text-stone-400 text-sm">
+ <div className="h-full flex items-center justify-center text-ink-500 text-sm">
{t('docEdit.notFound')}
</div>
)
if (!user || !session) return (
- <div className="h-full flex items-center justify-center text-stone-400 text-sm">
+ <div className="h-full flex items-center justify-center text-ink-500 text-sm">
{t('common.loading')}
</div>
)
@@ -172,11 +172,11 @@ export function DocumentEditor({ documentId, variant = 'full', onClose, onOpenFu
const isPeek = variant === 'peek'
return (
- <div className="h-full flex flex-col bg-white">
+ <div className="h-full flex flex-col bg-cloud">
<header
className={cn(
- 'border-b border-stone-200 flex items-center gap-2.5 min-w-0',
- isPeek ? 'px-4 py-3 bg-gradient-to-b from-white to-sky2-50/35' : 'px-6 py-3',
+ 'border-b border-ink-100 flex items-center gap-2.5 min-w-0',
+ isPeek ? 'px-4 py-3 bg-gradient-to-b from-cloud to-sky2-50/35' : 'px-6 py-3',
)}
>
<input
@@ -185,7 +185,7 @@ export function DocumentEditor({ documentId, variant = 'full', onClose, onOpenFu
onBlur={commitTitle}
onKeyDown={(e) => { if (e.key === 'Enter') (e.target as HTMLInputElement).blur() }}
className={cn(
- 'flex-1 min-w-0 bg-transparent font-medium text-stone-900 focus:outline-none',
+ 'flex-1 min-w-0 bg-transparent font-medium text-ink-900 focus:outline-none',
isPeek ? 'text-[16px] leading-[1.35]' : 'text-xl',
)}
placeholder={t('docEdit.untitledPh')}
diff --git a/src/components/EmailComposer.tsx b/src/components/EmailComposer.tsx
index 645f6b7..52e2924 100644
--- a/src/components/EmailComposer.tsx
+++ b/src/components/EmailComposer.tsx
@@ -122,8 +122,8 @@ function PillField({
}
return (
- <div className="relative grid grid-cols-[60px_1fr] gap-2 items-start py-2 px-3 border-b border-ink-100">
- <span className="text-[10.5px] font-bold text-ink-300 uppercase tracking-wider pt-1.5">{label}</span>
+ <div className="relative grid grid-cols-[60px_1fr] gap-2 items-start py-2 px-3 border-b" style={{ borderColor: 'var(--chrome-warm-rule)' }}>
+ <span className="text-[10.5px] font-bold uppercase tracking-wider pt-1.5" style={{ color: 'var(--email-muted)' }}>{label}</span>
<div
className="flex flex-wrap gap-1.5 items-center min-h-[28px] cursor-text"
onClick={() => inputRef.current?.focus()}
@@ -154,7 +154,7 @@ function PillField({
onKeyDown={onKey}
onBlur={() => setTimeout(() => setOpenSuggest(false), 120)}
placeholder={entries.length === 0 ? placeholder : ''}
- className="flex-1 min-w-[140px] outline-none border-0 bg-transparent text-[13px] text-ink-900 placeholder:text-ink-300"
+ className="flex-1 min-w-[140px] outline-none border-0 bg-transparent text-[13px] text-ink-900 placeholder:text-[color:var(--email-muted)]"
/>
</div>
{openSuggest && suggestions.length > 0 && (
@@ -385,14 +385,14 @@ export function EmailComposer() {
<button
aria-label={t('email.closeComposerBackdropAria')}
onClick={close}
- className="absolute inset-0 bg-ink-900/15 pointer-events-auto animate-fade-in"
- style={{ animationDuration: '120ms' }}
+ className="absolute inset-0 pointer-events-auto animate-fade-in"
+ style={{ background: 'var(--email-backdrop)', animationDuration: '120ms' }}
/>
<div
className="relative pointer-events-auto w-full max-w-[640px] h-full flex flex-col animate-slide-in-right"
style={{
- background: 'linear-gradient(180deg, #FBF8F0, #F4EEDD)',
- boxShadow: '-12px 0 32px -10px rgba(60, 50, 30, 0.18)',
+ background: 'var(--chrome-warm)',
+ boxShadow: 'var(--chrome-warm-shadow)',
}}
onDragEnter={onDragEnter}
onDragLeave={onDragLeave}
@@ -406,7 +406,7 @@ export function EmailComposer() {
// child drop target keeps receiving the event.
className="absolute inset-0 z-10 flex items-center justify-center pointer-events-none animate-fade-in"
style={{
- background: 'rgba(0, 168, 240, 0.12)',
+ background: 'rgb(var(--skype-rgb) / 0.12)',
border: '2px dashed var(--skype)',
borderRadius: '4px',
animationDuration: '120ms',
@@ -420,8 +420,8 @@ export function EmailComposer() {
</div>
</div>
)}
- <div className="flex items-center gap-2 py-3 px-4 border-b border-[rgba(120,110,95,0.25)]">
- <IMail className="w-4 h-4 text-[#7A6A3F]" strokeWidth={2} />
+ <div className="flex items-center gap-2 py-3 px-4 border-b" style={{ borderColor: 'var(--chrome-warm-rule)' }}>
+ <IMail className="w-4 h-4" strokeWidth={2} style={{ color: 'var(--chrome-warm-icon)' }} />
<h2 className="text-[14px] font-semibold text-ink-900 tracking-tight">
{isReply ? t('email.composerReplyByEmail') : t('email.composerNewEmail')}
</h2>
@@ -460,19 +460,19 @@ export function EmailComposer() {
</div>
))}
{!isReply && (
- <div className="grid grid-cols-[60px_1fr] gap-2 items-center py-2 px-3 border-b border-[rgba(120,110,95,0.25)]">
- <span className="text-[10.5px] font-bold text-ink-300 uppercase tracking-wider">{t('email.subjectLabel')}</span>
+ <div className="grid grid-cols-[60px_1fr] gap-2 items-center py-2 px-3 border-b" style={{ borderColor: 'var(--chrome-warm-rule)' }}>
+ <span className="text-[10.5px] font-bold uppercase tracking-wider" style={{ color: 'var(--email-muted)' }}>{t('email.subjectLabel')}</span>
<input
type="text"
value={subject}
onChange={(e) => setSubject(e.target.value)}
placeholder={t('email.subjectPlaceholder')}
- className="outline-none border-0 bg-transparent text-[15px] text-ink-900 placeholder:text-ink-300 font-display"
+ className="outline-none border-0 bg-transparent text-[15px] text-ink-900 placeholder:text-[color:var(--email-muted)] font-display"
/>
</div>
)}
{isReply && replyOriginal?.email && (
- <div className="py-2 px-3 border-b border-[rgba(120,110,95,0.18)] bg-[rgba(120,110,95,0.04)] text-[11.5px] text-ink-500">
+ <div className="py-2 px-3 border-b bg-ink-100/40 text-[11.5px] text-ink-500" style={{ borderColor: 'var(--chrome-warm-rule-soft)' }}>
<div className="flex items-baseline gap-2">
<span className="font-bold text-ink-300 uppercase tracking-wider text-[10px]">Re:</span>
<span className="text-ink-700 font-medium">{replyOriginal.email.subject || t('email.noSubject')}</span>
@@ -496,12 +496,12 @@ export function EmailComposer() {
value={body}
onChange={(e) => setBody(e.target.value)}
placeholder={isReply ? t('email.writeReplyPh') : t('email.writeMessagePh')}
- className="flex-1 outline-none border-0 bg-transparent py-3 px-4 text-[14px] leading-[1.55] text-ink-700 placeholder:text-ink-300 resize-none font-sans"
+ className="flex-1 outline-none border-0 bg-transparent py-3 px-4 text-[14px] leading-[1.55] text-ink-700 placeholder:text-[color:var(--email-muted)] resize-none font-sans"
autoFocus
/>
{attachments.length > 0 && (
- <div className="py-2 px-3 border-t border-[rgba(120,110,95,0.18)] space-y-1">
+ <div className="py-2 px-3 border-t space-y-1" style={{ borderColor: 'var(--chrome-warm-rule-soft)' }}>
{attachments.map((a) => (
<div key={a.localId} className="flex items-center gap-2 text-[12px]">
<span className="text-[14px] leading-none">
@@ -532,7 +532,7 @@ export function EmailComposer() {
</div>
)}
- <div className="flex items-center gap-2 py-3 px-4 border-t border-[rgba(120,110,95,0.25)]">
+ <div className="flex items-center gap-2 py-3 px-4 border-t" style={{ borderColor: 'var(--chrome-warm-rule)' }}>
<input
ref={fileInputRef}
type="file"
@@ -547,7 +547,7 @@ export function EmailComposer() {
className="py-2 px-2.5 text-[12px] font-semibold text-ink-700 bg-cloud border border-ink-100 rounded-[7px] hover:border-sky2-200 hover:text-skype-deep transition disabled:opacity-50"
title={t('email.attachFile')}
>📎 Attach</button>
- <span className="text-[11px] text-ink-300 mr-auto">
+ <span className="text-[11px] mr-auto" style={{ color: 'var(--email-muted)' }}>
{t('email.fromLabel')} <span className="font-mono text-ink-500">{me?.email ?? t('email.noAuthEmail')}</span>
</span>
<button
@@ -565,7 +565,7 @@ export function EmailComposer() {
)}
style={{
background: 'var(--skype)',
- boxShadow: '0 4px 12px -3px rgba(0, 168, 240, 0.45)',
+ boxShadow: '0 4px 12px -3px rgb(var(--skype-rgb) / 0.45)',
}}
>{sending ? t('email.sending') : isReply ? t('email.sendReply') : t('email.send')}</button>
</div>
diff --git a/src/components/InviteAcceptScreen.tsx b/src/components/InviteAcceptScreen.tsx
index a1488da..d015d0e 100644
--- a/src/components/InviteAcceptScreen.tsx
+++ b/src/components/InviteAcceptScreen.tsx
@@ -487,7 +487,7 @@ function SignInToAccept({ token }: { token: string }) {
type="button"
onClick={() => go('google')}
disabled={busy !== null}
- className="h-11 rounded-[10px] border border-ink-200 bg-white hover:bg-cloud transition-colors flex items-center justify-center gap-3 text-[14px] text-ink-800 disabled:opacity-60"
+ className="h-11 rounded-[10px] border border-ink-100 bg-cloud hover:bg-sky2-50 text-ink-900 transition-colors flex items-center justify-center gap-3 text-[14px] font-medium disabled:opacity-60"
>
<GoogleMark />
{busy === 'google' ? t('auth.redirecting') : t('auth.continueWithGoogle')}
diff --git a/src/components/LanguagePicker.tsx b/src/components/LanguagePicker.tsx
index 806125a..d8100f0 100644
--- a/src/components/LanguagePicker.tsx
+++ b/src/components/LanguagePicker.tsx
@@ -21,10 +21,13 @@ export function LanguagePicker({ className }: { className?: string }) {
value={locale}
ariaLabel={t('common.language')}
onValueChange={setLocale}
- // `label` is the language's own name; `hint` is its English name, so
- // someone stuck in a language they can't read can still find their
- // way back out.
- options={LOCALES.map((l) => ({ value: l.code, label: l.label, hint: l.english }))}
+ // Native name in the control; English name only in the open menu,
+ // and only when it actually differs (otherwise "English English").
+ options={LOCALES.map((l) => ({
+ value: l.code,
+ label: l.label,
+ hint: l.english === l.label ? undefined : l.english,
+ }))}
/>
)
}
diff --git a/src/components/Message.tsx b/src/components/Message.tsx
index bb94dc1..fdc34b7 100644
--- a/src/components/Message.tsx
+++ b/src/components/Message.tsx
@@ -1112,7 +1112,7 @@ function _EmailCard({ msg }: { msg: Message }) {
<div
className="mt-1 max-w-[min(100%,640px)] overflow-hidden"
style={{
- background: 'linear-gradient(180deg, #FBF8F0, #F4EEDD)',
+ background: 'var(--chrome-warm)',
border: `1px solid ${ringColor}`,
borderRadius: '14px',
boxShadow: '0 1px 0 rgba(0,0,0,0.02), 0 8px 20px -16px rgba(60, 50, 30, 0.18)',
diff --git a/src/components/Select.tsx b/src/components/Select.tsx
index ea6a6e0..491926c 100644
--- a/src/components/Select.tsx
+++ b/src/components/Select.tsx
@@ -146,25 +146,22 @@ export function Select<T extends string = string>({
onKeyDown={onButtonKeyDown}
className={cn(
'group flex h-11 w-full items-center justify-between gap-3 rounded-[14px] border border-ink-100 bg-cloud px-3.5 text-left text-[13px] font-semibold text-ink-900 outline-none transition',
- 'shadow-[0_1px_0_rgba(255,255,255,0.92)_inset,0_10px_24px_-24px_rgba(26,78,120,0.55)]',
+ 'shadow-[var(--select-shadow)]',
'hover:border-sky2-200 hover:bg-sky2-50/60',
- 'focus:border-sky2-300 focus:bg-white focus:ring-4 focus:ring-sky2-100',
- open && 'border-sky2-300 bg-white ring-4 ring-sky2-100',
+ 'focus:border-sky2-300 focus:bg-cloud focus:ring-4 focus:ring-sky2-100',
+ open && 'border-sky2-300 bg-cloud ring-4 ring-sky2-100',
disabled && 'cursor-not-allowed opacity-55',
)}
style={{
- backgroundImage: 'linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,253,0.94))',
+ backgroundImage: 'var(--select-face)',
}}
>
<span className="min-w-0 flex-1 truncate">{selected?.label ?? 'Select'}</span>
- {selected?.hint && (
- <span className="shrink-0 text-[12px] font-semibold tabular-nums text-ink-400">{selected.hint}</span>
- )}
<span
aria-hidden="true"
className={cn(
'grid h-7 w-7 shrink-0 place-items-center rounded-[9px] border border-sky2-100 bg-sky2-50 text-skype-deep transition',
- 'group-hover:bg-white group-focus:bg-sky2-50',
+ 'group-hover:bg-cloud group-focus:bg-sky2-50',
open && 'rotate-180 border-sky2-200 bg-sky2-50',
)}
>
@@ -181,7 +178,7 @@ export function Select<T extends string = string>({
aria-hidden={!open}
onAnimationEnd={() => setAnimateMenu(false)}
className={cn(
- 'absolute left-0 right-0 top-full z-[70] mt-2 max-h-72 overflow-auto rounded-[16px] border border-sky2-100 bg-cloud p-2.5 shadow-[0_22px_55px_-24px_rgba(10,30,60,0.38),0_8px_18px_-12px_rgba(10,30,60,0.2),0_0_0_1px_rgba(255,255,255,0.72)_inset]',
+ 'absolute left-0 right-0 top-full z-[70] mt-2 max-h-72 overflow-auto rounded-[16px] border border-[var(--select-menu-border)] bg-cloud p-2.5 shadow-[var(--select-menu-shadow)]',
'origin-top transition-[opacity,transform,visibility] duration-150 ease-out',
open ? 'visible translate-y-0 scale-100 opacity-100' : 'invisible pointer-events-none -translate-y-1 scale-[0.985] opacity-0',
animateMenu && 'animate-rise',
@@ -203,7 +200,7 @@ export function Select<T extends string = string>({
onMouseDown={(event) => event.preventDefault()}
onClick={() => commit(idx)}
className={cn(
- 'flex h-8 w-full items-center gap-2.5 rounded-[10px] px-3 text-left text-[12.5px] font-semibold transition disabled:cursor-not-allowed disabled:opacity-45',
+ 'flex h-8 w-full items-center gap-2 rounded-[10px] px-2.5 text-left text-[12.5px] font-semibold transition disabled:cursor-not-allowed disabled:opacity-45',
selectedOption
? 'bg-skype text-white shadow-[0_10px_22px_-16px_rgba(0,120,200,0.82)]'
: active
@@ -211,20 +208,20 @@ export function Select<T extends string = string>({
: 'text-ink-700 hover:bg-sky2-50 hover:text-skype-deep',
)}
>
- <span className="grid h-4 w-4 shrink-0 place-items-center">
- {selectedOption && (
- <svg viewBox="0 0 12 10" className="h-3 w-3" fill="none">
- <path d="M1.5 5.1 4.4 8 10.5 1.5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
- </svg>
- )}
- </span>
- <span className="min-w-0 flex-1 truncate">{option.label}</span>
- {option.hint && (
+ <span className="shrink-0">{option.label}</span>
+ {option.hint && option.hint !== option.label && (
<span className={cn(
- 'shrink-0 pl-2 text-[11.5px] tabular-nums',
+ 'min-w-0 flex-1 truncate text-[11.5px]',
selectedOption ? 'text-white/80' : 'text-ink-400',
)}>{option.hint}</span>
)}
+ {selectedOption && (
+ <span className="ml-auto grid h-4 w-4 shrink-0 place-items-center">
+ <svg viewBox="0 0 12 10" className="h-3 w-3" fill="none">
+ <path d="M1.5 5.1 4.4 8 10.5 1.5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
+ </svg>
+ </span>
+ )}
</button>
)
})}
diff --git a/src/components/WhisperRoom.tsx b/src/components/WhisperRoom.tsx
index ee2b1dc..2777049 100644
--- a/src/components/WhisperRoom.tsx
+++ b/src/components/WhisperRoom.tsx
@@ -207,7 +207,7 @@ export function WhisperRoom({ pairId }: { pairId: string }) {
// Single continuous gradient layer — soft wisteria from top-left,
// warm peach from bottom-right, paper base. No more banded zones
// that get sliced by inner borders.
- background: 'radial-gradient(ellipse 70% 50% at 0% 0%, rgba(210, 201, 233, 0.28), transparent 60%), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 217, 210, 0.18), transparent 60%), var(--paper)',
+ background: 'var(--whisper-room-wash)',
position: 'relative',
}}
>
@@ -310,7 +310,7 @@ export function WhisperInspector({ pairId }: { pairId: string }) {
return (
<aside className="border-l overflow-y-auto"
style={{
- background: 'linear-gradient(180deg, #FBFAFE, #EFE9F7)',
+ background: 'var(--chrome-whisper)',
borderColor: 'var(--whisper-100)',
}}>
<div className="py-5 px-5 pb-4 text-center border-b"
diff --git a/src/desktop/BoardsView.tsx b/src/desktop/BoardsView.tsx
index 05d150f..cf014c6 100644
--- a/src/desktop/BoardsView.tsx
+++ b/src/desktop/BoardsView.tsx
@@ -106,7 +106,7 @@ function BoardsSidebar({ onResizeStart }: { onResizeStart: (e: React.MouseEvent)
}}
onBlur={() => void submit()}
placeholder={t('boards.boardTitlePlaceholder')}
- className="w-full px-2.5 py-1.5 text-sm rounded-md border border-ink-200 bg-white focus:outline-none focus:border-skype"
+ className="w-full px-2.5 py-1.5 text-sm rounded-md border border-ink-200 bg-cloud text-ink-900 placeholder:text-ink-300 focus:outline-none focus:border-skype"
/>
</div>
)}
@@ -277,7 +277,7 @@ function BoardCanvas({ boardId }: { boardId: string }) {
}}
onBlur={() => void submitNewColumn()}
placeholder={t('boards.columnTitlePlaceholder')}
- className="w-full px-2.5 py-1.5 text-sm rounded-md border border-ink-200 bg-white focus:outline-none focus:border-skype"
+ className="w-full px-2.5 py-1.5 text-sm rounded-md border border-ink-200 bg-cloud focus:outline-none focus:border-skype"
/>
</div>
) : (
@@ -367,7 +367,7 @@ function ColumnView({ boardId, column, cards, onOpenCard }: {
if (e.key === 'Escape') setEditingTitle(false)
}}
onBlur={() => void submitTitle()}
- className="flex-1 px-1.5 py-0.5 text-sm font-medium rounded-md border border-skype/50 bg-white focus:outline-none"
+ className="flex-1 px-1.5 py-0.5 text-sm font-medium rounded-md border border-skype/50 bg-cloud focus:outline-none"
/>
) : (
<button
@@ -406,12 +406,12 @@ function ColumnView({ boardId, column, cards, onOpenCard }: {
multiline
submitOnEnter
rows={2}
- className="w-full px-2.5 py-2 text-sm rounded-md border border-ink-200 bg-white focus:outline-none focus:border-skype resize-none"
+ className="w-full px-2.5 py-2 text-sm rounded-md border border-ink-200 bg-cloud focus:outline-none focus:border-skype resize-none"
/>
) : (
<button
onClick={() => setAdding(true)}
- className="w-full text-left text-xs text-ink-400 px-2.5 py-1.5 rounded-md hover:bg-white hover:text-ink-600 transition-colors"
+ className="w-full text-left text-xs text-ink-400 px-2.5 py-1.5 rounded-md hover:bg-cloud hover:text-ink-600 transition-colors"
>
{t('boards.addCard')}
</button>
@@ -437,7 +437,7 @@ function CardTile({ card, onOpen }: { card: BoardCard; onOpen: () => void }) {
}}
onClick={onOpen}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onOpen() } }}
- className="px-3 py-2.5 rounded-md bg-white border border-ink-100 shadow-soft text-left cursor-pointer hover:border-skype/40 transition-colors"
+ className="px-3 py-2.5 rounded-md bg-cloud border border-ink-100 shadow-soft text-left cursor-pointer hover:border-skype/40 transition-colors"
>
<div className="text-sm text-ink-800 leading-snug">
<MentionedText text={card.title} byId={byId} />
@@ -743,7 +743,7 @@ function MentionInput(props: {
onKeyDown={onKeyDown}
onBlur={props.onBlur}
className={cn(
- 'w-full px-3 py-2 text-sm rounded-md border border-ink-200 bg-white focus:outline-none focus:border-skype resize-y',
+ 'w-full px-3 py-2 text-sm rounded-md border border-ink-200 bg-cloud focus:outline-none focus:border-skype resize-y',
props.className,
)}
/>
@@ -757,13 +757,13 @@ function MentionInput(props: {
onKeyDown={onKeyDown}
onBlur={props.onBlur}
className={cn(
- 'w-full px-3 py-2 text-sm rounded-md border border-ink-200 bg-white focus:outline-none focus:border-skype',
+ 'w-full px-3 py-2 text-sm rounded-md border border-ink-200 bg-cloud focus:outline-none focus:border-skype',
props.className,
)}
/>
)}
{open && matches.length > 0 && (
- <div className="absolute left-0 right-0 top-full mt-1 max-h-56 overflow-y-auto rounded-md border border-ink-200 bg-white shadow-lg z-20">
+ <div className="absolute left-0 right-0 top-full mt-1 max-h-56 overflow-y-auto rounded-md border border-ink-200 bg-cloud shadow-lg z-20">
{matches.map((p, i) => (
<button
key={p.id}
@@ -866,7 +866,7 @@ function CardDetailModal({ boardId, card, columns, onClose }: {
onChange={setTitle}
onSubmit={() => void saveTitle()}
placeholder={t('boards.cardTitleEditPlaceholder')}
- className="-ml-2 w-full border-transparent bg-transparent px-2 py-1.5 text-[19px] font-semibold leading-7 text-ink-900 placeholder:text-ink-300 focus:border-skype/30 focus:bg-white focus:ring-2 focus:ring-skype/15"
+ className="-ml-2 w-full border-transparent bg-transparent px-2 py-1.5 text-[19px] font-semibold leading-7 text-ink-900 placeholder:text-ink-300 focus:border-skype/30 focus:bg-cloud focus:ring-2 focus:ring-skype/15"
/>
</div>
<button
@@ -1066,7 +1066,7 @@ function AssigneePicker({ value, onChange, meId }: {
'group relative flex h-11 w-full items-center rounded-[14px] border border-ink-100 bg-cloud text-left text-[13px] font-semibold text-ink-900 outline-none transition',
'shadow-[0_1px_0_rgba(255,255,255,0.92)_inset,0_10px_24px_-24px_rgba(26,78,120,0.55)]',
'hover:border-sky2-200 hover:bg-sky2-50/60',
- open && 'border-sky2-300 bg-white ring-4 ring-sky2-100',
+ open && 'border-sky2-300 bg-cloud ring-4 ring-sky2-100',
)}
style={{
backgroundImage: 'linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,253,0.94))',
@@ -1146,7 +1146,7 @@ function AssigneePicker({ value, onChange, meId }: {
onClick={() => openMenu()}
className={cn(
'absolute right-2 grid h-7 w-7 place-items-center rounded-[9px] border border-sky2-100 bg-sky2-50 text-skype-deep transition',
- 'group-hover:bg-white group-focus-within:bg-sky2-50',
+ 'group-hover:bg-cloud group-focus-within:bg-sky2-50',
open && 'border-sky2-200 bg-sky2-50',
)}
>
diff --git a/src/desktop/CalendarView.tsx b/src/desktop/CalendarView.tsx
index cf10b73..cd24736 100644
--- a/src/desktop/CalendarView.tsx
+++ b/src/desktop/CalendarView.tsx
@@ -716,7 +716,7 @@ export function CalendarView() {
{/* View switcher — segmented control (cloud pill) */}
<div
- className="inline-flex items-center gap-0.5 rounded-full border border-ink-100 bg-cloud p-0.5 shadow-[0_1px_0_rgba(255,255,255,0.95)_inset,0_8px_20px_-18px_rgba(26,78,120,0.4)]"
+ className="inline-flex items-center gap-0.5 rounded-full border border-ink-100 bg-cloud p-0.5 shadow-[var(--select-shadow)]"
>
{(['day', 'week', 'month'] as const).map((m) => (
<button
diff --git a/src/desktop/ChatPane.tsx b/src/desktop/ChatPane.tsx
index ab4ab88..47b94e4 100644
--- a/src/desktop/ChatPane.tsx
+++ b/src/desktop/ChatPane.tsx
@@ -1322,15 +1322,15 @@ function ThreadError({ message, onRetry }: { message: string; onRetry: () => voi
<div
className="flex flex-col items-center text-center max-w-[340px] gap-3 rounded-2xl px-6 py-6 backdrop-blur-sm"
style={{
- background: 'linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 217, 210, 0.18))',
- border: '1px solid rgba(255, 122, 107, 0.18)',
- boxShadow: '0 12px 32px -16px rgba(200, 78, 63, 0.25)',
+ background: 'var(--error-card)',
+ border: 'var(--error-card-border)',
+ boxShadow: 'var(--error-card-shadow)',
}}
>
<div
className="w-10 h-10 rounded-full grid place-items-center"
style={{
- background: 'rgba(255, 122, 107, 0.12)',
+ background: 'var(--error-icon-bg)',
color: 'var(--coral-deep)',
}}
>
@@ -1933,7 +1933,7 @@ export function ChatPane() {
// chat surface (header + thread + composer share one continuous
// background). Putting the gradient on the inner thread div used
// to clip the coral haze right where the composer started.
- background: 'radial-gradient(ellipse 80% 40% at 0% 0%, rgba(194, 230, 251, 0.3), transparent 60%), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 217, 210, 0.25), transparent 60%), var(--cloud)',
+ background: 'var(--chat-wash)',
}}
>
<ChatHeader
diff --git a/src/desktop/ConveneView.tsx b/src/desktop/ConveneView.tsx
index 37e47ff..5d24e88 100644
--- a/src/desktop/ConveneView.tsx
+++ b/src/desktop/ConveneView.tsx
@@ -185,7 +185,7 @@ export function ConveneView() {
</main>
<aside className="border-l border-ink-100 overflow-y-auto"
- style={{ background: 'linear-gradient(180deg, #FBFDFE, #F4F8FC)' }}>
+ style={{ background: 'var(--chrome-pane)' }}>
<div className="py-3.5 px-[18px] pb-2.5 border-b border-ink-100">
<h4 className="font-display font-medium text-[16px] tracking-tight mb-1">
{t('convene.transcriptTitle')} <em className="italic text-skype-deep" style={{ fontWeight: 400 }}>{t('convene.transcriptEm')}</em>
diff --git a/src/desktop/ConversationsPane.tsx b/src/desktop/ConversationsPane.tsx
index 4391d06..8f4a09f 100644
--- a/src/desktop/ConversationsPane.tsx
+++ b/src/desktop/ConversationsPane.tsx
@@ -336,8 +336,8 @@ function ConvoRow({ c, selected, onClick, onContextMenu }: RowProps) {
// Muted convos keep the count visible (per the spec: "still
// show the per-row unread count") but switch to an ink chip
// instead of coral — preserves the "silent" affordance.
- background: muted ? 'var(--ink-200)' : (isFreshPulled ? 'var(--gold)' : 'var(--coral)'),
- color: muted ? 'var(--ink-700)' : (isFreshPulled ? 'var(--ink-900)' : 'white'),
+ background: muted ? 'var(--ink-200)' : (isFreshPulled ? 'var(--unread-fresh)' : 'var(--coral)'),
+ color: muted ? 'var(--ink-700)' : (isFreshPulled ? 'var(--unread-fresh-fg)' : 'white'),
}}
>{c.unread}</span>
)}
diff --git a/src/desktop/DocumentsView.tsx b/src/desktop/DocumentsView.tsx
index aa6fadb..b536871 100644
--- a/src/desktop/DocumentsView.tsx
+++ b/src/desktop/DocumentsView.tsx
@@ -38,9 +38,9 @@ export function DocumentsView() {
return (
<div className="grid h-full overflow-hidden" style={{ gridTemplateColumns: '280px 1fr' }}>
- <aside className="border-r border-ink-100 bg-white flex flex-col min-h-0">
+ <aside className="border-r border-ink-100 bg-cloud flex flex-col min-h-0">
<header className="px-4 py-3 flex items-center justify-between border-b border-ink-100">
- <h2 className="font-display text-sm font-medium text-stone-800">{t('docs.title')}</h2>
+ <h2 className="font-display text-sm font-medium text-ink-900">{t('docs.title')}</h2>
<button
type="button"
onClick={handleCreate}
@@ -53,10 +53,10 @@ export function DocumentsView() {
</header>
<div className="flex-1 overflow-y-auto py-2">
{!loaded && (
- <div className="px-4 py-6 text-xs text-stone-400">{t('common.loading')}</div>
+ <div className="px-4 py-6 text-xs text-ink-500">{t('common.loading')}</div>
)}
{loaded && list.length === 0 && (
- <div className="px-4 py-6 text-xs text-stone-400">
+ <div className="px-4 py-6 text-xs text-ink-500">
{t('docs.empty')}
</div>
)}
@@ -73,11 +73,11 @@ export function DocumentsView() {
'w-full text-left px-4 py-2.5 transition-colors block',
active
? 'bg-skype/10 text-skype-deep'
- : 'hover:bg-stone-50 text-stone-700',
+ : 'hover:bg-sky2-50 text-ink-700',
)}
>
<div className="text-sm font-medium truncate">{d.title || t('docs.untitled')}</div>
- <div className="text-[11px] text-stone-400 mt-0.5">
+ <div className="text-[11px] text-ink-500 mt-0.5">
{authorName} · {timeAgo(d.updatedAt, t)}
</div>
</button>
@@ -85,11 +85,11 @@ export function DocumentsView() {
})}
</div>
</aside>
- <main className="min-h-0 overflow-hidden bg-white">
+ <main className="min-h-0 overflow-hidden bg-cloud">
{selectedId ? (
<DocumentEditor documentId={selectedId} />
) : (
- <div className="h-full grid place-items-center text-stone-400 text-sm">
+ <div className="h-full grid place-items-center text-ink-500 text-sm">
{list.length === 0
? t('docs.emptyCta')
: t('docs.pickFromList')}
diff --git a/src/desktop/InfoPane.tsx b/src/desktop/InfoPane.tsx
index f92ccb0..c262f7d 100644
--- a/src/desktop/InfoPane.tsx
+++ b/src/desktop/InfoPane.tsx
@@ -65,7 +65,7 @@ export function InfoPane() {
return (
<aside
className="border-l border-ink-100 overflow-y-auto relative"
- style={{ background: 'linear-gradient(180deg, #FBFDFE, #F4F8FC)' }}
+ style={{ background: 'var(--chrome-pane)' }}
>
<button
onClick={close}
diff --git a/src/desktop/MeView.tsx b/src/desktop/MeView.tsx
index b63d634..564040c 100644
--- a/src/desktop/MeView.tsx
+++ b/src/desktop/MeView.tsx
@@ -7,6 +7,7 @@ import { useDevtools } from '@/stores/devtools'
import { useAuth } from '@/stores/auth'
import { Avatar } from '@/components/Avatar'
import { Checkbox } from '@/components/Checkbox'
+import { AppearancePicker } from '@/components/AppearancePicker'
import { LanguagePicker } from '@/components/LanguagePicker'
import { useT, type MessageKey } from '@/lib/i18n'
import { cn } from '@/lib/utils'
@@ -671,6 +672,7 @@ function PreferencesTab() {
</Section>
))}
<LanguageSection />
+ <AppearanceSection />
<SkypeSoundSection />
{devtoolsCanEnable && (
<Section title={`↳ ${t('me.prefs.developer')}`}>
@@ -707,6 +709,24 @@ function LanguageSection() {
)
}
+function AppearanceSection() {
+ const t = useT()
+ return (
+ <Section title={`↳ ${t('me.prefs.appearanceSection')}`}>
+ <div className="bg-cloud rounded-[14px] p-4 flex items-center gap-4"
+ style={{ border: '1px solid var(--ink-100)' }}>
+ <div className="flex-1 min-w-0">
+ <div className="font-semibold text-[13px] text-ink-900">{t('common.appearance')}</div>
+ <div className="font-display italic font-normal text-[11.5px] text-ink-500 mt-0.5">
+ {t('common.appearanceSub')}
+ </div>
+ </div>
+ <AppearancePicker className="w-[180px] shrink-0" />
+ </div>
+ </Section>
+ )
+}
+
function SkypeSoundSection() {
// Local-only toggle — see stores/sound.ts for why this isn't synced
// through the server preferences store. Default is muted; users opt
diff --git a/src/desktop/Rail.tsx b/src/desktop/Rail.tsx
index ea68768..fbbd92a 100644
--- a/src/desktop/Rail.tsx
+++ b/src/desktop/Rail.tsx
@@ -77,7 +77,7 @@ export function Rail() {
return (
<aside
className="flex flex-col items-center py-[18px] gap-1.5 border-r border-ink-100"
- style={{ background: 'linear-gradient(180deg, #F8FBFD, #EDF4F9)' }}
+ style={{ background: 'var(--chrome-rail)' }}
>
<button
className="mb-3.5 relative"
diff --git a/src/desktop/ThreadDrawer.tsx b/src/desktop/ThreadDrawer.tsx
index e6a41c5..ca9e18e 100644
--- a/src/desktop/ThreadDrawer.tsx
+++ b/src/desktop/ThreadDrawer.tsx
@@ -118,7 +118,7 @@ export function ThreadDrawer() {
return (
<aside
className="border-l border-ink-100 overflow-hidden relative flex flex-col"
- style={{ background: 'linear-gradient(180deg, #FBFDFE, #F4F8FC)' }}
+ style={{ background: 'var(--chrome-pane)' }}
>
<header className="flex items-center justify-between px-4 pt-4 pb-3 border-b border-ink-100">
<div>
diff --git a/src/desktop/TitleBar.tsx b/src/desktop/TitleBar.tsx
index 4d3a7ce..0a40a82 100644
--- a/src/desktop/TitleBar.tsx
+++ b/src/desktop/TitleBar.tsx
@@ -22,7 +22,7 @@ export function TitleBar() {
className="grid items-center px-4 border-b border-ink-100"
style={{
height: 44,
- background: 'linear-gradient(180deg, #FBFDFF 0%, #F1F7FB 100%)',
+ background: 'var(--chrome)',
gridTemplateColumns: `1fr auto 1fr`,
...dragStyle,
}}
diff --git a/src/desktop/WhispersView.tsx b/src/desktop/WhispersView.tsx
index c1c7bf5..9285b01 100644
--- a/src/desktop/WhispersView.tsx
+++ b/src/desktop/WhispersView.tsx
@@ -14,7 +14,7 @@ function StubRoom() {
return (
<main className="grid place-items-center text-center"
style={{
- background: 'radial-gradient(ellipse 80% 60% at 50% 0%, rgba(210, 201, 233, 0.30), transparent 60%), linear-gradient(180deg, var(--paper) 0%, var(--whisper-50) 100%)',
+ background: 'var(--whispers-wash)',
}}>
<div>
<div className="font-display font-medium text-[28px] text-ink-900 mb-2" style={{ letterSpacing: '-0.02em' }}>
diff --git a/src/lib/native.ts b/src/lib/native.ts
index db48a53..9bb368e 100644
--- a/src/lib/native.ts
+++ b/src/lib/native.ts
@@ -96,22 +96,35 @@ export function nativePlatform(): string | null {
let booted = false
+async function applyNativeAppearance(resolved: 'light' | 'dark'): Promise<void> {
+ if (!isNativePlatform()) return
+ await StatusBar.setStyle({ style: resolved === 'dark' ? Style.Dark : Style.Light })
+ if (nativePlatform() === 'android') {
+ await StatusBar.setBackgroundColor({ color: resolved === 'dark' ? '#21252b' : '#FAFCFE' })
+ }
+}
+
export async function bootNative(): Promise<void> {
if (booted) return
booted = true
if (!isNativePlatform()) return
- // Status bar — DARK glyphs on a light app background.
+ // Status bar glyphs follow the resolved appearance. Style.Light =
+ // dark glyphs on a light ground; Style.Dark = light glyphs on dark.
try {
- await StatusBar.setStyle({ style: Style.Light })
- if (nativePlatform() === 'android') {
- await StatusBar.setBackgroundColor({ color: '#FAFCFE' })
- }
+ await applyNativeAppearance(
+ document.documentElement.classList.contains('dark') ? 'dark' : 'light',
+ )
await StatusBar.setOverlaysWebView({ overlay: false })
} catch (err) {
console.warn('[native] status bar setup failed', err)
}
+ window.addEventListener('cumora:appearance', (ev) => {
+ const resolved = (ev as CustomEvent<'light' | 'dark'>).detail
+ void applyNativeAppearance(resolved)
+ })
+
// Splash — hide once React has mounted past the launch image.
try {
setTimeout(() => { void SplashScreen.hide() }, 400)
diff --git a/src/lib/runtime.ts b/src/lib/runtime.ts
index 73621ba..10634e9 100644
--- a/src/lib/runtime.ts
+++ b/src/lib/runtime.ts
@@ -80,6 +80,11 @@ interface CumoraBridge {
arm?: () => Promise<string>
onToken: (handler: (payload: { token: string; companyId: string | null }) => void) => () => void
}
+ /** Appearance preference → Electron `nativeTheme.themeSource` so
+ * `prefers-color-scheme` in the renderer matches the user's pick. */
+ theme?: {
+ set: (source: 'system' | 'light' | 'dark') => void
+ }
/** Auto-update bridge — ported from alma's pattern. Surfaces
* electron-updater status to the renderer so the React side can
* render the upgrade UI without polling. Unavailable in browser /
diff --git a/src/lib/theme.ts b/src/lib/theme.ts
new file mode 100644
index 0000000..b66f60c
--- /dev/null
+++ b/src/lib/theme.ts
@@ -0,0 +1,113 @@
+/**
+ * Appearance (light / dark / system) — per-device, like locale and the
+ * sound toggle.
+ *
+ * Dark mode is a CSS-variable remap (see globals.css): components keep
+ * talking in `ink` / `paper` / `cloud` / `sky2`, and `html.dark` swaps
+ * those tokens onto a One Dark Pro palette. No `dark:` variants, no
+ * per-component theme branches.
+ *
+ * Kept in localStorage rather than server preferences for the same
+ * reason locale is: a laptop at a bright desk and a phone in a dark
+ * room should be allowed to disagree. Default is `system` so a first
+ * run with no stored choice follows the OS.
+ */
+import { create } from 'zustand'
+
+export type Appearance = 'system' | 'light' | 'dark'
+export type ResolvedAppearance = 'light' | 'dark'
+
+const STORAGE_KEY = 'cumora.appearance'
+
+function isAppearance(v: string | null): v is Appearance {
+ return v === 'system' || v === 'light' || v === 'dark'
+}
+
+function prefersDark(): boolean {
+ if (typeof window === 'undefined') return false
+ return window.matchMedia('(prefers-color-scheme: dark)').matches
+}
+
+export function resolveAppearance(pref: Appearance): ResolvedAppearance {
+ if (pref === 'light' || pref === 'dark') return pref
+ return prefersDark() ? 'dark' : 'light'
+}
+
+function readInitialAppearance(): Appearance {
+ if (typeof window === 'undefined') return 'system'
+ try {
+ const raw = window.localStorage.getItem(STORAGE_KEY)
+ if (isAppearance(raw)) return raw
+ } catch {
+ /* private mode / storage disabled — fall through to system */
+ }
+ return 'system'
+}
+
+/**
+ * Paint `html.dark`, keep native chrome in step, and tell Electron's
+ * `nativeTheme` which source to follow so `prefers-color-scheme` in
+ * the renderer stays honest.
+ *
+ * `cumora:appearance` is the Capacitor status-bar hook — native.ts
+ * listens so this file doesn't import the plugin bundle.
+ */
+function syncDocumentAppearance(pref: Appearance, resolved: ResolvedAppearance): void {
+ if (typeof document === 'undefined') return
+ document.documentElement.classList.toggle('dark', resolved === 'dark')
+ const meta = document.querySelector('meta[name="theme-color"]')
+ if (meta) meta.setAttribute('content', resolved === 'dark' ? '#21252b' : '#00A8F0')
+ window.dispatchEvent(new CustomEvent('cumora:appearance', { detail: resolved }))
+ try { window.cumora?.theme?.set(pref) } catch { /* not Electron */ }
+}
+
+let media: MediaQueryList | null = null
+let mediaHandler: (() => void) | null = null
+
+function watchSystem(enabled: boolean, onChange: () => void): void {
+ if (typeof window === 'undefined') return
+ if (media && mediaHandler) {
+ media.removeEventListener('change', mediaHandler)
+ media = null
+ mediaHandler = null
+ }
+ if (!enabled) return
+ media = window.matchMedia('(prefers-color-scheme: dark)')
+ mediaHandler = onChange
+ media.addEventListener('change', onChange)
+}
+
+interface AppearanceState {
+ appearance: Appearance
+ resolved: ResolvedAppearance
+ setAppearance(next: Appearance): void
+}
+
+export const useAppearanceStore = create<AppearanceState>((set, get) => {
+ const initial = readInitialAppearance()
+ const resolved = resolveAppearance(initial)
+ syncDocumentAppearance(initial, resolved)
+ watchSystem(initial === 'system', () => {
+ const pref = get().appearance
+ if (pref !== 'system') return
+ const next = resolveAppearance('system')
+ set({ resolved: next })
+ syncDocumentAppearance(pref, next)
+ })
+ return {
+ appearance: initial,
+ resolved,
+ setAppearance(next) {
+ const resolvedNext = resolveAppearance(next)
+ set({ appearance: next, resolved: resolvedNext })
+ syncDocumentAppearance(next, resolvedNext)
+ watchSystem(next === 'system', () => {
+ if (get().appearance !== 'system') return
+ const fromOs = resolveAppearance('system')
+ set({ resolved: fromOs })
+ syncDocumentAppearance('system', fromOs)
+ })
+ try { window.localStorage.setItem(STORAGE_KEY, next) } catch { /* ignore */ }
+ },
+ }
+})
diff --git a/src/locales/en.ts b/src/locales/en.ts
index a195d7a..ed62d41 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -18,6 +18,11 @@ export const en = {
'common.language': 'Language',
'common.signOut': 'Sign out',
'common.languageSub': 'this device only · applies immediately',
+ 'common.appearance': 'Appearance',
+ 'common.appearanceSub': 'this device only · applies immediately',
+ 'common.appearance.system': 'System',
+ 'common.appearance.light': 'Light',
+ 'common.appearance.dark': 'Dark',
'common.titlebarTagline': '— where agent teams gather',
'common.daemonOutdatedTip': 'A computer daemon needs updating — open You',
'common.cancel': 'Cancel',
@@ -103,6 +108,7 @@ export const en = {
'me.prefs.humanInvites': 'Let agents add humans to groups',
'me.prefs.humanInvitesSub': 'with your consent each time',
'me.prefs.languageSection': 'Language',
+ 'me.prefs.appearanceSection': 'Appearance',
'me.prefs.skypeSection': 'Skype emoticons',
'me.prefs.skypeSounds': 'Play classic Skype sounds',
'me.prefs.skypeSoundsSub':
@@ -117,6 +123,7 @@ export const en = {
'mobileMe.push': 'Push notifications',
'mobileMe.preferences': 'Preferences',
'mobileMe.language': 'Language',
+ 'mobileMe.appearance': 'Appearance',
'mobileMe.quietWorkspace': 'A quiet workspace — no agents have joined yet.',
'mobileMe.quietSteward': 'A quiet workspace — invite some agents to get started.',
'mobileMe.steward': 'Steward of {parts}.',
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 733edf8..019cce6 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -24,6 +24,11 @@ export const zhCN: Partial<Record<keyof typeof en, string>> = {
'common.language': '语言',
'common.signOut': '退出登录',
'common.languageSub': '仅本设备 · 立即生效',
+ 'common.appearance': '外观',
+ 'common.appearanceSub': '仅本设备 · 立即生效',
+ 'common.appearance.system': '跟随系统',
+ 'common.appearance.light': '浅色',
+ 'common.appearance.dark': '深色',
'common.titlebarTagline': '—— 智能体团队的汇合地',
'common.daemonOutdatedTip': '某台计算机的守护进程需要更新——打开「我」',
'common.cancel': '取消',
@@ -108,6 +113,7 @@ export const zhCN: Partial<Record<keyof typeof en, string>> = {
'me.prefs.humanInvites': '允许智能体把人拉进群聊',
'me.prefs.humanInvitesSub': '每次都需要你同意',
'me.prefs.languageSection': '语言',
+ 'me.prefs.appearanceSection': '外观',
'me.prefs.skypeSection': 'Skype 表情',
'me.prefs.skypeSounds': '播放经典 Skype 音效',
'me.prefs.skypeSoundsSub': '仅本设备 · Skype 表情进入视野时播放一次;点击表情可重播',
@@ -121,6 +127,7 @@ export const zhCN: Partial<Record<keyof typeof en, string>> = {
'mobileMe.push': '推送通知',
'mobileMe.preferences': '偏好设置',
'mobileMe.language': '语言',
+ 'mobileMe.appearance': '外观',
'mobileMe.quietWorkspace': '工作区还很安静 —— 还没有智能体加入。',
'mobileMe.quietSteward': '工作区还很安静 —— 邀请几位智能体开始吧。',
'mobileMe.steward': '你照看着 {parts}。',
diff --git a/src/main.tsx b/src/main.tsx
index e55b411..f9f6dbb 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -7,6 +7,7 @@ import { initObservability } from './lib/observability'
import { isElectron } from './lib/runtime'
import { bootNative, isNativePlatform } from './lib/native'
import './styles/globals.css'
+import '@/lib/theme'
if (isElectron) document.body.classList.add('electron')
if (isNativePlatform()) document.body.classList.add('native', `native-${typeof window !== 'undefined' && (window as { Capacitor?: { getPlatform?: () => string } }).Capacitor?.getPlatform?.() || ''}`)
diff --git a/src/mobile/MobileChat.tsx b/src/mobile/MobileChat.tsx
index 2422d7e..5f57590 100644
--- a/src/mobile/MobileChat.tsx
+++ b/src/mobile/MobileChat.tsx
@@ -580,7 +580,7 @@ export function MobileChat() {
ref={streamRef}
className="flex-1 relative"
style={{
- background: 'radial-gradient(ellipse 80% 40% at 0% 0%, rgba(194, 230, 251, 0.3), transparent 60%), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 217, 210, 0.25), transparent 60%), var(--cloud)',
+ background: 'var(--chat-wash)',
}}
>
<Virtuoso
diff --git a/src/mobile/MobileChatList.tsx b/src/mobile/MobileChatList.tsx
index 941951b..a118528 100644
--- a/src/mobile/MobileChatList.tsx
+++ b/src/mobile/MobileChatList.tsx
@@ -207,8 +207,8 @@ function MobileRow({ c, onTap, onLongPress }: {
// Muted rows: keep the count visible (people still want
// to know there's unread) but switch to a grey chip —
// matches the "silent" affordance from the desktop pane.
- background: muted ? 'var(--ink-200)' : (isFresh ? 'var(--gold)' : 'var(--coral)'),
- color: muted ? 'var(--ink-700)' : (isFresh ? 'var(--ink-900)' : 'white'),
+ background: muted ? 'var(--ink-200)' : (isFresh ? 'var(--unread-fresh)' : 'var(--coral)'),
+ color: muted ? 'var(--ink-700)' : (isFresh ? 'var(--unread-fresh-fg)' : 'white'),
}}>{c.unread}</span>
)}
</div>
diff --git a/src/mobile/MobileMe.tsx b/src/mobile/MobileMe.tsx
index 647cabc..fe0707f 100644
--- a/src/mobile/MobileMe.tsx
+++ b/src/mobile/MobileMe.tsx
@@ -10,6 +10,7 @@ import { usePrefs } from '@/stores/preferences'
import { CompanySwitcher } from '@/components/CompanySwitcher'
import { getPushStatus, initPushNotifications, teardownPushNotifications, type PushStatus } from '@/lib/push'
import { api } from '@/api/client'
+import { AppearancePicker } from '@/components/AppearancePicker'
import { LanguagePicker } from '@/components/LanguagePicker'
import { translate, useLocale, useT, type MessageKey } from '@/lib/i18n'
import type { Participant } from '@/types'
@@ -213,6 +214,17 @@ export function MobileMe() {
</div>
</Section>
+ <Section title={t('mobileMe.appearance')}>
+ <div className="bg-cloud rounded-[12px] p-3.5 flex items-center gap-3"
+ style={{ border: '1px solid var(--ink-100)' }}>
+ <div className="flex-1 min-w-0">
+ <div className="font-semibold text-[13px] text-ink-900 leading-tight">{t('common.appearance')}</div>
+ <div className="font-display italic text-[11px] text-ink-500 mt-0.5">{t('common.appearanceSub')}</div>
+ </div>
+ <AppearancePicker className="w-[140px] shrink-0" />
+ </div>
+ </Section>
+
<div className="px-4 pt-2 pb-4 space-y-2">
<button
type="button"
diff --git a/src/mobile/MobileWhispers.tsx b/src/mobile/MobileWhispers.tsx
index 1f17954..bc951fa 100644
--- a/src/mobile/MobileWhispers.tsx
+++ b/src/mobile/MobileWhispers.tsx
@@ -335,7 +335,7 @@ export function MobileWhisperRoom({ pairId, onBack }: { pairId: string; onBack:
return (
<section className="flex flex-col h-full"
- style={{ background: 'radial-gradient(ellipse 80% 60% at 50% 0%, rgba(210, 201, 233, 0.45), transparent 60%), linear-gradient(180deg, #FBFAFE 0%, #F1ECF8 100%)' }}>
+ style={{ background: 'var(--chrome-whisper)' }}>
<header className="sticky top-0 z-10 backdrop-blur-md border-b border-whisper-100"
style={{ paddingTop: 'env(safe-area-inset-top)', background: 'rgba(251, 253, 251, 0.95)' }}>
<div className="px-2 py-2.5 flex items-center gap-2">
diff --git a/src/styles/globals.css b/src/styles/globals.css
index 07a3ded..8d5c47a 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -3,14 +3,57 @@
@tailwind utilities;
:root {
- --skype: #00A8F0;
- --skype-deep: #0078C8;
- --skype-ink: #003B6F;
- --sky-50: #F2FAFE;
- --sky-100: #E1F3FD;
- --sky-200: #C2E6FB;
- --sky-300: #8FD3F7;
- --sky-glow: #4FC2F4;
+ color-scheme: light;
+ /* RGB channels are the source of truth so Tailwind opacity modifiers
+ * (`bg-paper/60`) keep working. `--name` is the hex-equivalent used by
+ * inline `var(--ink-900)` styles. Dark mode only remaps the channels. */
+ --skype-rgb: 0 168 240;
+ --skype-deep-rgb: 0 120 200;
+ --skype-ink-rgb: 0 59 111;
+ --sky-50-rgb: 242 250 254;
+ --sky-100-rgb: 225 243 253;
+ --sky-200-rgb: 194 230 251;
+ --sky-300-rgb: 143 211 247;
+ --sky-glow-rgb: 79 194 244;
+ --coral-rgb: 255 122 107;
+ --coral-soft-rgb: 255 217 210;
+ --coral-deep-rgb: 200 78 63;
+ --gold-rgb: 244 183 64;
+ --gold-deep-rgb: 186 132 24;
+ /* Whisper accent — a refined dusty iris / wisteria purple. Clearly
+ * reads as PURPLE (not gray, not candy), more sophisticated than the
+ * original electric #7C5CFF candy violet. Sits as the "private /
+ * intimate" register opposite the brand sky-blue and the warm coral. */
+ --whisper-rgb: 123 108 176;
+ --whisper-deep-rgb: 78 63 140;
+ --whisper-50-rgb: 247 245 251;
+ --whisper-100-rgb: 236 231 245;
+ --whisper-200-rgb: 210 201 233;
+ --avail-rgb: 110 197 106;
+ --working-rgb: 244 183 64;
+ /* Thinking = agent is mid-compute / about to act. Sits in the same
+ * purple register as --whisper but a touch more saturated so the small
+ * status dot still reads ACTIVE (not the muted resting gray). */
+ --thinking-rgb: 138 120 200;
+ --waiting-rgb: 255 122 107;
+ --resting-rgb: 184 196 209;
+ --ink-900-rgb: 10 27 46;
+ --ink-700-rgb: 35 58 83;
+ --ink-500-rgb: 91 113 134;
+ --ink-300-rgb: 148 168 188;
+ --ink-200-rgb: 197 210 222;
+ --ink-100-rgb: 229 236 242;
+ --paper-rgb: 250 252 254;
+ --cloud-rgb: 255 255 255;
+
+ --skype: rgb(var(--skype-rgb));
+ --skype-deep: rgb(var(--skype-deep-rgb));
+ --skype-ink: rgb(var(--skype-ink-rgb));
+ --sky-50: rgb(var(--sky-50-rgb));
+ --sky-100: rgb(var(--sky-100-rgb));
+ --sky-200: rgb(var(--sky-200-rgb));
+ --sky-300: rgb(var(--sky-300-rgb));
+ --sky-glow: rgb(var(--sky-glow-rgb));
/* Aliases matching the Tailwind palette name ("sky2"). Components refer to
* both spellings; an undefined var() here doesn't just miss a color — it
* invalidates the whole shorthand it appears in (a `border: 1.5px solid
@@ -20,36 +63,59 @@
--sky2-200: var(--sky-200);
--sky2-300: var(--sky-300);
--sky2-glow: var(--sky-glow);
- --coral: #FF7A6B;
- --coral-soft: #FFD9D2;
- --coral-deep: #C84E3F;
- --gold: #F4B740;
- --gold-deep: #BA8418;
- /* Whisper accent — a refined dusty iris / wisteria purple. Clearly
- * reads as PURPLE (not gray, not candy), more sophisticated than the
- * original electric #7C5CFF candy violet. Sits as the "private /
- * intimate" register opposite the brand sky-blue and the warm coral. */
- --whisper: #7B6CB0;
- --whisper-deep: #4E3F8C;
- --whisper-50: #F7F5FB;
- --whisper-100: #ECE7F5;
- --whisper-200: #D2C9E9;
- --avail: #6EC56A;
- --working: #F4B740;
- /* Thinking = agent is mid-compute / about to act. Sits in the same
- * purple register as --whisper but a touch more saturated so the small
- * status dot still reads ACTIVE (not the muted resting gray). */
- --thinking: #8A78C8;
- --waiting: #FF7A6B;
- --resting: #B8C4D1;
- --ink-900: #0A1B2E;
- --ink-700: #233A53;
- --ink-500: #5B7186;
- --ink-300: #94A8BC;
- --ink-200: #C5D2DE;
- --ink-100: #E5ECF2;
- --paper: #FAFCFE;
- --cloud: #FFFFFF;
+ --coral: rgb(var(--coral-rgb));
+ --coral-soft: rgb(var(--coral-soft-rgb));
+ --coral-deep: rgb(var(--coral-deep-rgb));
+ --gold: rgb(var(--gold-rgb));
+ --gold-deep: rgb(var(--gold-deep-rgb));
+ --whisper: rgb(var(--whisper-rgb));
+ --whisper-deep: rgb(var(--whisper-deep-rgb));
+ --whisper-50: rgb(var(--whisper-50-rgb));
+ --whisper-100: rgb(var(--whisper-100-rgb));
+ --whisper-200: rgb(var(--whisper-200-rgb));
+ --avail: rgb(var(--avail-rgb));
+ --working: rgb(var(--working-rgb));
+ --thinking: rgb(var(--thinking-rgb));
+ --waiting: rgb(var(--waiting-rgb));
+ --resting: rgb(var(--resting-rgb));
+ --ink-900: rgb(var(--ink-900-rgb));
+ --ink-700: rgb(var(--ink-700-rgb));
+ --ink-500: rgb(var(--ink-500-rgb));
+ --ink-300: rgb(var(--ink-300-rgb));
+ --ink-200: rgb(var(--ink-200-rgb));
+ --ink-100: rgb(var(--ink-100-rgb));
+ --paper: rgb(var(--paper-rgb));
+ --cloud: rgb(var(--cloud-rgb));
+
+ /* Chrome washes used by the rail, titlebar, and side drawers. Dark
+ * mode collapses them to the paper surface so they don't stay a
+ * frozen light-blue gradient. */
+ --chrome: linear-gradient(180deg, #FBFDFF 0%, #F1F7FB 100%);
+ --chrome-rail: linear-gradient(180deg, #F8FBFD, #EDF4F9);
+ --chrome-pane: linear-gradient(180deg, #FBFDFE, #F4F8FC);
+ --chrome-whisper: linear-gradient(180deg, #FBFAFE, #EFE9F7);
+ --chrome-warm: linear-gradient(180deg, #FBF8F0, #F4EEDD);
+ --chrome-warm-rule: rgba(120, 110, 95, 0.25);
+ --chrome-warm-rule-soft: rgba(120, 110, 95, 0.18);
+ --chrome-warm-icon: #7A6A3F;
+ --chrome-warm-shadow: -12px 0 32px -10px rgba(60, 50, 30, 0.18);
+ --email-backdrop: rgb(var(--ink-900-rgb) / 0.15);
+ --email-muted: rgb(var(--ink-300-rgb));
+ --select-face: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 253, 0.94));
+ --select-shadow: 0 1px 0 rgba(255, 255, 255, 0.92) inset, 0 10px 24px -24px rgba(26, 78, 120, 0.55);
+ --select-menu-shadow: 0 22px 55px -24px rgba(10, 30, 60, 0.38), 0 8px 18px -12px rgba(10, 30, 60, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
+ --select-menu-border: rgb(var(--sky-100-rgb));
+ /* Chat surface atmosphere + a few chrome pieces that were frozen as
+ * light RGBA. Dark remaps these; light stays pixel-identical. */
+ --chat-wash: radial-gradient(ellipse 80% 40% at 0% 0%, rgba(194, 230, 251, 0.3), transparent 60%), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 217, 210, 0.25), transparent 60%), var(--cloud);
+ --whispers-wash: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(210, 201, 233, 0.30), transparent 60%), linear-gradient(180deg, var(--paper) 0%, var(--whisper-50) 100%);
+ --whisper-room-wash: radial-gradient(ellipse 70% 50% at 0% 0%, rgba(210, 201, 233, 0.28), transparent 60%), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 217, 210, 0.18), transparent 60%), var(--paper);
+ --error-card: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 217, 210, 0.18));
+ --error-card-border: 1px solid rgba(255, 122, 107, 0.18);
+ --error-card-shadow: 0 12px 32px -16px rgba(200, 78, 63, 0.25);
+ --error-icon-bg: rgba(255, 122, 107, 0.12);
+ --unread-fresh: rgb(var(--gold-rgb));
+ --unread-fresh-fg: rgb(var(--ink-900-rgb));
--safe-top: env(safe-area-inset-top);
--safe-bottom: env(safe-area-inset-bottom);
@@ -61,6 +127,71 @@
--kb-height: 0px;
}
+/* Dark palette is One Dark Pro's editor chrome (Atom / VS Code), mapped
+ * onto Cumora's existing token names so `bg-paper` / `text-ink-900` /
+ * `border-ink-100` flip without a `dark:` variant on every component.
+ * Accents (skype / coral / gold / whisper) become the One Dark syntax
+ * hues so status dots and brand buttons still read, just on a cooler
+ * ground. */
+html.dark {
+ color-scheme: dark;
+ --skype-rgb: 97 175 239;
+ --skype-deep-rgb: 82 139 255;
+ --skype-ink-rgb: 171 178 191;
+ --sky-50-rgb: 44 49 60;
+ --sky-100-rgb: 49 54 64;
+ --sky-200-rgb: 62 68 81;
+ --sky-300-rgb: 75 82 99;
+ --sky-glow-rgb: 97 175 239;
+ --coral-rgb: 224 108 117;
+ --coral-soft-rgb: 61 42 46;
+ --coral-deep-rgb: 224 108 117;
+ --gold-rgb: 229 192 123;
+ --gold-deep-rgb: 209 154 102;
+ --whisper-rgb: 198 120 221;
+ --whisper-deep-rgb: 198 120 221;
+ --whisper-50-rgb: 47 42 56;
+ --whisper-100-rgb: 53 45 64;
+ --whisper-200-rgb: 74 61 92;
+ --avail-rgb: 152 195 121;
+ --working-rgb: 229 192 123;
+ --thinking-rgb: 198 120 221;
+ --waiting-rgb: 224 108 117;
+ --resting-rgb: 92 99 112;
+ --ink-900-rgb: 171 178 191;
+ --ink-700-rgb: 157 165 180;
+ --ink-500-rgb: 127 132 142;
+ --ink-300-rgb: 92 99 112;
+ --ink-200-rgb: 62 68 81;
+ --ink-100-rgb: 44 49 60;
+ --paper-rgb: 33 37 43;
+ --cloud-rgb: 40 44 52;
+ --chrome: rgb(var(--paper-rgb));
+ --chrome-rail: rgb(var(--paper-rgb));
+ --chrome-pane: rgb(var(--paper-rgb));
+ --chrome-whisper: rgb(var(--whisper-50-rgb));
+ --chrome-warm: rgb(var(--paper-rgb));
+ --chrome-warm-rule: rgb(var(--ink-200-rgb));
+ --chrome-warm-rule-soft: rgb(var(--ink-100-rgb));
+ --chrome-warm-icon: rgb(var(--gold-rgb));
+ --chrome-warm-shadow: -12px 0 32px -10px rgba(0, 0, 0, 0.5);
+ --email-backdrop: rgb(0 0 0 / 0.5);
+ --email-muted: rgb(var(--ink-500-rgb));
+ --select-face: none;
+ --select-shadow: 0 0 #0000;
+ --select-menu-shadow: 0 22px 55px -24px rgba(0, 0, 0, 0.55), 0 8px 18px -12px rgba(0, 0, 0, 0.35);
+ --select-menu-border: rgb(var(--ink-200-rgb));
+ --chat-wash: rgb(var(--cloud-rgb));
+ --whispers-wash: rgb(var(--cloud-rgb));
+ --whisper-room-wash: rgb(var(--paper-rgb));
+ --error-card: rgb(var(--sky-50-rgb));
+ --error-card-border: 1px solid rgb(var(--ink-200-rgb));
+ --error-card-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.55);
+ --error-icon-bg: rgba(224, 108, 117, 0.18);
+ --unread-fresh: rgb(var(--gold-deep-rgb));
+ --unread-fresh-fg: #21252b;
+}
+
/* Native-shell tweaks (iOS / Android Capacitor builds). main.tsx adds
the `.native` class to <body> when the Capacitor bridge is present;
pure CSS, no impact on the web bundle.
@@ -236,6 +367,14 @@ body {
50% { transform: translate(60px, 30px); }
}
+html.dark body:not(.electron) {
+ background: var(--paper);
+}
+html.dark body:not(.electron)::before,
+html.dark body:not(.electron)::after {
+ display: none;
+}
+
/* Toast auto-dismiss progress bar — drains right-to-left over the toast's
* lifetime. Used by NotificationToasts; the toast pauses the animation on
* hover so the user gets time to read longer messages. */
@@ -361,8 +500,9 @@ body {
/* ─── Cumora code-block syntax theme ─────────────────────────────────────
* Token colors mapped onto the brand palette (sky / coral / gold / wisteria
* / ink) so highlighted code never visually fights the surrounding chat.
- * Used by `<CodeBlock>` in Message.tsx. Designed for a light paper-toned
- * panel; if we ever ship a dark variant we'll need a separate selector.
+ * Used by `<CodeBlock>` in Message.tsx. Light: paper-toned. Dark: One
+ * Dark Pro roles (purple keywords, green strings, blue functions) so a
+ * fenced block reads like the editor the palette came from.
*/
.cumora-code, .cumora-code code { color: var(--ink-700); }
.cumora-code .hljs-keyword,
@@ -403,6 +543,44 @@ body {
.cumora-code .hljs-addition { background: rgba(110, 197, 106, 0.12); color: #2D6F2A; }
.cumora-code .hljs-deletion { background: rgba(255, 122, 107, 0.12); color: var(--coral-deep); }
+html.dark .cumora-code,
+html.dark .cumora-code code { color: #abb2bf; }
+html.dark .cumora-code .hljs-keyword,
+html.dark .cumora-code .hljs-selector-tag,
+html.dark .cumora-code .hljs-tag,
+html.dark .cumora-code .hljs-name { color: #c678dd; font-weight: 600; }
+html.dark .cumora-code .hljs-built_in { color: #56b6c2; font-weight: 600; }
+html.dark .cumora-code .hljs-literal { color: #d19a66; font-weight: 600; }
+html.dark .cumora-code .hljs-string,
+html.dark .cumora-code .hljs-regexp,
+html.dark .cumora-code .hljs-symbol,
+html.dark .cumora-code .hljs-template-tag,
+html.dark .cumora-code .hljs-template-variable { color: #98c379; }
+html.dark .cumora-code .hljs-number,
+html.dark .cumora-code .hljs-attr,
+html.dark .cumora-code .hljs-attribute { color: #d19a66; }
+html.dark .cumora-code .hljs-title,
+html.dark .cumora-code .hljs-title.class_,
+html.dark .cumora-code .hljs-title.function_,
+html.dark .cumora-code .hljs-class .hljs-title,
+html.dark .cumora-code .hljs-function .hljs-title,
+html.dark .cumora-code .hljs-type,
+html.dark .cumora-code .hljs-section { color: #61afef; font-weight: 600; }
+html.dark .cumora-code .hljs-comment,
+html.dark .cumora-code .hljs-quote { color: #5c6370; font-style: italic; }
+html.dark .cumora-code .hljs-meta,
+html.dark .cumora-code .hljs-meta .hljs-keyword,
+html.dark .cumora-code .hljs-doctag { color: #5c6370; }
+html.dark .cumora-code .hljs-variable,
+html.dark .cumora-code .hljs-property,
+html.dark .cumora-code .hljs-params { color: #e06c75; }
+html.dark .cumora-code .hljs-operator,
+html.dark .cumora-code .hljs-punctuation { color: #abb2bf; }
+html.dark .cumora-code .hljs-bullet,
+html.dark .cumora-code .hljs-link { color: #61afef; }
+html.dark .cumora-code .hljs-addition { background: rgba(152, 195, 121, 0.15); color: #98c379; }
+html.dark .cumora-code .hljs-deletion { background: rgba(224, 108, 117, 0.15); color: #e06c75; }
+
/* Scrollbars */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
diff --git a/src/web/WebShell.tsx b/src/web/WebShell.tsx
index 47b2ced..d57415d 100644
--- a/src/web/WebShell.tsx
+++ b/src/web/WebShell.tsx
@@ -143,7 +143,7 @@ function WebLanding() {
type="button"
onClick={() => go('google')}
disabled={busy !== null}
- className="h-11 rounded-[10px] border border-ink-200 bg-white hover:bg-cloud transition-colors flex items-center justify-center gap-3 text-[14px] text-ink-800 disabled:opacity-60"
+ className="h-11 rounded-[10px] border border-ink-100 bg-cloud hover:bg-sky2-50 text-ink-900 transition-colors flex items-center justify-center gap-3 text-[14px] font-medium disabled:opacity-60"
>
<GoogleMark />
{busy === 'google' ? t('auth.redirecting') : t('auth.continueWithGoogle')}
diff --git a/tailwind.config.ts b/tailwind.config.ts
index d2023e9..25eb7e1 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,53 +1,58 @@
import type { Config } from 'tailwindcss'
+/** Tailwind color that tracks a CSS `--name-rgb` channel token so
+ * opacity modifiers (`bg-paper/60`) and `html.dark` remaps both work. */
+const rgb = (token: string) => `rgb(var(${token}) / <alpha-value>)`
+
const config: Config = {
+ darkMode: 'class',
content: ['./index.html', './src/**/*.{ts,tsx}'],
theme: {
extend: {
colors: {
skype: {
- DEFAULT: '#00A8F0',
- deep: '#0078C8',
- ink: '#003B6F',
+ DEFAULT: rgb('--skype-rgb'),
+ deep: rgb('--skype-deep-rgb'),
+ ink: rgb('--skype-ink-rgb'),
},
sky2: {
- 50: '#F2FAFE',
- 100: '#E1F3FD',
- 200: '#C2E6FB',
- 300: '#8FD3F7',
- glow: '#4FC2F4',
+ 50: rgb('--sky-50-rgb'),
+ 100: rgb('--sky-100-rgb'),
+ 200: rgb('--sky-200-rgb'),
+ 300: rgb('--sky-300-rgb'),
+ glow: rgb('--sky-glow-rgb'),
},
coral: {
- DEFAULT: '#FF7A6B',
- soft: '#FFD9D2',
- deep: '#C84E3F',
+ DEFAULT: rgb('--coral-rgb'),
+ soft: rgb('--coral-soft-rgb'),
+ deep: rgb('--coral-deep-rgb'),
},
gold: {
- DEFAULT: '#F4B740',
- deep: '#BA8418',
+ DEFAULT: rgb('--gold-rgb'),
+ deep: rgb('--gold-deep-rgb'),
},
whisper: {
- DEFAULT: '#7C5CFF',
- deep: '#4A2D9E',
- 50: '#F6F3FF',
- 100: '#ECE5FF',
- 200: '#D9CCFF',
+ DEFAULT: rgb('--whisper-rgb'),
+ deep: rgb('--whisper-deep-rgb'),
+ 50: rgb('--whisper-50-rgb'),
+ 100: rgb('--whisper-100-rgb'),
+ 200: rgb('--whisper-200-rgb'),
},
ink: {
- 900: '#0A1B2E',
- 700: '#233A53',
- 500: '#5B7186',
- 300: '#94A8BC',
- 200: '#C5D2DE',
- 100: '#E5ECF2',
+ 900: rgb('--ink-900-rgb'),
+ 700: rgb('--ink-700-rgb'),
+ 500: rgb('--ink-500-rgb'),
+ 300: rgb('--ink-300-rgb'),
+ 200: rgb('--ink-200-rgb'),
+ 100: rgb('--ink-100-rgb'),
},
- cloud: '#FFFFFF',
- paper: '#FAFCFE',
- avail: '#6EC56A',
- working: '#F4B740',
- thinking: '#7C5CFF',
- waiting: '#FF7A6B',
- resting: '#B8C4D1',
+ cloud: rgb('--cloud-rgb'),
+ paper: rgb('--paper-rgb'),
+ avail: rgb('--avail-rgb'),
+ working: rgb('--working-rgb'),
+ thinking: rgb('--thinking-rgb'),
+ waiting: rgb('--waiting-rgb'),
+ resting: rgb('--resting-rgb'),
},
fontFamily: {
display: ['Manrope', 'system-ui', '-apple-system', 'sans-serif'],