From 1ad8551416c879be13ea0d51ad1a6f5c97a0debe Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 23 Nov 2026 07:17:41 -0600 Subject: [PATCH 01/22] feat(theme): dark-first theme with dark/light/system choice Default to dark, add a "Match system" option that follows the OS live, and refine dark surfaces (near-black base, clearer elevation, translucent borders). Bundle Inter as the UI font. Theme picker is a radio group shared by the titlebar menu, which also gains a rail placement. Refs #154 Co-Authored-By: Claude Opus 5.5 --- index.html | 2 +- package.json | 1 + pnpm-lock.yaml | 8 ++ .../components/custom/command-palette.tsx | 4 +- src/renderer/components/custom/providers.tsx | 46 ++++------ src/renderer/components/custom/theme-menu.tsx | 32 +++++++ .../components/custom/titlebar-menu.tsx | 89 +++++++++++++------ src/renderer/hooks/use-theme-store.ts | 59 +++++++++--- src/renderer/i18n/locales/de.ts | 2 + src/renderer/i18n/locales/en.ts | 2 + src/renderer/i18n/locales/es.ts | 2 + src/renderer/i18n/locales/fr.ts | 2 + src/renderer/i18n/locales/ja.ts | 2 + src/renderer/i18n/locales/ko.ts | 2 + src/renderer/i18n/locales/pt.ts | 2 + src/renderer/i18n/locales/ru.ts | 2 + src/renderer/i18n/locales/zh.ts | 2 + src/renderer/index.css | 72 ++++++++++----- 18 files changed, 241 insertions(+), 90 deletions(-) create mode 100644 src/renderer/components/custom/theme-menu.tsx diff --git a/index.html b/index.html index e35c811a..936c2da1 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + diff --git a/package.json b/package.json index 0925a272..202c4702 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "start": "pnpm electron:dev-hide" }, "dependencies": { + "@fontsource-variable/inter": "^5.3.0", "@mohtasham/md-to-docx": "^2.6.1", "@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-dialog": "^1.1.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33bf5464..f85ccc9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@fontsource-variable/inter': + specifier: ^5.3.0 + version: 5.3.0 '@mohtasham/md-to-docx': specifier: ^2.6.1 version: 2.6.1 @@ -527,6 +530,9 @@ packages: '@floating-ui/utils@0.2.11': resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==} + '@fontsource-variable/inter@5.3.0': + resolution: {integrity: sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA==} + '@hapi/address@5.1.1': resolution: {integrity: sha512-A+po2d/dVoY7cYajycYI43ZbYMXukuopIsqCjh5QzsBCipDtdofHntljDlpccMjIfTy6UOkg+5KPriwYch2bXA==} engines: {node: '>=14.0.0'} @@ -4553,6 +4559,8 @@ snapshots: '@floating-ui/utils@0.2.11': {} + '@fontsource-variable/inter@5.3.0': {} + '@hapi/address@5.1.1': dependencies: '@hapi/hoek': 11.0.7 diff --git a/src/renderer/components/custom/command-palette.tsx b/src/renderer/components/custom/command-palette.tsx index c333402a..c14e33ef 100644 --- a/src/renderer/components/custom/command-palette.tsx +++ b/src/renderer/components/custom/command-palette.tsx @@ -87,7 +87,7 @@ export function CommandPalette() { const { confirmDiscard } = useSaveHistoryGuard(); const { hintOnly, toggle: toggleSuggestionMode } = useSuggestionMode(); const { visible: transcriptVisible, toggle: toggleTranscript } = useTranscriptPanel(); - const { isDark, toggleTheme } = useThemeStore(); + const { isDark, setPreference } = useThemeStore(); const [isHotkeysOpen, setIsHotkeysOpen] = useState(false); @@ -220,7 +220,7 @@ export function CommandPalette() { {t.commandPalette.hotkeys} - run(toggleTheme)}> + run(() => setPreference(isDark ? 'light' : 'dark'))}> {isDark ? : } {isDark ? t.commandPalette.switchToLight : t.commandPalette.switchToDark} diff --git a/src/renderer/components/custom/providers.tsx b/src/renderer/components/custom/providers.tsx index 6c32cd6a..032ee363 100644 --- a/src/renderer/components/custom/providers.tsx +++ b/src/renderer/components/custom/providers.tsx @@ -1,45 +1,35 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useEffect, useState } from 'react'; -import { useThemeStore } from '@/hooks/use-theme-store'; +import { THEME_STORAGE_KEY, useThemeStore } from '@/hooks/use-theme-store'; import { Toaster } from '../ui/sonner'; // Note: `useAppState` is now a standalone hook; no provider is needed. function ThemeProvider({ children }: { children: React.ReactNode }) { - const { theme, setTheme } = useThemeStore(); - const [initialized, setInitialized] = useState(false); + const preference = useThemeStore((s) => s.preference); + const theme = useThemeStore((s) => s.theme); + const setSystemTheme = useThemeStore((s) => s.setSystemTheme); useEffect(() => { - const stored = localStorage.getItem('theme'); - const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; + document.documentElement.classList.toggle('dark', theme === 'dark'); + }, [theme]); - const initialTheme = stored === 'dark' || (!stored && prefersDark) ? 'dark' : 'light'; - - if (initialTheme === 'dark') { - document.documentElement.classList.add('dark'); - } else { - document.documentElement.classList.remove('dark'); + useEffect(() => { + try { + localStorage.setItem(THEME_STORAGE_KEY, preference); + } catch { + // Storage unavailable - the choice lasts for this session only. } + }, [preference]); - // Queue state updates to avoid cascading renders - Promise.resolve().then(() => { - setTheme(initialTheme); - setInitialized(true); - }); - }, [setTheme]); - + // Live, so `system` follows the OS switching to dark at sunset without a relaunch. useEffect(() => { - if (!initialized) return; - - if (theme === 'dark') { - document.documentElement.classList.add('dark'); - localStorage.setItem('theme', 'dark'); - } else { - document.documentElement.classList.remove('dark'); - localStorage.setItem('theme', 'light'); - } - }, [theme, initialized]); + const query = window.matchMedia('(prefers-color-scheme: dark)'); + const onChange = (e: MediaQueryListEvent) => setSystemTheme(e.matches ? 'dark' : 'light'); + query.addEventListener('change', onChange); + return () => query.removeEventListener('change', onChange); + }, [setSystemTheme]); return (
diff --git a/src/renderer/components/custom/theme-menu.tsx b/src/renderer/components/custom/theme-menu.tsx new file mode 100644 index 00000000..924264e3 --- /dev/null +++ b/src/renderer/components/custom/theme-menu.tsx @@ -0,0 +1,32 @@ +import { Monitor, Moon, Sun } from 'lucide-react'; + +import { DropdownMenuRadioGroup, DropdownMenuRadioItem } from '@/components/ui/dropdown-menu'; +import { type ThemePreference, useThemeStore } from '@/hooks/use-theme-store'; +import { useT } from '@/i18n'; + +/** The three theme choices as a radio group, for whichever dropdown hosts them. */ +export function ThemeRadioItems() { + const t = useT(); + const preference = useThemeStore((s) => s.preference); + const setPreference = useThemeStore((s) => s.setPreference); + + const options: { value: ThemePreference; label: string; icon: typeof Sun }[] = [ + { value: 'dark', label: t.titlebarMenu.darkMode, icon: Moon }, + { value: 'light', label: t.titlebarMenu.lightMode, icon: Sun }, + { value: 'system', label: t.titlebarMenu.systemMode, icon: Monitor }, + ]; + + return ( + setPreference(v as ThemePreference)} + > + {options.map(({ value, label, icon: Icon }) => ( + + + ))} + + ); +} diff --git a/src/renderer/components/custom/titlebar-menu.tsx b/src/renderer/components/custom/titlebar-menu.tsx index 2e90e46b..fe2cbf0d 100644 --- a/src/renderer/components/custom/titlebar-menu.tsx +++ b/src/renderer/components/custom/titlebar-menu.tsx @@ -5,9 +5,8 @@ import { LogOut, Mail, Menu, - Moon, + Palette, SettingsIcon, - Sun, UserRound, } from 'lucide-react'; import React from 'react'; @@ -33,24 +32,35 @@ import useAuth from '@/hooks/use-auth'; import { useConfigStore } from '@/hooks/use-config-store'; import { useInterviewLock } from '@/hooks/use-interview-lock'; import { useSaveHistoryGuard } from '@/hooks/use-save-history-guard'; -import { useThemeStore } from '@/hooks/use-theme-store'; import { useUiLanguage } from '@/hooks/use-ui-language'; import { useT } from '@/i18n'; +import { cn } from '@/lib/utils'; import { UI_LANGUAGES, type UiLanguage } from '@/types/ui-language'; +import { ThemeRadioItems } from './theme-menu'; + interface TitlebarMenuProps { style?: React.CSSProperties; /** Closed for the length of an interview - see the trigger's own note in `titlebar.tsx`. */ disabled?: boolean; + /** + * `rail` is the account button at the foot of the navigation rail: an avatar trigger, opening + * to the right, without the destinations the rail itself already lists. + */ + placement?: 'titlebar' | 'rail'; } -export default function TitlebarMenu({ style, disabled: closed = false }: TitlebarMenuProps) { +export default function TitlebarMenu({ + style, + disabled: closed = false, + placement = 'titlebar', +}: TitlebarMenuProps) { + const inRail = placement === 'rail'; const t = useT(); const navigate = useNavigate(); const location = useLocation(); const { appState } = useAppState(); const { config } = useConfigStore(); - const { isDark, toggleTheme } = useThemeStore(); const { uiLanguage, setUiLanguage } = useUiLanguage(); const { logout } = useAuth(); const { confirmDiscard } = useSaveHistoryGuard(); @@ -73,6 +83,10 @@ export default function TitlebarMenu({ style, disabled: closed = false }: Titleb // ordinary page the user chose to open, and taking their navigation away there would be the // menu breaking rather than the menu declining to lie. const inSetup = location.pathname === '/onboarding' && !(appState?.onboardingCompleted ?? false); + const email = appState?.accountEmail || config?.email; + const initial = (appState?.interviewConfig?.fullName?.trim() || email || '?') + .charAt(0) + .toUpperCase(); const handleSignOut = async () => { // Asked for the same reason Clear, Start, Stop and closing the app ask: signing out drops the @@ -99,29 +113,43 @@ export default function TitlebarMenu({ style, disabled: closed = false }: Titleb - + {inRail ? ( + + ) : ( + + )} - -

{closed ? t.titlebar.unavailableDuringInterview : t.titlebar.menu}

+ +

{closed ? t.titlebar.unavailableDuringInterview : inRail ? email : t.titlebar.menu}

- + {isLoggedIn && ( <> - {appState?.accountEmail || config?.email} + {email} - {!inSetup && ( + {!inSetup && !inRail && ( <> navigate('/')}> @@ -176,15 +204,24 @@ export default function TitlebarMenu({ style, disabled: closed = false }: Titleb - toggleTheme()}> - {isDark ? : } - {isDark ? t.titlebarMenu.lightMode : t.titlebarMenu.darkMode} - - - navigate('/documentation')}> - - {t.titlebarMenu.documentation} - + + + + {t.titlebarMenu.theme} + + + + + + {!inRail && ( + <> + + navigate('/documentation')}> + + {t.titlebarMenu.documentation} + + + )} {isLoggedIn && ( <> diff --git a/src/renderer/hooks/use-theme-store.ts b/src/renderer/hooks/use-theme-store.ts index 55b847c1..e0abb032 100644 --- a/src/renderer/hooks/use-theme-store.ts +++ b/src/renderer/hooks/use-theme-store.ts @@ -1,21 +1,56 @@ import { create } from 'zustand'; -type Theme = 'light' | 'dark'; +export type ThemePreference = 'light' | 'dark' | 'system'; +type ResolvedTheme = 'light' | 'dark'; interface ThemeStore { - theme: Theme; + /** What the user picked. */ + preference: ThemePreference; + /** What is actually painted - `system` resolved against the OS setting. */ + theme: ResolvedTheme; isDark: boolean; - setTheme: (theme: Theme) => void; - toggleTheme: () => void; + setPreference: (preference: ThemePreference) => void; + /** Follows an OS appearance change; a no-op unless the preference is `system`. */ + setSystemTheme: (system: ResolvedTheme) => void; } +export const THEME_STORAGE_KEY = 'theme'; + +export function systemTheme(): ResolvedTheme { + return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; +} + +/** + * Dark unless the user chose otherwise: the app sits beside a video call, usually over a dark + * meeting window, where a white panel is the brightest thing on the screen. + */ +export function readStoredPreference(): ThemePreference { + try { + const stored = localStorage.getItem(THEME_STORAGE_KEY); + if (stored === 'light' || stored === 'dark' || stored === 'system') return stored; + } catch { + // Storage unavailable - fall through to the default. + } + return 'dark'; +} + +function resolve(preference: ThemePreference): ResolvedTheme { + return preference === 'system' ? systemTheme() : preference; +} + +const initialPreference = readStoredPreference(); +const initialTheme = resolve(initialPreference); + export const useThemeStore = create((set) => ({ - theme: 'light', - isDark: false, - setTheme: (theme) => set({ theme, isDark: theme === 'dark' }), - toggleTheme: () => - set((state) => { - const newTheme = state.theme === 'light' ? 'dark' : 'light'; - return { theme: newTheme, isDark: newTheme === 'dark' }; - }), + preference: initialPreference, + theme: initialTheme, + isDark: initialTheme === 'dark', + setPreference: (preference) => { + const theme = resolve(preference); + set({ preference, theme, isDark: theme === 'dark' }); + }, + setSystemTheme: (system) => + set((state) => + state.preference === 'system' ? { theme: system, isDark: system === 'dark' } : state + ), })); diff --git a/src/renderer/i18n/locales/de.ts b/src/renderer/i18n/locales/de.ts index a1a1a84b..b9b68d30 100644 --- a/src/renderer/i18n/locales/de.ts +++ b/src/renderer/i18n/locales/de.ts @@ -464,6 +464,8 @@ export const de: Translation = { language: 'App-Sprache', lightMode: 'Heller Modus', darkMode: 'Dunkler Modus', + theme: 'Erscheinungsbild', + systemMode: 'Systemeinstellung', signOut: 'Abmelden', }, diff --git a/src/renderer/i18n/locales/en.ts b/src/renderer/i18n/locales/en.ts index 5ab22099..4aa9b137 100644 --- a/src/renderer/i18n/locales/en.ts +++ b/src/renderer/i18n/locales/en.ts @@ -467,6 +467,8 @@ export const en = { language: 'App language', lightMode: 'Light mode', darkMode: 'Dark mode', + theme: 'Theme', + systemMode: 'Match system', signOut: 'Sign out', }, diff --git a/src/renderer/i18n/locales/es.ts b/src/renderer/i18n/locales/es.ts index 773d1543..9d243ff6 100644 --- a/src/renderer/i18n/locales/es.ts +++ b/src/renderer/i18n/locales/es.ts @@ -460,6 +460,8 @@ export const es: Translation = { language: 'Idioma de la aplicación', lightMode: 'Modo claro', darkMode: 'Modo oscuro', + theme: 'Tema', + systemMode: 'Según el sistema', signOut: 'Cerrar sesión', }, diff --git a/src/renderer/i18n/locales/fr.ts b/src/renderer/i18n/locales/fr.ts index 8b7501c9..db8ea8fc 100644 --- a/src/renderer/i18n/locales/fr.ts +++ b/src/renderer/i18n/locales/fr.ts @@ -466,6 +466,8 @@ export const fr: Translation = { language: 'Langue de l’application', lightMode: 'Mode clair', darkMode: 'Mode sombre', + theme: 'Thème', + systemMode: 'Selon le système', signOut: 'Se déconnecter', }, diff --git a/src/renderer/i18n/locales/ja.ts b/src/renderer/i18n/locales/ja.ts index 64150853..85b39f35 100644 --- a/src/renderer/i18n/locales/ja.ts +++ b/src/renderer/i18n/locales/ja.ts @@ -451,6 +451,8 @@ export const ja: Translation = { language: 'アプリの言語', lightMode: 'ライトモード', darkMode: 'ダークモード', + theme: 'テーマ', + systemMode: 'システムに合わせる', signOut: 'ログアウト', }, diff --git a/src/renderer/i18n/locales/ko.ts b/src/renderer/i18n/locales/ko.ts index fb0e3115..3c6dfc28 100644 --- a/src/renderer/i18n/locales/ko.ts +++ b/src/renderer/i18n/locales/ko.ts @@ -440,6 +440,8 @@ export const ko: Translation = { language: '앱 언어', lightMode: '라이트 모드', darkMode: '다크 모드', + theme: '테마', + systemMode: '시스템 설정 따르기', signOut: '로그아웃', }, diff --git a/src/renderer/i18n/locales/pt.ts b/src/renderer/i18n/locales/pt.ts index efd88400..92cc6e2a 100644 --- a/src/renderer/i18n/locales/pt.ts +++ b/src/renderer/i18n/locales/pt.ts @@ -447,6 +447,8 @@ export const pt: Translation = { language: 'Idioma do app', lightMode: 'Modo claro', darkMode: 'Modo escuro', + theme: 'Tema', + systemMode: 'Seguir o sistema', signOut: 'Sair', }, diff --git a/src/renderer/i18n/locales/ru.ts b/src/renderer/i18n/locales/ru.ts index 43397723..41461e72 100644 --- a/src/renderer/i18n/locales/ru.ts +++ b/src/renderer/i18n/locales/ru.ts @@ -488,6 +488,8 @@ export const ru: Translation = { language: 'Язык приложения', lightMode: 'Светлая тема', darkMode: 'Тёмная тема', + theme: 'Тема', + systemMode: 'Как в системе', signOut: 'Выйти', }, diff --git a/src/renderer/i18n/locales/zh.ts b/src/renderer/i18n/locales/zh.ts index f14c8c95..192c62cb 100644 --- a/src/renderer/i18n/locales/zh.ts +++ b/src/renderer/i18n/locales/zh.ts @@ -426,6 +426,8 @@ export const zh: Translation = { language: '应用语言', lightMode: '浅色模式', darkMode: '深色模式', + theme: '主题', + systemMode: '跟随系统', signOut: '退出登录', }, diff --git a/src/renderer/index.css b/src/renderer/index.css index 496b2de0..1d7cd198 100644 --- a/src/renderer/index.css +++ b/src/renderer/index.css @@ -1,12 +1,13 @@ @import 'tailwindcss'; @import 'tw-animate-css'; @import 'highlight.js/styles/github.css'; +@import '@fontsource-variable/inter'; @custom-variant dark (&:is(.dark *)); @theme inline { --font-sans: - ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, + 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', @@ -139,37 +140,40 @@ } .dark { - --background: oklch(0.155 0.004 286); - --foreground: oklch(0.97 0.002 286); - --card: oklch(0.195 0.005 286); - --card-foreground: oklch(0.97 0.002 286); - --popover: oklch(0.215 0.005 286); - --popover-foreground: oklch(0.97 0.002 286); + /* Raycast/Linear-style dark: a near-black base and three clear elevation steps (card, + popover, hover) rather than borders doing all the separating. Borders are translucent so + they read the same on every surface they sit on. */ + --background: oklch(0.145 0.004 286); + --foreground: oklch(0.965 0.002 286); + --card: oklch(0.183 0.005 286); + --card-foreground: oklch(0.965 0.002 286); + --popover: oklch(0.205 0.006 286); + --popover-foreground: oklch(0.965 0.002 286); --primary: oklch(0.762 0.162 60.9); --primary-foreground: oklch(0.18 0.02 60); - --secondary: oklch(0.26 0.006 286); - --secondary-foreground: oklch(0.97 0.002 286); - --muted: oklch(0.26 0.006 286); - --muted-foreground: oklch(0.71 0.013 286); - --accent: oklch(0.28 0.006 286); - --accent-foreground: oklch(0.97 0.002 286); - --destructive: oklch(0.55 0.22 27); + --secondary: oklch(0.235 0.006 286); + --secondary-foreground: oklch(0.965 0.002 286); + --muted: oklch(0.235 0.006 286); + --muted-foreground: oklch(0.68 0.013 286); + --accent: oklch(0.255 0.007 286); + --accent-foreground: oklch(0.965 0.002 286); + --destructive: oklch(0.58 0.21 27); --destructive-foreground: oklch(0.98 0 0); - --border: oklch(0.29 0.006 286); - --input: oklch(0.29 0.006 286); + --border: oklch(1 0 0 / 0.08); + --input: oklch(1 0 0 / 0.11); --ring: oklch(0.762 0.162 60.9); --chart-1: #d95926; --chart-2: #199e70; --chart-3: #256abf; --chart-4: #9085e9; --chart-5: #e66767; - --sidebar: oklch(0.175 0.004 286); - --sidebar-foreground: oklch(0.97 0.002 286); + --sidebar: oklch(0.13 0.004 286); + --sidebar-foreground: oklch(0.965 0.002 286); --sidebar-primary: oklch(0.762 0.162 60.9); --sidebar-primary-foreground: oklch(0.18 0.02 60); - --sidebar-accent: oklch(0.28 0.006 286); - --sidebar-accent-foreground: oklch(0.97 0.002 286); - --sidebar-border: oklch(0.29 0.006 286); + --sidebar-accent: oklch(0.235 0.006 286); + --sidebar-accent-foreground: oklch(0.965 0.002 286); + --sidebar-border: oklch(1 0 0 / 0.07); --sidebar-ring: oklch(0.762 0.162 60.9); } @@ -185,6 +189,11 @@ @apply text-foreground; } + body { + font-feature-settings: 'cv11', 'ss01'; + -webkit-font-smoothing: antialiased; + } + pre, pre code { font-family: var(--font-mono); @@ -255,3 +264,24 @@ .dark { scrollbar-color: rgba(255, 255, 255, 0.08) rgba(255, 255, 255, 0.02); } + +/* Route content fades in rather than snapping, so moving between rail destinations reads as one + app changing view instead of a page reload. */ +@keyframes view-enter { + from { + opacity: 0; + transform: translateY(4px); + } + to { + opacity: 1; + transform: none; + } +} +.view-enter { + animation: view-enter 180ms ease-out both; +} +@media (prefers-reduced-motion: reduce) { + .view-enter { + animation: none; + } +} From 8d2c2512a811b412b920a9ab1a4b3c2c74159751 Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 23 Nov 2026 07:17:54 -0600 Subject: [PATCH 02/22] feat(shell): add icon navigation rail Persistent rail on Home, Configuration, Account, Payment and Documentation with theme picker and account menu at its foot. Hidden on auth, onboarding, interview routes and in stealth; disabled while an interview is locked. The titlebar menu and Back button step aside where the rail shows, and rail routes fade in on change. Refs #154 Co-Authored-By: Claude Opus 5.5 --- src/renderer/components/custom/app-rail.tsx | 156 ++++++++++++++++++ src/renderer/components/custom/main-frame.tsx | 15 +- .../components/custom/page-header.tsx | 27 +-- src/renderer/components/custom/titlebar.tsx | 6 +- src/renderer/hooks/use-app-rail.ts | 20 +++ 5 files changed, 211 insertions(+), 13 deletions(-) create mode 100644 src/renderer/components/custom/app-rail.tsx create mode 100644 src/renderer/hooks/use-app-rail.ts diff --git a/src/renderer/components/custom/app-rail.tsx b/src/renderer/components/custom/app-rail.tsx new file mode 100644 index 00000000..38d2078e --- /dev/null +++ b/src/renderer/components/custom/app-rail.tsx @@ -0,0 +1,156 @@ +import { + BookOpen, + CreditCard, + Home, + type LucideIcon, + Monitor, + Moon, + SettingsIcon, + Sun, + UserRound, +} from 'lucide-react'; +import { forwardRef } from 'react'; +import { useLocation, useNavigate } from 'react-router-dom'; + +import { ThemeRadioItems } from '@/components/custom/theme-menu'; +import TitlebarMenu from '@/components/custom/titlebar-menu'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; +import { useInterviewLock } from '@/hooks/use-interview-lock'; +import { useThemeStore } from '@/hooks/use-theme-store'; +import { useT } from '@/i18n'; +import { cn } from '@/lib/utils'; + +interface RailButtonProps extends React.ButtonHTMLAttributes { + icon: LucideIcon; + label: string; + active?: boolean; +} + +const RailButton = forwardRef( + ({ icon: Icon, label, active = false, className, ...props }, ref) => ( + + ) +); +RailButton.displayName = 'RailButton'; + +interface RailItemProps { + icon: LucideIcon; + label: string; + active?: boolean; + disabled?: boolean; + onClick: () => void; +} + +function RailItem({ icon, label, active, disabled, onClick }: RailItemProps) { + return ( + + + + + +

{label}

+
+
+ ); +} + +/** + * The app's persistent navigation, an icon rail rather than a full sidebar so it costs 52px of an + * 840px window. Labels live in tooltips; the active route is marked with an accent bar as well as + * a fill, so it does not rely on colour alone. + * + * Disabled as a whole during an interview, the same rule the titlebar menu and the command palette + * follow - the router would refuse each of these navigations anyway. + */ +export default function AppRail() { + const t = useT(); + const navigate = useNavigate(); + const { pathname } = useLocation(); + const { locked } = useInterviewLock(); + const preference = useThemeStore((s) => s.preference); + const ThemeIcon = preference === 'system' ? Monitor : preference === 'light' ? Sun : Moon; + + const items: { path: string; icon: LucideIcon; label: string }[] = [ + { path: '/', icon: Home, label: t.titlebarMenu.home }, + { path: '/configuration', icon: SettingsIcon, label: t.titlebarMenu.configuration }, + { path: '/account', icon: UserRound, label: t.titlebarMenu.account }, + { path: '/payment', icon: CreditCard, label: t.home.subscribe }, + { path: '/documentation', icon: BookOpen, label: t.titlebarMenu.documentation }, + ]; + + return ( + + ); +} diff --git a/src/renderer/components/custom/main-frame.tsx b/src/renderer/components/custom/main-frame.tsx index f9aca2eb..45be5fa2 100644 --- a/src/renderer/components/custom/main-frame.tsx +++ b/src/renderer/components/custom/main-frame.tsx @@ -2,6 +2,7 @@ import React, { useEffect } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { toast } from 'sonner'; +import { useAppRailVisible } from '@/hooks/use-app-rail'; import { useAppState } from '@/hooks/use-app-state'; import { useConfigStore } from '@/hooks/use-config-store'; import { MainContainerContext } from '@/hooks/use-main-container'; @@ -11,6 +12,7 @@ import { useSubscriptionExpiryWarning } from '@/hooks/use-subscription-expiry-wa import { useUiLanguageSync } from '@/i18n'; import type { PushNotification } from '@/types/push-notification'; +import AppRail from './app-rail'; import { CommandPalette } from './command-palette'; import SaveHistoryDialog from './save-history-dialog'; import Titlebar from './titlebar'; @@ -65,6 +67,8 @@ export default function MainFrame({ children }: { children: React.ReactNode }) { if (isLoggedIn === false && !onAuthRoute) navigate('/auth/login', { replace: true }); }, [isLoggedIn, onAuthRoute, navigate]); + const railVisible = useAppRailVisible(); + const [container, setContainer] = React.useState(null); const mainRef = React.useCallback((el: HTMLElement | null) => { setContainer(el); @@ -97,7 +101,16 @@ export default function MainFrame({ children }: { children: React.ReactNode }) {
-
{children}
+
+ {railVisible && } + {/* Keyed on the route so each destination plays the enter transition once. */} +
+ {children} +
+
diff --git a/src/renderer/components/custom/page-header.tsx b/src/renderer/components/custom/page-header.tsx index b47f15b9..5b225078 100644 --- a/src/renderer/components/custom/page-header.tsx +++ b/src/renderer/components/custom/page-header.tsx @@ -3,6 +3,7 @@ import type { ReactNode } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { Button } from '@/components/ui/button'; +import { useAppRailVisible } from '@/hooks/use-app-rail'; import { useT } from '@/i18n'; interface PageHeaderProps { @@ -27,6 +28,8 @@ export default function PageHeader({ title, fallback = '/', children }: PageHead const t = useT(); const navigate = useNavigate(); const location = useLocation(); + // On a rail route the rail is the navigation; Back would be a second, less predictable one. + const railVisible = useAppRailVisible(); const handleBack = () => { if (location.key === 'default') navigate(fallback, { replace: true }); @@ -34,18 +37,20 @@ export default function PageHeader({ title, fallback = '/', children }: PageHead }; return ( -
+
- -

{title}

+ {!railVisible && ( + + )} +

{title}

{children}
diff --git a/src/renderer/components/custom/titlebar.tsx b/src/renderer/components/custom/titlebar.tsx index 948c38c5..ed6b9614 100644 --- a/src/renderer/components/custom/titlebar.tsx +++ b/src/renderer/components/custom/titlebar.tsx @@ -6,6 +6,7 @@ import CreditsDisplay from '@/components/custom/credits-display'; import TitlebarMenu from '@/components/custom/titlebar-menu'; import { Button } from '@/components/ui/button'; import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; +import { useAppRailVisible } from '@/hooks/use-app-rail'; import { useAppState } from '@/hooks/use-app-state'; import { useCommandPaletteStore } from '@/hooks/use-command-palette'; import { useHideTaskbar } from '@/hooks/use-hide-taskbar'; @@ -62,6 +63,9 @@ export default function Titlebar() { // No taskbar icon to restore from, and main refuses minimize in this mode too. const { enabled: minimizeBlocked } = useHideTaskbar(); + // The rail carries the same menu at its foot, so the titlebar copy would be a duplicate. + const railVisible = useAppRailVisible(); + if (isStealth) return null; return ( @@ -122,7 +126,7 @@ export default function Titlebar() { - + {!railVisible && } {!isMac && ( <> diff --git a/src/renderer/hooks/use-app-rail.ts b/src/renderer/hooks/use-app-rail.ts new file mode 100644 index 00000000..5412706c --- /dev/null +++ b/src/renderer/hooks/use-app-rail.ts @@ -0,0 +1,20 @@ +import { useLocation } from 'react-router-dom'; + +import { useAppState } from '@/hooks/use-app-state'; +import useIsStealthMode from '@/hooks/use-is-stealth-mode'; + +/** + * The destinations the rail navigates between, and the only routes it is drawn on. The interview + * routes are excluded because the navigation lock refuses every way off them anyway, and a column + * of disabled icons beside the console would only take width from the suggestions. Auth and + * onboarding are excluded because they are flows with their own way forward. + */ +export const RAIL_ROUTES = ['/', '/configuration', '/account', '/payment', '/documentation']; + +export function useAppRailVisible(): boolean { + const { pathname } = useLocation(); + const { appState } = useAppState(); + const isStealth = useIsStealthMode(); + + return appState?.isLoggedIn === true && !isStealth && RAIL_ROUTES.includes(pathname); +} From 88990f8cf30926dbef078a1f309ce16deaa25a97 Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 23 Nov 2026 07:18:07 -0600 Subject: [PATCH 03/22] feat(home): hero launch cards and plan chip Larger launch cards with the live assistant emphasised, the plan shown as a status chip linking to the subscription page, and a command palette hint. Navigation and sign-out moved to the rail. Refs #154 Co-Authored-By: Claude Opus 5.5 --- src/renderer/pages/home/index.tsx | 327 ++++++++++++------------------ 1 file changed, 133 insertions(+), 194 deletions(-) diff --git a/src/renderer/pages/home/index.tsx b/src/renderer/pages/home/index.tsx index 03395674..8175cf40 100644 --- a/src/renderer/pages/home/index.tsx +++ b/src/renderer/pages/home/index.tsx @@ -1,17 +1,14 @@ -import { BookOpen, CreditCard, LogOut, Mic, Play, SettingsIcon, UserRound } from 'lucide-react'; +import { ArrowRight, Clock, Crown, Mic, Radio, Search } from 'lucide-react'; import { useEffect, useRef, useState } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; -import { toast } from 'sonner'; import { MockInterviewSetupDialog } from '@/components/custom/mock-interview-setup-dialog'; -import { Button } from '@/components/ui/button'; -import { Card, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { useAppState } from '@/hooks/use-app-state'; -import useAuth from '@/hooks/use-auth'; +import { useCommandPaletteStore } from '@/hooks/use-command-palette'; import { useConfigStore } from '@/hooks/use-config-store'; import { useNow } from '@/hooks/use-now'; -import { useSaveHistoryGuard } from '@/hooks/use-save-history-guard'; import { useT } from '@/i18n'; +import { isMac } from '@/lib/consts'; import { canStartSession } from '@/lib/credit-gate'; import { freeTimeLabel, @@ -31,6 +28,8 @@ interface LaunchCardProps { description: string; onClick: () => void; disabled?: boolean; + /** The recommended path gets the accent treatment; the other stays quiet beside it. */ + emphasis?: boolean; } /** @@ -38,18 +37,20 @@ interface LaunchCardProps { * the whole point of this screen, and a title alone does not say which one a first-time user * wants - the description under it does. * - * The icon sits above the title rather than beside it, and the pair share a row rather than - * stacking. Side by side each card is about half as wide, which is where a description that used - * to be one line becomes three; taking the 40px icon out of that width is what pays for them, and - * it is the same trade the whole screen is making - see the page's own note. - * * `disabled` is a real removal from the tab order and not just a grey fill: the one case that * uses it - a mock interview while the live assistant runs - is refused by the main process * anyway, so leaving it clickable would route the user to a screen that only reports an error. */ -function LaunchCard({ icon, title, description, onClick, disabled = false }: LaunchCardProps) { +function LaunchCard({ + icon, + title, + description, + onClick, + disabled = false, + emphasis = false, +}: LaunchCardProps) { return ( - - -
-
- {icon} -
- {title} -
- {description} -
-
+
+ {icon} +
+

{title}

+

{description}

+ {!disabled && ( +
); } /** - * The app's front door: the two things you can start, the places you can go, and the way out. + * The app's front door: the two things you can start, and the plan that pays for them. * - * `/` used to redirect straight into the control console, which is dense, unlabelled and assumes - * you already know what the app does. Everything reachable from here is named in the words a - * candidate would use, not the ones the codebase uses. + * Account, Configuration, Documentation and signing out live on the navigation rail beside this + * screen, so what is left here is only the choice it exists for. * - * Both launch buttons start a session; neither implements starting one. Live hands off to - * `/main`, which owns the whole start sequence - the microphone checks, the headphone notice, the - * macOS permission gate and the save-history guard - and mock hands off to `/mock-interview` with - * the setup this page's dialog collected. Duplicating either flow here is how the two would - * drift apart. - * - * This is now the only place either kind of session begins. The control bar used to carry a split - * Start button of its own, which meant two screens answering the same question and a stored - * preference deciding which one a button meant. + * Both launch cards start a session; neither implements starting one. Live hands off to `/main`, + * which owns the whole start sequence - the microphone checks, the headphone notice, the macOS + * permission gate and the save-history guard - and mock hands off to `/mock-interview` with the + * setup this page's dialog collected. Duplicating either flow here is how the two would drift + * apart. */ export default function HomePage() { const t = useT(); @@ -104,25 +121,17 @@ export default function HomePage() { const location = useLocation(); const { appState, runningState } = useAppState(); const { config, isLoading: configLoading } = useConfigStore(); - const { logout } = useAuth(); - const { confirmDiscard } = useSaveHistoryGuard(); + const openCommandPalette = useCommandPaletteStore((s) => s.setOpen); // The live assistant and a mock interview are mutually exclusive - both want the microphone and // an ASR socket, and the main process refuses the second one. Said here rather than left to // that refusal, so the card names the state instead of routing the user to an error. const liveSessionActive = runningState !== RunningState.Idle; - // The other half of the same exclusion. The mock card names an active live session; without - // this the live card said nothing about an active mock one, and clicking it routed the - // candidate to `/main` for a start `startAssistant` refuses - an error toast on a screen they - // had no reason to be sent to. Reachable while a mock session is winding down: leaving that - // route ends the session, and it stays active through `Stopping`/`Scoring`. + // The other half of the same exclusion. Reachable while a mock session is winding down: leaving + // that route ends the session, and it stays active through `Stopping`/`Scoring`. const mockSessionActive = isMockInterviewSessionActive(appState?.mockInterview ?? null); - // Signing out tears down the token a mock session's next request needs, and a mock session - // deliberately leaves `runningState` on Idle - so the live check alone does not cover it. - const anySessionActive = liveSessionActive || mockSessionActive; - // A released client can outrun the backend deployment that adds the feature. Only an explicit // `false` closes the card: `null` means the probe has not answered yet, and treating that as // unavailable would grey the card out for the first seconds of every launch. @@ -138,7 +147,6 @@ export default function HomePage() { ); const [mockSetupOpen, setMockSetupOpen] = useState(false); - const [signingOut, setSigningOut] = useState(false); // "Practise again" on the mock report has nowhere of its own to configure the next session, so // it comes back here with a flag rather than making the candidate find the card again. Guarded @@ -150,19 +158,14 @@ export default function HomePage() { if (!navState?.openMockSetup) return; if (consumedNavKey.current === location.key) return; - // Consumed before the check below, not after: the flag is spent either way, so that clearing + // Consumed before the checks below, not after: the flag is spent either way, so that clearing // the router state cannot leave a stale request to reopen this dialog on a later Back. consumedNavKey.current = location.key; navigate(location.pathname, { replace: true, state: null }); - // Not reachable through the UI - every surface that sets this flag is either inside a - // finished mock session or hidden while the assistant runs - but opening a setup dialog for - // a session the main process would refuse is a bad enough failure to be worth one line. if (liveSessionActive) return; - - // The same reasoning for a backend that cannot serve the session at all. Reachable in a way - // the live check is not: "Practise again" sits on a report the candidate is still reading - // when the backend is rolled back under them. + // "Practise again" sits on a report the candidate is still reading when the backend can be + // rolled back under them. if (mockUnsupported) return; setMockSetupOpen(true); // Both guards are read at the moment the request arrives and are not triggers for it. @@ -184,14 +187,15 @@ export default function HomePage() { // appState starts null before the first IPC round-trip resolves, and the config arrives over a // second one - both need to settle before "no data" is trustworthy. const accountReady = !configLoading && config !== undefined && appState !== null; + const subscribed = isSubscriptionActive(subscription, now); const firstName = appState?.interviewConfig?.fullName?.trim().split(' ')[0] || email?.split('@')[0]; + const planText = accountReady ? (planSummary ?? t.home.planUnavailable) : t.common.loading; const handleStartLive = () => { // `/main`'s control panel runs the start sequence on arrival. Handed through router state // rather than started here so there is exactly one implementation of it. Already running, - // this is just the way back to the interview - the flag would be ignored, but not sending it - // is what keeps the card's label honest. + // this is just the way back to the interview. if (liveSessionActive) navigate('/main'); else navigate('/main', { state: { autoStartLive: true } }); }; @@ -201,76 +205,56 @@ export default function HomePage() { // `useMockInterview()` instance is ever mounted at once - starting it from this page as well // would leave two instances reacting to the same `Speaking` transition for the moment before // the route swap finishes, which is what plays the question's audio twice. - const handleSignOut = async () => { - // Signing out drops the interview from memory and nothing has written it to disk unless it - // was exported, so it asks first - the same guard Clear, Start, Stop and closing the app use. - if (!(await confirmDiscard('signout'))) return; - - setSigningOut(true); - try { - await logout(); - } catch (err) { - // Read off the caught error rather than the hook's `error` state - `logout` sets it and - // throws in the same tick, so this closure's copy is still last render's value. - console.error('Sign out failed:', err); - toast.error(err instanceof Error ? err.message : t.home.signOutFailed); - setSigningOut(false); - return; - } - // No `setSigningOut(false)` on success: signing out redirects to the login screen and this - // page unmounts, and clearing the flag first would flash "Sign out" back for a frame. - }; - const handleMockInterviewStart = async (setup: MockInterviewSetup) => { setMockSetupOpen(false); navigate('/mock-interview', { state: { pendingSetup: setup } }); }; return ( - // Centred both ways, not just horizontally. `mx-auto` alone left the column pinned to the - // top of a window that is usually much taller than it, so the whole screen sat in the upper - // third with an empty half below it. The inner wrapper is `min-h-full` rather than `h-full` - // so that centring gives way to scrolling once the content is taller than the window - which - // at the sizes below only happens well past the default zoom, and clipping the sign-out row - // instead would be worse than a scrollbar nobody normally sees. - // - // **The layout is built to fit the smallest window the app allows**, which is MIN_WIDTH x - // MIN_HEIGHT (840x600) from `main/consts.ts`, less the 36px titlebar. It did not: a single - // narrow column of full-width rows ran about 580px against 564px of room, so the front door - // opened on a scrollbar and a sign-out button below the fold. Nothing here was removed to - // fix that - the screen is the same six things - they are laid out across the width the - // window already has instead of down a column half of it wide. The two launch cards share a - // row, the account strip carries Subscription on its own line rather than above one, and the - // three navigations are one row of three. Vertical rhythm went from 8/6-step gaps to 4, and - // the outer padding from py-10 to py-6. + // `min-h-full` rather than `h-full` so centring gives way to scrolling once the content is + // taller than the window, which only happens well past the default zoom. Built to fit + // MIN_WIDTH x MIN_HEIGHT (840x600) less the titlebar and the rail.
-
-
-

- {firstName ? t.home.welcome(firstName) : t.home.welcomeAnonymous} -

-

{t.home.subtitle}

+
+
+
+

+ {firstName ? t.home.welcome(firstName) : t.home.welcomeAnonymous} +

+

{t.home.subtitle}

+
+ + {/* The plan as a status chip that is also the way to change it. */} +
-
-
@@ -373,7 +312,7 @@ export default function HomePage() { ); } -/** The account strip's plan line: the active plan and its end date, or the free time left. */ +/** The plan chip's text: the active plan and its end date, or the free time left. */ function describePlan( t: ReturnType, subscription: SubscriptionSummary, From 599eb72018fd1ed3997b2f94271f428f796ad0a3 Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 23 Nov 2026 07:22:47 -0600 Subject: [PATCH 04/22] feat(settings): group configuration into titled sections General, Interview, Display, Window & privacy and Help, each in its own card, with headings in all nine locales. Account, Documentation and Payment share the same body padding. Refs #154 Co-Authored-By: Claude Opus 5.5 --- .../custom/settings/settings-section.tsx | 16 ++++ src/renderer/i18n/locales/de.ts | 7 ++ src/renderer/i18n/locales/en.ts | 7 ++ src/renderer/i18n/locales/es.ts | 7 ++ src/renderer/i18n/locales/fr.ts | 7 ++ src/renderer/i18n/locales/ja.ts | 7 ++ src/renderer/i18n/locales/ko.ts | 7 ++ src/renderer/i18n/locales/pt.ts | 7 ++ src/renderer/i18n/locales/ru.ts | 7 ++ src/renderer/i18n/locales/zh.ts | 7 ++ src/renderer/pages/account/index.tsx | 6 +- src/renderer/pages/configuration/index.tsx | 75 +++++++++++-------- src/renderer/pages/documentation/index.tsx | 2 +- src/renderer/pages/payment/index.tsx | 2 +- 14 files changed, 127 insertions(+), 37 deletions(-) create mode 100644 src/renderer/components/custom/settings/settings-section.tsx diff --git a/src/renderer/components/custom/settings/settings-section.tsx b/src/renderer/components/custom/settings/settings-section.tsx new file mode 100644 index 00000000..615b2db6 --- /dev/null +++ b/src/renderer/components/custom/settings/settings-section.tsx @@ -0,0 +1,16 @@ +import type { ReactNode } from 'react'; + +/** + * A titled group on a settings-style page. The fields themselves are shared with the first-run + * wizard and keep their own layout; this only gives the page a structure to scan. + */ +export function SettingsSection({ title, children }: { title: string; children: ReactNode }) { + return ( +
+

+ {title} +

+
{children}
+
+ ); +} diff --git a/src/renderer/i18n/locales/de.ts b/src/renderer/i18n/locales/de.ts index b9b68d30..41f444b5 100644 --- a/src/renderer/i18n/locales/de.ts +++ b/src/renderer/i18n/locales/de.ts @@ -105,6 +105,13 @@ export const de: Translation = { configuration: { title: 'Einstellungen', + sections: { + general: 'Allgemein', + interview: 'Vorstellungsgespräch', + display: 'Anzeige', + window: 'Fenster & Datenschutz', + help: 'Hilfe', + }, setupGuide: { title: 'Einrichtungsassistent', description: 'Geh alles auf dieser Seite und dein Profil Schritt für Schritt durch.', diff --git a/src/renderer/i18n/locales/en.ts b/src/renderer/i18n/locales/en.ts index 4aa9b137..984cc43d 100644 --- a/src/renderer/i18n/locales/en.ts +++ b/src/renderer/i18n/locales/en.ts @@ -112,6 +112,13 @@ export const en = { configuration: { title: 'Configuration', + sections: { + general: 'General', + interview: 'Interview', + display: 'Display', + window: 'Window & privacy', + help: 'Help', + }, setupGuide: { title: 'Setup guide', description: 'Walk through everything on this page, and your profile, one step at a time.', diff --git a/src/renderer/i18n/locales/es.ts b/src/renderer/i18n/locales/es.ts index 9d243ff6..e385bc60 100644 --- a/src/renderer/i18n/locales/es.ts +++ b/src/renderer/i18n/locales/es.ts @@ -103,6 +103,13 @@ export const es: Translation = { configuration: { title: 'Configuración', + sections: { + general: 'General', + interview: 'Entrevista', + display: 'Pantalla', + window: 'Ventana y privacidad', + help: 'Ayuda', + }, setupGuide: { title: 'Guía de configuración', description: 'Recorre todo lo de esta página, y tu perfil, paso a paso.', diff --git a/src/renderer/i18n/locales/fr.ts b/src/renderer/i18n/locales/fr.ts index db8ea8fc..8581b029 100644 --- a/src/renderer/i18n/locales/fr.ts +++ b/src/renderer/i18n/locales/fr.ts @@ -106,6 +106,13 @@ export const fr: Translation = { configuration: { title: 'Réglages', + sections: { + general: 'Général', + interview: 'Entretien', + display: 'Affichage', + window: 'Fenêtre et confidentialité', + help: 'Aide', + }, setupGuide: { title: 'Guide de configuration', description: diff --git a/src/renderer/i18n/locales/ja.ts b/src/renderer/i18n/locales/ja.ts index 85b39f35..270bafd8 100644 --- a/src/renderer/i18n/locales/ja.ts +++ b/src/renderer/i18n/locales/ja.ts @@ -100,6 +100,13 @@ export const ja: Translation = { configuration: { title: '設定', + sections: { + general: '一般', + interview: '面接', + display: '表示', + window: 'ウィンドウとプライバシー', + help: 'ヘルプ', + }, setupGuide: { title: 'セットアップガイド', description: 'このページの設定とプロフィールを、1 ステップずつ確認します。', diff --git a/src/renderer/i18n/locales/ko.ts b/src/renderer/i18n/locales/ko.ts index 3c6dfc28..a237f716 100644 --- a/src/renderer/i18n/locales/ko.ts +++ b/src/renderer/i18n/locales/ko.ts @@ -100,6 +100,13 @@ export const ko: Translation = { configuration: { title: '설정', + sections: { + general: '일반', + interview: '면접', + display: '표시', + window: '창 및 개인정보', + help: '도움말', + }, setupGuide: { title: '설정 가이드', description: '이 페이지의 모든 항목과 프로필을 한 단계씩 살펴봅니다.', diff --git a/src/renderer/i18n/locales/pt.ts b/src/renderer/i18n/locales/pt.ts index 92cc6e2a..b6c563dd 100644 --- a/src/renderer/i18n/locales/pt.ts +++ b/src/renderer/i18n/locales/pt.ts @@ -104,6 +104,13 @@ export const pt: Translation = { configuration: { title: 'Configurações', + sections: { + general: 'Geral', + interview: 'Entrevista', + display: 'Exibição', + window: 'Janela e privacidade', + help: 'Ajuda', + }, setupGuide: { title: 'Guia de configuração', description: 'Passe por tudo desta página, e pelo seu perfil, uma etapa de cada vez.', diff --git a/src/renderer/i18n/locales/ru.ts b/src/renderer/i18n/locales/ru.ts index 41461e72..be2bb449 100644 --- a/src/renderer/i18n/locales/ru.ts +++ b/src/renderer/i18n/locales/ru.ts @@ -123,6 +123,13 @@ export const ru: Translation = { configuration: { title: 'Настройки', + sections: { + general: 'Общие', + interview: 'Собеседование', + display: 'Отображение', + window: 'Окно и приватность', + help: 'Справка', + }, setupGuide: { title: 'Руководство по настройке', description: 'Пройдите всё на этой странице, а также профиль, шаг за шагом.', diff --git a/src/renderer/i18n/locales/zh.ts b/src/renderer/i18n/locales/zh.ts index 192c62cb..5ebca0f1 100644 --- a/src/renderer/i18n/locales/zh.ts +++ b/src/renderer/i18n/locales/zh.ts @@ -96,6 +96,13 @@ export const zh: Translation = { configuration: { title: '设置', + sections: { + general: '通用', + interview: '面试', + display: '显示', + window: '窗口与隐私', + help: '帮助', + }, setupGuide: { title: '设置向导', description: '逐步完成本页的所有设置以及你的个人资料。', diff --git a/src/renderer/pages/account/index.tsx b/src/renderer/pages/account/index.tsx index 8bd181ed..13d4230b 100644 --- a/src/renderer/pages/account/index.tsx +++ b/src/renderer/pages/account/index.tsx @@ -59,8 +59,8 @@ export default function AccountPage() {
-
-
+
+

{t.account.signedInAs}

{/* The account's own email rather than the remembered credential, which is blank for a user who declined "remember me" - see `AppState.accountEmail`. */} @@ -73,7 +73,7 @@ export default function AccountPage() { -
+

{t.account.password.title}

{t.account.password.description}

diff --git a/src/renderer/pages/configuration/index.tsx b/src/renderer/pages/configuration/index.tsx index 535f0161..1833300f 100644 --- a/src/renderer/pages/configuration/index.tsx +++ b/src/renderer/pages/configuration/index.tsx @@ -9,6 +9,7 @@ import { HideTaskbarField } from '@/components/custom/settings/hide-taskbar-fiel import { LanguageField } from '@/components/custom/settings/language-field'; import { MicrophoneField } from '@/components/custom/settings/microphone-field'; import { MockHintsField } from '@/components/custom/settings/mock-hints-field'; +import { SettingsSection } from '@/components/custom/settings/settings-section'; import { SuggestionModeField } from '@/components/custom/settings/suggestion-mode-field'; import { TranscriptPanelField } from '@/components/custom/settings/transcript-panel-field'; import { UiLanguageField } from '@/components/custom/settings/ui-language-field'; @@ -38,50 +39,60 @@ export default function ConfigurationPage() {
-
- {/* First, and separated from the rest: it is the only control on this page that is not +
+ {/* First, and in a group of its own: it is the only control on this page that is not about how an interview runs, and it is the one someone arrives here looking for when the app is in a language they do not read. */} - + + + -
+ + + + + + - - - - - - - - + + + + + + + + + {/* The wizard is not a one-time thing the user is stuck having skipped. Reachable here rather than only on a first launch, which is also what lets it be skippable without that being a decision: `/onboarding` renders regardless of the account's flag, and finishing it simply records the same flag again. */} -
-
-

{t.configuration.setupGuide.title}

-

- {t.configuration.setupGuide.description} -

+ +
+
+

{t.configuration.setupGuide.title}

+

+ {t.configuration.setupGuide.description} +

+
+
- -
-
-
-

{t.configuration.hotkeys.title}

-

{t.configuration.hotkeys.description}

+
+
+

{t.configuration.hotkeys.title}

+

{t.configuration.hotkeys.description}

+
+
- -
+
diff --git a/src/renderer/pages/documentation/index.tsx b/src/renderer/pages/documentation/index.tsx index 13fdf3d6..6cb665f1 100644 --- a/src/renderer/pages/documentation/index.tsx +++ b/src/renderer/pages/documentation/index.tsx @@ -37,7 +37,7 @@ export default function DocumentationPage() {
-
+

{t.documentation.intro(APP_NAME)}

{t.documentation.docsLead} diff --git a/src/renderer/pages/payment/index.tsx b/src/renderer/pages/payment/index.tsx index fe46bd65..237c9c17 100644 --- a/src/renderer/pages/payment/index.tsx +++ b/src/renderer/pages/payment/index.tsx @@ -71,7 +71,7 @@ export default function PaymentPage() { {/* Content */} -

+
Date: Mon, 23 Nov 2026 07:23:52 -0600 Subject: [PATCH 05/22] feat(auth): branded sign-in layout and calmer loading screen Brand mark above the auth card, a soft accent glow behind it, and a rounder, raised card; the layout scrolls rather than clipping the tallest signup step. The loading page no longer overflows the window by the titlebar's height. Refs #154 Co-Authored-By: Claude Opus 5.5 --- src/renderer/components/custom/loading.tsx | 21 ++++++------ src/renderer/pages/auth/layout.tsx | 40 ++++++++++++++++------ 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/renderer/components/custom/loading.tsx b/src/renderer/components/custom/loading.tsx index b3c2d94c..219b984e 100644 --- a/src/renderer/components/custom/loading.tsx +++ b/src/renderer/components/custom/loading.tsx @@ -9,14 +9,15 @@ interface LoadingProps { export function LoadingPage({ disclaimer }: LoadingProps) { return ( -
-
-
- -

{APP_NAME}

+ // `flex-1` rather than `h-screen`: this renders under the titlebar, and a full viewport height + // below it overflowed by exactly the titlebar's height. +
+
+
+ +

{APP_NAME}

-

{disclaimer}

- +
); @@ -24,9 +25,9 @@ export function LoadingPage({ disclaimer }: LoadingProps) { export function Loading({ disclaimer }: LoadingProps) { return ( -
-

{disclaimer}

- +
+
); } diff --git a/src/renderer/pages/auth/layout.tsx b/src/renderer/pages/auth/layout.tsx index 0e61084b..9dd6f2e9 100644 --- a/src/renderer/pages/auth/layout.tsx +++ b/src/renderer/pages/auth/layout.tsx @@ -1,9 +1,11 @@ import { useEffect } from 'react'; import { Outlet, useNavigate } from 'react-router-dom'; +import faviconSvg from '/favicon.svg'; import { LoadingPage } from '@/components/custom/loading'; import { useAppState } from '@/hooks/use-app-state'; import { useT } from '@/i18n'; +import { APP_NAME } from '@/lib/consts'; export default function AuthLayout() { const t = useT(); @@ -19,16 +21,34 @@ export default function AuthLayout() { } }, [appState?.isLoggedIn, navigate]); - // Show loading state while checking backend status - if (appState?.isLoggedIn === false) { - return ( -
-
- -
-
- ); - } else { + if (appState?.isLoggedIn !== false) { return ; } + + return ( + // `min-h-full` centring rather than a fixed-height flex box, so the signup steps - the tallest + // card - scroll at the minimum window size instead of being clipped at the top. +
+ {/* A soft brand glow behind the card, so the one thing on this screen has somewhere to sit + instead of floating on a flat fill. Decorative only. */} + + ); } From 21368bd12304b4a24973924d9ab2bb03b3be73e9 Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 23 Nov 2026 07:25:37 -0600 Subject: [PATCH 06/22] feat(console): consistent panel chrome and empty states Panels get a rounder card, a bordered header with a small-caps title, and an icon empty state instead of a bare line of text. Layout, sizing and behaviour are unchanged. Refs #154 Co-Authored-By: Claude Opus 5.5 --- .../panels/action-suggestions-panel.tsx | 20 +++++++++---------- .../custom/panels/live-suggestions-panel.tsx | 19 ++++++++---------- .../custom/panels/mock-transcript-panel.tsx | 8 +++++--- .../components/custom/panels/panel-empty.tsx | 13 ++++++++++++ .../custom/panels/transcript-panel.tsx | 15 +++++++------- 5 files changed, 43 insertions(+), 32 deletions(-) create mode 100644 src/renderer/components/custom/panels/panel-empty.tsx diff --git a/src/renderer/components/custom/panels/action-suggestions-panel.tsx b/src/renderer/components/custom/panels/action-suggestions-panel.tsx index 579ed417..4e9533f3 100644 --- a/src/renderer/components/custom/panels/action-suggestions-panel.tsx +++ b/src/renderer/components/custom/panels/action-suggestions-panel.tsx @@ -1,4 +1,4 @@ -import { ArrowUp, ImageUp, Loader, PauseCircle, Zap } from 'lucide-react'; +import { ArrowUp, ImageUp, Loader, PauseCircle, ScanText, Zap } from 'lucide-react'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { Card } from '@/components/ui/card'; @@ -8,6 +8,8 @@ import { useT } from '@/i18n'; import { newestTimestamp, truncateMiddle } from '@/lib/suggestions'; import { type ActionSuggestion, SuggestionState } from '@/types/suggestion'; +import { PanelEmpty } from './panel-empty'; + // when a question is too long we truncate it in the middle to keep the UI compact const MAX_QUESTION_LENGTH = 256; @@ -159,11 +161,11 @@ function ActionSuggestionsPanel({ return ( {/* Header */} -
+
{isRunning && (
{!isStealth && ( @@ -195,13 +199,7 @@ function ActionSuggestionsPanel({ {/* Scrollable Content */}
- {!hasItems && ( -
-
-

{t.panels.noTriggeredSuggestions}

-
-
- )} + {!hasItems && } {hasItems && (
diff --git a/src/renderer/components/custom/panels/live-suggestions-panel.tsx b/src/renderer/components/custom/panels/live-suggestions-panel.tsx index 1cdaf7fc..b39bb24f 100644 --- a/src/renderer/components/custom/panels/live-suggestions-panel.tsx +++ b/src/renderer/components/custom/panels/live-suggestions-panel.tsx @@ -1,4 +1,4 @@ -import { ArrowUp, Loader, PauseCircle, Zap } from 'lucide-react'; +import { ArrowUp, Loader, PauseCircle, Sparkles, Zap } from 'lucide-react'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { useConfigStore } from '@/hooks/use-config-store'; @@ -20,6 +20,7 @@ import { type LiveSuggestion, SuggestionState } from '@/types/suggestion'; import { Button } from '../../ui/button'; import { Switch } from '../../ui/switch'; import { SafeMarkdown } from '../safe-markdown'; +import { PanelEmpty } from './panel-empty'; import SuggestionReveal from './suggestion-reveal'; /** @@ -205,11 +206,11 @@ function LiveSuggestionsPanel({ return ( {/* Header */} -
+
{isRunning && (
{!isStealth && ( @@ -241,13 +244,7 @@ function LiveSuggestionsPanel({ {/* Scrollable Content */}
- {!hasItems && ( -
-
-

{t.panels.noSuggestions}

-
-
- )} + {!hasItems && } {hasItems && (
diff --git a/src/renderer/components/custom/panels/mock-transcript-panel.tsx b/src/renderer/components/custom/panels/mock-transcript-panel.tsx index 77bf68f0..896241f3 100644 --- a/src/renderer/components/custom/panels/mock-transcript-panel.tsx +++ b/src/renderer/components/custom/panels/mock-transcript-panel.tsx @@ -198,8 +198,8 @@ function MockTranscriptPanel({ session }: MockTranscriptPanelProps) { }, [turns, autoScroll, scrollToEnd]); return ( - -
+ +
{isRunning && (
{totalQuestions > 0 && ( diff --git a/src/renderer/components/custom/panels/panel-empty.tsx b/src/renderer/components/custom/panels/panel-empty.tsx new file mode 100644 index 00000000..3fc0a5a6 --- /dev/null +++ b/src/renderer/components/custom/panels/panel-empty.tsx @@ -0,0 +1,13 @@ +import type { LucideIcon } from 'lucide-react'; + +/** What a panel shows before it has anything in it: an icon in a soft tile above one line. */ +export function PanelEmpty({ icon: Icon, text }: { icon: LucideIcon; text: string }) { + return ( +
+
+
+

{text}

+
+ ); +} diff --git a/src/renderer/components/custom/panels/transcript-panel.tsx b/src/renderer/components/custom/panels/transcript-panel.tsx index 3cb16edd..73c451f5 100644 --- a/src/renderer/components/custom/panels/transcript-panel.tsx +++ b/src/renderer/components/custom/panels/transcript-panel.tsx @@ -1,4 +1,4 @@ -import { ArrowDown } from 'lucide-react'; +import { ArrowDown, AudioLines } from 'lucide-react'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { Card } from '@/components/ui/card'; @@ -10,6 +10,7 @@ import { Speaker, type Transcript } from '@/types/transcript'; import { Button } from '../../ui/button'; import { Switch } from '../../ui/switch'; +import { PanelEmpty } from './panel-empty'; // Every entry is from the same session, so the date carries no information and its width is // what would push the speaker onto a line of its own. @@ -80,8 +81,8 @@ function TranscriptPanel({ transcripts, isRunning = false }: TranscriptPanelProp }, [transcripts, autoScroll]); return ( - -
+ +
{isRunning && (
{!isStealth && ( @@ -113,9 +116,7 @@ function TranscriptPanel({ transcripts, isRunning = false }: TranscriptPanelProp
{transcripts.length === 0 ? ( -
-

{t.panels.noTranscripts}

-
+ ) : ( <>
From 9fef88d409b4bc61b2ebf269019b030113506b18 Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 23 Nov 2026 07:27:24 -0600 Subject: [PATCH 07/22] chore(i18n): drop home strings the rail replaced Account, navigation and sign-out labels on Home moved to the rail, which reuses the titlebar menu's strings. Refs #154 Co-Authored-By: Claude Opus 5.5 --- src/renderer/i18n/locales/de.ts | 11 ----------- src/renderer/i18n/locales/en.ts | 11 ----------- src/renderer/i18n/locales/es.ts | 11 ----------- src/renderer/i18n/locales/fr.ts | 11 ----------- src/renderer/i18n/locales/ja.ts | 11 ----------- src/renderer/i18n/locales/ko.ts | 11 ----------- src/renderer/i18n/locales/pt.ts | 11 ----------- src/renderer/i18n/locales/ru.ts | 11 ----------- src/renderer/i18n/locales/zh.ts | 11 ----------- 9 files changed, 99 deletions(-) diff --git a/src/renderer/i18n/locales/de.ts b/src/renderer/i18n/locales/de.ts index 41f444b5..00433171 100644 --- a/src/renderer/i18n/locales/de.ts +++ b/src/renderer/i18n/locales/de.ts @@ -233,21 +233,10 @@ export const de: Translation = { unaffordable: 'Nicht genug Gratiszeit übrig. Abonniere, um weitere Interviews zu führen.', }, - accountLabel: 'Konto', - notSignedIn: 'Nicht angemeldet', planLabel: 'Tarif', planUnavailable: 'Nicht verfügbar', subscribe: 'Abonnement', - nav: { - account: 'Konto', - configuration: 'Einstellungen', - documentation: 'Dokumentation', - }, - - signOut: 'Abmelden', - signingOut: 'Abmeldung läuft…', - signOutBlocked: 'Beende das Interview, bevor du dich abmeldest', signOutFailed: 'Abmeldung fehlgeschlagen', }, diff --git a/src/renderer/i18n/locales/en.ts b/src/renderer/i18n/locales/en.ts index 984cc43d..242e05a5 100644 --- a/src/renderer/i18n/locales/en.ts +++ b/src/renderer/i18n/locales/en.ts @@ -246,21 +246,10 @@ export const en = { unaffordable: 'Not enough free time left. Subscribe to keep interviewing.', }, - accountLabel: 'Account', - notSignedIn: 'Not signed in', planLabel: 'Plan', planUnavailable: 'Unavailable', subscribe: 'Subscription', - nav: { - account: 'Account', - configuration: 'Configuration', - documentation: 'Documentation', - }, - - signOut: 'Sign out', - signingOut: 'Signing out…', - signOutBlocked: 'Stop the interview before signing out', signOutFailed: 'Failed to sign out', }, diff --git a/src/renderer/i18n/locales/es.ts b/src/renderer/i18n/locales/es.ts index e385bc60..93722a6a 100644 --- a/src/renderer/i18n/locales/es.ts +++ b/src/renderer/i18n/locales/es.ts @@ -235,21 +235,10 @@ export const es: Translation = { 'No te queda suficiente tiempo gratis. Suscríbete para seguir con tus entrevistas.', }, - accountLabel: 'Cuenta', - notSignedIn: 'Sin sesión iniciada', planLabel: 'Plan', planUnavailable: 'No disponible', subscribe: 'Suscripción', - nav: { - account: 'Cuenta', - configuration: 'Configuración', - documentation: 'Documentación', - }, - - signOut: 'Cerrar sesión', - signingOut: 'Cerrando sesión…', - signOutBlocked: 'Detén la entrevista antes de cerrar sesión', signOutFailed: 'No se pudo cerrar sesión', }, diff --git a/src/renderer/i18n/locales/fr.ts b/src/renderer/i18n/locales/fr.ts index 8581b029..63d44c14 100644 --- a/src/renderer/i18n/locales/fr.ts +++ b/src/renderer/i18n/locales/fr.ts @@ -239,21 +239,10 @@ export const fr: Translation = { 'Il ne vous reste pas assez de temps gratuit. Abonnez-vous pour continuer vos entretiens.', }, - accountLabel: 'Compte', - notSignedIn: 'Non connecté', planLabel: 'Formule', planUnavailable: 'Indisponible', subscribe: 'Abonnement', - nav: { - account: 'Compte', - configuration: 'Réglages', - documentation: 'Aide', - }, - - signOut: 'Se déconnecter', - signingOut: 'Déconnexion…', - signOutBlocked: 'Arrêtez l’entretien avant de vous déconnecter', signOutFailed: 'Échec de la déconnexion', }, diff --git a/src/renderer/i18n/locales/ja.ts b/src/renderer/i18n/locales/ja.ts index 270bafd8..ab5a6995 100644 --- a/src/renderer/i18n/locales/ja.ts +++ b/src/renderer/i18n/locales/ja.ts @@ -227,21 +227,10 @@ export const ja: Translation = { unaffordable: '無料時間が足りません。面接を続けるにはサブスクリプションに登録してください。', }, - accountLabel: 'アカウント', - notSignedIn: '未ログイン', planLabel: 'プラン', planUnavailable: '取得できません', subscribe: 'サブスクリプション', - nav: { - account: 'アカウント', - configuration: '設定', - documentation: 'ヘルプ', - }, - - signOut: 'ログアウト', - signingOut: 'ログアウト中…', - signOutBlocked: 'ログアウトする前に面接を停止してください', signOutFailed: 'ログアウトに失敗しました', }, diff --git a/src/renderer/i18n/locales/ko.ts b/src/renderer/i18n/locales/ko.ts index a237f716..02abae71 100644 --- a/src/renderer/i18n/locales/ko.ts +++ b/src/renderer/i18n/locales/ko.ts @@ -226,21 +226,10 @@ export const ko: Translation = { unaffordable: '무료 시간이 부족합니다. 계속 면접을 보려면 구독하세요.', }, - accountLabel: '계정', - notSignedIn: '로그인하지 않음', planLabel: '요금제', planUnavailable: '확인할 수 없음', subscribe: '구독', - nav: { - account: '계정', - configuration: '설정', - documentation: '도움말', - }, - - signOut: '로그아웃', - signingOut: '로그아웃 중…', - signOutBlocked: '로그아웃하기 전에 면접을 중지하세요', signOutFailed: '로그아웃하지 못했습니다', }, diff --git a/src/renderer/i18n/locales/pt.ts b/src/renderer/i18n/locales/pt.ts index b6c563dd..4a3697cc 100644 --- a/src/renderer/i18n/locales/pt.ts +++ b/src/renderer/i18n/locales/pt.ts @@ -228,21 +228,10 @@ export const pt: Translation = { unaffordable: 'Não sobrou tempo grátis suficiente. Assine para continuar suas entrevistas.', }, - accountLabel: 'Conta', - notSignedIn: 'Sem login', planLabel: 'Plano', planUnavailable: 'Indisponível', subscribe: 'Assinatura', - nav: { - account: 'Conta', - configuration: 'Configurações', - documentation: 'Documentação', - }, - - signOut: 'Sair', - signingOut: 'Saindo…', - signOutBlocked: 'Pare a entrevista antes de sair', signOutFailed: 'Não foi possível sair', }, diff --git a/src/renderer/i18n/locales/ru.ts b/src/renderer/i18n/locales/ru.ts index be2bb449..c20111df 100644 --- a/src/renderer/i18n/locales/ru.ts +++ b/src/renderer/i18n/locales/ru.ts @@ -252,21 +252,10 @@ export const ru: Translation = { 'Недостаточно бесплатного времени. Оформите подписку, чтобы продолжить собеседования.', }, - accountLabel: 'Учётная запись', - notSignedIn: 'Вход не выполнен', planLabel: 'Тариф', planUnavailable: 'Нет данных', subscribe: 'Подписка', - nav: { - account: 'Учётная запись', - configuration: 'Настройки', - documentation: 'Документация', - }, - - signOut: 'Выйти', - signingOut: 'Выходим…', - signOutBlocked: 'Остановите собеседование, прежде чем выйти', signOutFailed: 'Не удалось выйти', }, diff --git a/src/renderer/i18n/locales/zh.ts b/src/renderer/i18n/locales/zh.ts index 5ebca0f1..2ff0ab36 100644 --- a/src/renderer/i18n/locales/zh.ts +++ b/src/renderer/i18n/locales/zh.ts @@ -220,21 +220,10 @@ export const zh: Translation = { unaffordable: '剩余免费时长不足。订阅后可继续面试。', }, - accountLabel: '账户', - notSignedIn: '未登录', planLabel: '套餐', planUnavailable: '不可用', subscribe: '订阅', - nav: { - account: '账户', - configuration: '设置', - documentation: '帮助文档', - }, - - signOut: '退出登录', - signingOut: '正在退出…', - signOutBlocked: '请先停止面试再退出登录', signOutFailed: '退出登录失败', }, From c4e4854f7ce79ceb2dbf958c97c79ffa03145dcd Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 23 Nov 2026 07:40:29 -0600 Subject: [PATCH 08/22] feat(ui): add ambient background component and integrate into auth and home layouts --- .../components/custom/ambient-background.tsx | 20 +++ src/renderer/index.css | 74 ++++++++ src/renderer/pages/auth/layout.tsx | 37 ++-- src/renderer/pages/home/index.tsx | 166 +++++++++--------- 4 files changed, 197 insertions(+), 100 deletions(-) create mode 100644 src/renderer/components/custom/ambient-background.tsx diff --git a/src/renderer/components/custom/ambient-background.tsx b/src/renderer/components/custom/ambient-background.tsx new file mode 100644 index 00000000..5e1b452d --- /dev/null +++ b/src/renderer/components/custom/ambient-background.tsx @@ -0,0 +1,20 @@ +import { cn } from '@/lib/utils'; + +/** + * Two heavily blurred brand colour fields behind a screen's content: orange and a cool violet. + * + * `animated` is for first-impression screens only (auth). Screens people pass through on the way + * to work, like Home, take the still variant: depth without motion competing for attention. + * Never on the interview routes. Transform-only animation so it stays on the compositor, and + * `prefers-reduced-motion` freezes it (see `.ambient-*` in index.css). + * + * The parent must be `relative`; content above it needs `relative` too so it stacks on top. + */ +export function AmbientBackground({ animated = false }: { animated?: boolean }) { + return ( +