diff --git a/CLAUDE.md b/CLAUDE.md index f15fdb99..9d48495c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -753,12 +753,24 @@ and group its ledger rows. The main window reference is passed to `windowControlService` and `zoomService` after creation. Window bounds persist to Electron Store on `close` and are restored on next launch with minimum-size clamping (`MIN_WIDTH` / `MIN_HEIGHT` from [src/main/consts.ts](src/main/consts.ts)). **840x600 is a size the app is actually used at, so screens are laid out to fit it**, less the -36px titlebar. The home screen did not: six full-width rows down a column half the window wide -came to roughly 580px against 564px of room, so the app's front door opened on a scrollbar with -the sign-out row below the fold. Nothing was dropped to fix it - the two launch cards share a row, -the account strip carries Subscription on its own line, and the three navigations are one row of -three, which is spending the width the window already has rather than the height it does not. -The outer container keeps `overflow-auto` as a safety valve for large zoom factors. +36px titlebar and, on the routes that show it, the 52px navigation rail. The home screen once +opened on a scrollbar at that size, with the sign-out row below the fold. It now carries only the +choice it exists for - the two launch cards side by side and the plan as a status chip - because +Account, Configuration, Documentation, Subscription and signing out moved to the rail. Containers +that centre content use `min-h-full` inside an `overflow-auto` scroller, so a large zoom factor +scrolls rather than clipping. + +**The navigation rail** ([app-rail.tsx](src/renderer/components/custom/app-rail.tsx)) is drawn +only for a signed-in user on `RAIL_ROUTES` (`use-app-rail.ts`): never on auth, onboarding or the +two interview routes, and never in stealth. It is disabled while `useInterviewLock().locked`, like +the titlebar menu and the command palette. Where it shows, the titlebar menu and `PageHeader`'s +Back step aside, since the rail carries both. `MainFrame` keys the route container on the path for +rail routes and on one shared key otherwise - never on rail visibility, which flips on the same +route as sign-in resolves and would remount the page. + +**Theme is Dark / Light / System, dark by default** (`use-theme-store.ts`). The stored preference +is applied to `` at module load, before React's first paint, so a light-mode user does not +get a dark frame from the `class="dark"` that `index.html` ships with. The app keeps itself off the surfaces a screen share exposes, but only where it has to. There is never a desktop shortcut (the NSIS installer creates none, and `build/installer.nsh` deletes one left by an older install). The taskbar button and the macOS Dock icon are driven by `applySurfaceVisibility()` in [src/main/services/window-control.service.ts](src/main/services/window-control.service.ts) - `setSkipTaskbar(hidden)` plus, on macOS, `app.setActivationPolicy('accessory')` + `app.dock.hide()` going in and `'regular'` + `app.dock.show()` coming out. There is deliberately no `LSUIElement` in the packaged Info.plist: it would pin the app to accessory from launch and there would be no Dock icon to give back. 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/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 ( + + ); +} diff --git a/src/renderer/components/custom/app-rail.tsx b/src/renderer/components/custom/app-rail.tsx new file mode 100644 index 00000000..8493df35 --- /dev/null +++ b/src/renderer/components/custom/app-rail.tsx @@ -0,0 +1,164 @@ +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{label}
+ {disabled && ( +{t.titlebar.unavailableDuringInterview}
+ )} +{hint}
+{t.controlPanel.stopTooltip}
+{t.common.withCombo(t.controlPanel.stopTooltip, HOTKEYS[Hotkey.StopAll].combo)}
{isRunning ? ({t.controlPanel.stopRunningHint}
) : ( 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}
-{disclaimer}
-{t.panels.noTriggeredSuggestions}
-+ {t.mainRoute.awaitingFirstQuestion.title} +
++ {t.mainRoute.awaitingFirstQuestion.description} +
+ +{t.panels.noSuggestions}
-{text}
+{t.panels.noTranscripts}
-{closed ? t.titlebar.unavailableDuringInterview : t.titlebar.menu}
++ {closed + ? t.titlebar.unavailableDuringInterview + : inRail && email + ? email + : t.titlebar.menu} +
{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`. */} @@ -69,11 +72,32 @@ export default function AccountPage() {{t.account.password.title}
{t.account.password.description}
@@ -117,3 +141,64 @@ export default function AccountPage() {+ {complete + ? t.account.completeness.complete + : t.account.completeness.title(done, items.length)} +
+ +{t.account.completeness.hint}
+{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}
+{t.documentation.intro(APP_NAME)}
{t.documentation.docsLead}
diff --git a/src/renderer/pages/home/index.tsx b/src/renderer/pages/home/index.tsx
index 03395674..737fc56e 100644
--- a/src/renderer/pages/home/index.tsx
+++ b/src/renderer/pages/home/index.tsx
@@ -1,17 +1,15 @@
-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 { AmbientBackground } from '@/components/custom/ambient-background';
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 +29,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 +38,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 (
-
{title}
+{description}
+ {!disabled && ( + + )} +{t.home.subtitle}
-{t.home.subtitle}
+{t.home.accountLabel}
-- {accountReady ? (email ?? t.home.notSignedIn) : t.common.loading} -
+ {/* The plan as a status chip that is also the way to change it. */} +{t.home.planLabel}
-- {accountReady ? (planSummary ?? t.home.planUnavailable) : t.common.loading} -
-{t.mainRoute.transcriptionHidden}
{report.overall_score}
-- {scoreVerdict(t, report.overall_score)} -
-+ {scoreVerdict(t, report.overall_score)} +
+ {/* One bar per question, so the shape of the interview - a strong start that + tailed off, one weak answer among good ones - is visible before reading any. */} + {report.questions.length > 0 && ( + + )}