Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat(onboarding): refresh setup flow and preserve progress (#1984)
voidebf6a7b34055
diff --git a/src/AppRouter.jsx b/src/AppRouter.jsxindex 38aef7323..7a26cc1f4 100644--- a/src/AppRouter.jsx+++ b/src/AppRouter.jsx@@ -187,7 +187,7 @@ function MainApp() {return (<Suspense fallback={<LoadingFallback />}><OnboardingFlow onComplete={handleOnboardingComplete} />- <BackgroundModelDownloadTray />+ <BackgroundModelDownloadTray placement="onboarding" /></Suspense>);}diff --git a/src/assets/onboarding-permission-screen-context.webp b/src/assets/onboarding-permission-screen-context.webpdeleted file mode 100644index 58356d05c..000000000Binary files a/src/assets/onboarding-permission-screen-context.webp and /dev/null differdiff --git a/src/components/AuthenticationStep.tsx b/src/components/AuthenticationStep.tsxindex 109d6f139..e89d5d4cb 100644--- a/src/components/AuthenticationStep.tsx+++ b/src/components/AuthenticationStep.tsx@@ -15,9 +15,16 @@ import { Button } from "./ui/button";import { Input } from "./ui/input";import { AlertCircle, ArrowRight, Building2, Check, Loader2, ChevronLeft } from "lucide-react";import logger from "../utils/logger";+import { useDebouncedCallback } from "../hooks/useDebouncedCallback";import { getCachedPlatform } from "../utils/platform";import ForgotPasswordView from "./ForgotPasswordView";import { CompactOnboardingFrame } from "./onboarding/OnboardingShell";+import {+ RESUME_DRAFT_PERSIST_DELAY_MS,+ type OnboardingAuthDraft,+ type OnboardingAuthMode,+ type OnboardingSsoDiscoveryDraft,+} from "./onboarding/flow";interface AuthenticationStepProps {onContinueWithoutAccount?: () => void;@@ -25,14 +32,11 @@ interface AuthenticationStepProps {onNeedsVerification: (email: string) => void;/** Rendering inside SignInDialog rather than the onboarding window. */embedded?: boolean;+ resumeState?: OnboardingAuthDraft;+ onResumeStateChange?: (state: Partial<OnboardingAuthDraft>) => void;}-type AuthMode = "sign-in" | "sign-up" | null;-type SsoDiscovery = {- required: boolean;- domain: string;- exists: boolean;-};+type SsoDiscovery = OnboardingSsoDiscoveryDraft;const EXISTING_ACCOUNT_ERROR_CODES = new Set(["USER_ALREADY_EXISTS",@@ -124,6 +128,8 @@ export default function AuthenticationStep({onAuthComplete,onNeedsVerification,embedded = false,+ resumeState,+ onResumeStateChange,}: AuthenticationStepProps) {const { t } = useTranslation();// The fixed top offsets centre content in the compact setup window;@@ -133,15 +139,18 @@ export default function AuthenticationStep({? "text-2xl font-semibold tracking-tight": "onboarding-display-title";const { isSignedIn, isLoaded, user } = useAuth();- const [authMode, setAuthMode] = useState<AuthMode>(null);- const [email, setEmail] = useState("");+ const [authMode, setAuthMode] = useState<OnboardingAuthMode>(resumeState?.authMode ?? null);+ const [email, setEmail] = useState(resumeState?.email ?? "");const [password, setPassword] = useState("");- const [fullName, setFullName] = useState("");+ const [fullName, setFullName] = useState(resumeState?.fullName ?? "");const [isSubmitting, setIsSubmitting] = useState(false);const [isCheckingEmail, setIsCheckingEmail] = useState(false);const [isSocialLoading, setIsSocialLoading] = useState<SocialProvider | null>(null);const [isSSOLoading, setIsSSOLoading] = useState(false);- const [ssoDiscovery, setSsoDiscovery] = useState<SsoDiscovery | null>(null);+ const [showSSOEmailStep, setShowSSOEmailStep] = useState(false);+ const [ssoDiscovery, setSsoDiscovery] = useState<SsoDiscovery | null>(+ resumeState?.ssoDiscovery ?? null+ );const [error, setError] = useState<string | null>(null);const [forgotPasswordOpen, setForgotPasswordOpen] = useState(false);const [oauthProtocolRegistered, setOauthProtocolRegistered] = useState(true);@@ -156,6 +165,24 @@ export default function AuthenticationStep({.catch(() => {});}, []);+ // Only the fields this step owns: pendingVerificationEmail belongs to+ // CompactAuthenticationFlow, and the forgot-password / SSO-email sub-screens are+ // transient — a returning user should land on sign-in, not on a reset form.+ const latestAuthDraft = useRef<Partial<OnboardingAuthDraft>>({});+ const persistAuthDraft = useDebouncedCallback(+ () => onResumeStateChange?.(latestAuthDraft.current),+ RESUME_DRAFT_PERSIST_DELAY_MS+ );++ useEffect(() => {+ latestAuthDraft.current = { authMode, email, fullName, ssoDiscovery };+ persistAuthDraft();+ }, [authMode, email, fullName, persistAuthDraft, ssoDiscovery]);++ // The debounce drops a pending write when this step unmounts, which is exactly+ // what sign-up does on its way to verification, so flush the last draft.+ useEffect(() => () => onResumeStateChange?.(latestAuthDraft.current), [onResumeStateChange]);+useEffect(() => {if (!isLoaded || !isSignedIn || needsVerificationRef.current || !user?.id || !user?.email)return;@@ -226,6 +253,16 @@ export default function AuthenticationStep({const handleSSOSignIn = useCallback(() => startSSOSignIn(email), [email, startSSOSignIn]);+ const handleOpenSSOEmailStep = useCallback(() => {+ setError(null);+ setShowSSOEmailStep(true);+ }, []);++ const handleBackFromSSOEmailStep = useCallback(() => {+ setError(null);+ setShowSSOEmailStep(false);+ }, []);+const handleEmailContinue = useCallback(async () => {if (!email.trim() || !authClient) return;@@ -394,12 +431,10 @@ export default function AuthenticationStep({<Check className="size-5 text-success" /></div><p className="mt-6 text-2xl font-medium leading-tight tracking-tight">- {user?.name- ? t("auth.signedIn.welcomeBackName", { name: user.name })- : t("auth.signedIn.welcomeBack")}+ <span className="block">{t("auth.signedIn.welcomeBack")}</span>+ {user?.name && <span className="mt-1 block">{user.name}</span>}</p>- <p className="mt-2 text-sm text-muted-foreground">{t("auth.signedIn.ready")}</p>- <Button onClick={onAuthComplete} className="mt-7 h-12 w-full rounded-full">+ <Button onClick={onAuthComplete} className="mt-7 h-12 w-fit min-w-32 rounded-full px-6">{t("auth.common.continue")}<ArrowRight className="size-4" /></Button>@@ -418,6 +453,76 @@ export default function AuthenticationStep({);}+ if (showSSOEmailStep) {+ return (+ <CompactOnboardingFrame embedded={embedded}>+ <div className={`${frameInset("pt-38")} text-center`}>+ <h1 className={titleClass}>{t("auth.welcomeTitle")}</h1>+ <p className="mt-2 text-base text-[var(--onboarding-text-secondary)]">+ {t("auth.welcomeSubtitle")}+ </p>++ <form+ onSubmit={(event) => {+ event.preventDefault();+ void handleSSOSignIn();+ }}+ className="mt-6 space-y-4 text-left"+ >+ <label className="block space-y-2">+ <span className="text-xs text-[var(--onboarding-text-secondary)]">+ {t("auth.sso.workEmailLabel")}+ </span>+ <Input+ type="email"+ placeholder={t("auth.sso.emailPlaceholder")}+ value={email}+ onChange={(event) => setEmail(event.target.value)}+ className="onboarding-light-input onboarding-auth-input h-10 rounded-xl px-3 text-sm disabled:opacity-100"+ required+ autoFocus+ disabled={isSSOLoading}+ />+ </label>++ <Button+ type="submit"+ disabled={!email.trim() || isSSOLoading || !oauthProtocolRegistered}+ className="h-10 w-full rounded-full border-transparent bg-[var(--onboarding-inverse-surface)] text-base font-normal text-[var(--onboarding-inverse-text)] shadow-none hover:opacity-90 disabled:border-transparent disabled:bg-[var(--onboarding-surface-tertiary)] disabled:text-[var(--onboarding-text-tertiary)] disabled:opacity-100"+ >+ {isSSOLoading ? <Loader2 className="size-4 animate-spin" /> : null}+ {isSSOLoading+ ? t("auth.social.completeInBrowser")+ : t("auth.emailStep.continueWithEmail")}+ </Button>+ </form>++ <button+ type="button"+ onClick={handleBackFromSSOEmailStep}+ disabled={isSSOLoading}+ className="mt-4 text-sm font-medium text-[var(--onboarding-text-primary)] transition-colors hover:text-[var(--onboarding-text-secondary)] disabled:opacity-50"+ >+ {t("auth.common.back")}+ </button>++ {!oauthProtocolRegistered && (+ <p className="mt-3 text-center text-xs leading-tight text-muted-foreground/80">+ {t("auth.social.protocolUnavailable")}+ </p>+ )}++ {error && (+ <div className="mt-3 flex items-center gap-2 rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-left">+ <AlertCircle className="size-3.5 shrink-0 text-destructive" />+ <p className="text-xs text-destructive">{error}</p>+ </div>+ )}+ </div>+ </CompactOnboardingFrame>+ );+ }+if (ssoDiscovery && authMode === null) {return (<CompactOnboardingFrame embedded={embedded}>@@ -649,7 +754,13 @@ export default function AuthenticationStep({onClick: () => handleSocialSignIn("microsoft"),loading: isSocialLoading === "microsoft",},- { id: "sso", label: "SSO", icon: Building2, onClick: handleSSOSignIn, loading: isSSOLoading },+ {+ id: "sso",+ label: "SSO",+ icon: Building2,+ onClick: handleOpenSSOEmailStep,+ loading: isSSOLoading,+ },];return (diff --git a/src/components/CompactAuthenticationFlow.tsx b/src/components/CompactAuthenticationFlow.tsxindex 507cce91b..b0ade494a 100644--- a/src/components/CompactAuthenticationFlow.tsx+++ b/src/components/CompactAuthenticationFlow.tsx@@ -2,30 +2,55 @@ import { useState, type JSX } from "react";import { signOut } from "../lib/auth";import AuthenticationStep from "./AuthenticationStep";import EmailVerificationStep from "./EmailVerificationStep";+import type { OnboardingAuthDraft } from "./onboarding/flow";interface CompactAuthenticationFlowProps {onContinueWithoutAccount?: () => void;onAuthComplete: () => void;+ resumeState?: OnboardingAuthDraft;+ onResumeStateChange?: (state: Partial<OnboardingAuthDraft>) => void;}export function CompactAuthenticationFlow({onContinueWithoutAccount,onAuthComplete,+ resumeState,+ onResumeStateChange,}: CompactAuthenticationFlowProps): JSX.Element {- const [pendingVerificationEmail, setPendingVerificationEmail] = useState<string | null>(null);+ const [pendingVerificationEmail, setPendingVerificationEmail] = useState<string | null>(+ resumeState?.pendingVerificationEmail ?? null+ );+ // A restored address was never mailed from this session, so the verification+ // screen must not open on a cooldown for a message nobody just sent.+ const [resumedVerification, setResumedVerification] = useState(+ Boolean(resumeState?.pendingVerificationEmail)+ );++ const updatePendingVerificationEmail = (+ email: string | null,+ patch?: Partial<OnboardingAuthDraft>+ ) => {+ setPendingVerificationEmail(email);+ setResumedVerification(false);+ onResumeStateChange?.({ pendingVerificationEmail: email, ...patch });+ };if (pendingVerificationEmail) {return (<EmailVerificationStepemail={pendingVerificationEmail}+ resumed={resumedVerification}onVerified={() => {- setPendingVerificationEmail(null);+ updatePendingVerificationEmail(null);onAuthComplete();}}onBack={() => {// Abandoning verification leaves a live session for the wrong email;// end it first or the remounted auth step auto-completes that account.- void signOut().then(() => setPendingVerificationEmail(null));+ // The draft still says "sign-up", which is what opened this screen — send+ // the user back to sign-in as the button promises, rather than to the+ // create-account form for an address that now exists.+ void signOut().then(() => updatePendingVerificationEmail(null, { authMode: "sign-in" }));}}/>);@@ -35,7 +60,9 @@ export function CompactAuthenticationFlow({<AuthenticationSteponContinueWithoutAccount={onContinueWithoutAccount}onAuthComplete={onAuthComplete}- onNeedsVerification={setPendingVerificationEmail}+ onNeedsVerification={updatePendingVerificationEmail}+ resumeState={resumeState}+ onResumeStateChange={onResumeStateChange}/>);}diff --git a/src/components/EmailVerificationStep.tsx b/src/components/EmailVerificationStep.tsxindex a2d2479ec..71b75db77 100644--- a/src/components/EmailVerificationStep.tsx+++ b/src/components/EmailVerificationStep.tsx@@ -6,12 +6,22 @@ import { Button } from "./ui/button";import { CircleCheck, Loader, Loader2, MailCheck, RefreshCw } from "lucide-react";import { CompactOnboardingFrame } from "./onboarding/OnboardingShell";+const RESEND_COOLDOWN_SECONDS = 60;+interface EmailVerificationStepProps {email: string;onVerified: () => void;onBack: () => void;/** Rendering inside SignInDialog rather than the onboarding window. */embedded?: boolean;+ /**+ * Restored from a saved onboarding session instead of being sent by this mount.+ * The cooldown rate-limits the mail sign-up just sent, so starting it on a resume+ * hides both the resend and the way back to sign-in for a minute over a message+ * nobody sent. On the onboarding surface that leaves no control at all, since+ * `auth` is a compact step and draws no shell footer.+ */+ resumed?: boolean;}export default function EmailVerificationStep({@@ -19,9 +29,10 @@ export default function EmailVerificationStep({onVerified,onBack,embedded = false,+ resumed = false,}: EmailVerificationStepProps) {const { t } = useTranslation();- const [resendCooldown, setResendCooldown] = useState(60);+ const [resendCooldown, setResendCooldown] = useState(resumed ? 0 : RESEND_COOLDOWN_SECONDS);const [isResending, setIsResending] = useState(false);const [verified, setVerified] = useState(false);const [error, setError] = useState<string | null>(null);@@ -90,7 +101,7 @@ export default function EmailVerificationStep({if (result.error) {setError(result.error.message || t("emailVerification.errors.resendFailed"));} else {- setResendCooldown(60);+ setResendCooldown(RESEND_COOLDOWN_SECONDS);}} catch {setError(t("emailVerification.errors.serverUnreachable"));diff --git a/src/components/OnboardingFlow.tsx b/src/components/OnboardingFlow.tsxindex 2fcfb1a7b..f7ee13c82 100644--- a/src/components/OnboardingFlow.tsx+++ b/src/components/OnboardingFlow.tsx@@ -30,21 +30,35 @@ import { usePolicyStore } from "../stores/policyStore";import { isAgentAllowed, isScreenContextAllowed } from "../stores/policyRules";import { useSettingsStore } from "../stores/settingsStore";import { getDefaultHotkey, parseHotkeyList, serializeHotkeyList } from "../utils/hotkeys";-import { formatHotkeyInstruction } from "./onboarding/hotkeyPresentation";+import {+ DEFAULT_ASSISTANT_ONBOARDING_HOTKEY,+ formatHotkeyInstruction,+ getRecommendedDictationHotkeys,+ resolveOnboardingAssistantHotkey,+ resolveOnboardingDictationHotkey,+} from "./onboarding/hotkeyPresentation";import { getValidationMessage } from "../utils/hotkeyValidator";import { validateHotkeyForSlot } from "../utils/hotkeyValidation";import { getPlatform } from "../utils/platform";import { ACCESSIBILITY_SKIPPED_KEY, areRequiredPermissionsMet } from "../utils/permissions";import { cloudPost } from "../services/cloudApi";+import { signOut } from "../lib/auth";import logger from "../utils/logger";import {COMPACT_STEPS,getNextOnboardingStep,+ getNotesFooterAction,getOnboardingProgress,getOnboardingRoute,reconcileStepWithRoute,+ resetOnboardingProgress,resolveEnterpriseWorkspaceForOnboarding,+ shouldOfferOnboardingLogout,shouldSkipOnboardingSetupChoice,+ type OnboardingAuthDraft,+ type OnboardingByokDraft,+ type OnboardingLocalModelDraft,+ type OnboardingResumeState,type OnboardingSetupMode,type OnboardingStepId,} from "./onboarding/flow";@@ -76,6 +90,7 @@ function DemoHotkeyDescription({ text, hotkey }: { text: string; hotkey: stringexport default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {const { t } = useTranslation();+ const platform = getPlatform();const { isSignedIn } = useAuth();const agentAllowed = usePolicyStore(isAgentAllowed);const screenContextAllowed = usePolicyStore(isScreenContextAllowed);@@ -92,21 +107,31 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {clearSession,} = useOnboardingSession();- const [dictationHotkey, setDictationHotkey] = useState(- () => parseHotkeyList(settings.dictationKey)[0] || getDefaultHotkey()+ const handleLogout = useCallback(async () => {+ await signOut();+ resetOnboardingProgress(localStorage);+ window.location.reload();+ }, []);++ const { dictationHotkeyConfirmed, assistantHotkeyConfirmed } = session.resume;+ const [dictationHotkey, setDictationHotkey] = useState(() =>+ resolveOnboardingDictationHotkey({+ platform,+ savedHotkey: parseHotkeyList(settings.dictationKey)[0] ?? "",+ platformDefault: getDefaultHotkey(),+ confirmed: dictationHotkeyConfirmed,+ }));- const [assistantHotkey, setAssistantHotkey] = useState(- () => parseHotkeyList(settings.voiceAgentKey)[0] || "CommandOrControl+Shift+Space"+ const [assistantHotkey, setAssistantHotkey] = useState(() =>+ resolveOnboardingAssistantHotkey(parseHotkeyList(settings.voiceAgentKey)[0] ?? ""));- const [dictationHotkeyConfirmed, setDictationHotkeyConfirmed] = useState(false);- const [assistantHotkeyConfirmed, setAssistantHotkeyConfirmed] = useState(false);// Seeded from main rather than getDefaultHotkey(): main already knows when the// platform default can't bind (GNOME/X11 reject modifier-only combos) and// registered a fallback instead — recommending the unregistrable default would// make every confirm of it fail.const [recommendedDictationHotkey, setRecommendedDictationHotkey] = useState(getDefaultHotkey);- const [dictationDemoSuccess, setDictationDemoSuccess] = useState(false);- const [assistantDemoSuccess, setAssistantDemoSuccess] = useState(false);+ const dictationDemoSuccess = session.resume.dictationDemoCompleted;+ const assistantDemoSuccess = session.resume.assistantDemoCompleted;const [stageReady, setStageReady] = useState(false);const [isFinishing, setIsFinishing] = useState(false);const [fatalError, setFatalError] = useState<string | null>(null);@@ -116,6 +141,53 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {} | null>(null);const [, setAccessibilitySkipped] = useLocalStorage(ACCESSIBILITY_SKIPPED_KEY, false);+ const updateResumeFlag = useCallback(+ (+ key: Extract<+ keyof OnboardingResumeState,+ | "dictationHotkeyConfirmed"+ | "assistantHotkeyConfirmed"+ | "dictationDemoCompleted"+ | "assistantDemoCompleted"+ >,+ value: boolean+ ) => {+ setSession((current) => ({+ ...current,+ resume: { ...current.resume, [key]: value },+ }));+ },+ [setSession]+ );+ const setDictationHotkeyConfirmed = useCallback(+ (confirmed: boolean) => updateResumeFlag("dictationHotkeyConfirmed", confirmed),+ [updateResumeFlag]+ );+ const setAssistantHotkeyConfirmed = useCallback(+ (confirmed: boolean) => updateResumeFlag("assistantHotkeyConfirmed", confirmed),+ [updateResumeFlag]+ );+ const setDictationDemoSuccess = useCallback(+ (successful: boolean) => updateResumeFlag("dictationDemoCompleted", successful),+ [updateResumeFlag]+ );+ const setAssistantDemoSuccess = useCallback(+ (successful: boolean) => updateResumeFlag("assistantDemoCompleted", successful),+ [updateResumeFlag]+ );+ const updateAuthResumeState = useCallback(+ (patch: Partial<OnboardingAuthDraft>) => {+ setSession((current) => ({+ ...current,+ resume: {+ ...current.resume,+ auth: { ...current.resume.auth, ...patch },+ },+ }));+ },+ [setSession]+ );+const permissions = usePermissions((dialog) =>setPermissionAlert({ title: dialog.title, description: dialog.description }));@@ -175,6 +247,13 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {session.authPath === "account" &&(!workspacesLoaded ||(!activeWorkspace && skipSetupChoiceForEnterprise && Boolean(enterpriseWorkspace)));+ const notesFooterAction = getNotesFooterAction({+ workspaceResolutionPending,+ hasConnectedCalendar:+ settingsStore.gcalAccounts.length > 0 ||+ settingsStore.mcalAccounts.length > 0 ||+ (platform === "darwin" && settingsStore.appleCalendarConnected),+ });// The setting turns on only once the permission is actually granted, so an// Enable click whose System Settings grant is abandoned can't leave screen@@ -236,6 +315,32 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {);const currentStepId = reconcileStepWithRoute(session.currentStepId, route);const compact = COMPACT_STEPS.has(currentStepId);+ const updateCurrentByokDraft = useCallback(+ (state: OnboardingByokDraft) => {+ if (currentStepId !== "byok-dictation" && currentStepId !== "byok-assistant") return;+ setSession((current) => ({+ ...current,+ resume: {+ ...current.resume,+ byok: { ...current.resume.byok, [currentStepId]: state },+ },+ }));+ },+ [currentStepId, setSession]+ );+ const updateCurrentLocalModelDraft = useCallback(+ (state: OnboardingLocalModelDraft) => {+ if (currentStepId !== "local-dictation" && currentStepId !== "local-assistant") return;+ setSession((current) => ({+ ...current,+ resume: {+ ...current.resume,+ localModels: { ...current.resume.localModels, [currentStepId]: state },+ },+ }));+ },+ [currentStepId, setSession]+ );useEffect(() => {if (currentStepId === "required-models") requiredModelsLatchRef.current = true;@@ -327,8 +432,8 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {});const validateDictationHotkey = useCallback(- (value: string) => getValidationMessage(value, getPlatform()),- []+ (value: string) => getValidationMessage(value, platform),+ [platform]);const validateAssistantHotkey = useCallback((value: string) =>@@ -517,7 +622,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {setFatalError(null);if (currentStepId === "notes" && workspaceResolutionPending) return;if (currentStepId === "permissions") {- if (getPlatform() === "darwin" && !permissions.accessibilityPermissionGranted) {+ if (platform === "darwin" && !permissions.accessibilityPermissionGranted) {setAccessibilitySkipped(true);}} else if (currentStepId === "languages") {@@ -532,6 +637,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {setFatalError(t("onboarding.hotkey.couldNotRegisterDescription"));return;}+ setDictationHotkeyConfirmed(true);} else if (currentStepId === "assistant-hotkey") {if (parseHotkeyList(settings.voiceAgentKey)[0] !== assistantHotkey) {const registered = await settings.setVoiceAgentKey(@@ -588,10 +694,12 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {finalizeOnboarding,goTo,permissions.accessibilityPermissionGranted,+ platform,registerHotkey,route,session.setupMode,setAccessibilitySkipped,+ setDictationHotkeyConfirmed,settings,settingsStore,syncUseCases,@@ -630,7 +738,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {case "assistant-demo":return assistantDemoSuccess;case "notes":- return !workspaceResolutionPending;+ return notesFooterAction === "continue";case "byok-dictation":case "byok-assistant":case "local-dictation":@@ -647,6 +755,8 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {return (<div className="min-h-full w-full"><CompactAuthenticationFlow+ resumeState={session.resume.auth}+ onResumeStateChange={updateAuthResumeState}onContinueWithoutAccount={() => {// Guests continue onto their route's permissions step — jumping// straight to setup-choice would skip the permission grants and@@ -698,6 +808,11 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {}: undefined}+ onLogout={+ shouldOfferOnboardingLogout({ isSignedIn, authPath: session.authPath })+ ? handleLogout+ : undefined+ }onContinue={() => void continueFromCurrentStep()}/>);@@ -739,9 +854,6 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {case "assistant-hotkey": {const assistant = currentStepId === "assistant-hotkey";return (- // Flex column: the preview illustration is allowed to shrink so the- // capture box below it always stays inside the shell, which is- // overflow-hidden.<div className="flex h-full min-h-0 w-full flex-col pt-2"><OnboardingStepHeadertitle={t(@@ -768,13 +880,8 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {/>{assistant && <AssistantHotkeyPreview />}<ShortcutSetupStep- value={- (assistant ? assistantHotkeyConfirmed : dictationHotkeyConfirmed)- ? assistant- ? assistantHotkey- : dictationHotkey- : ""- }+ value={assistant ? assistantHotkey : dictationHotkey}+ initiallyConfirmed={assistant ? assistantHotkeyConfirmed : dictationHotkeyConfirmed}onChange={(value) => {if (assistant) {setAssistantHotkey(value);@@ -786,19 +893,24 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {}}onClearSelection={() => {if (assistant) {+ setAssistantHotkey("");setAssistantHotkeyConfirmed(false);} else {+ setDictationHotkey("");setDictationHotkeyConfirmed(false);}}}- recommended={assistant ? "CommandOrControl+Shift+Space" : recommendedDictationHotkey}+ recommended={+ assistant+ ? DEFAULT_ASSISTANT_ONBOARDING_HOTKEY+ : getRecommendedDictationHotkeys(platform, recommendedDictationHotkey)+ }captureLabel={t("onboarding.rehaul.hotkey.capture")}recommendedLabel={t("common.recommended")}chooseAnotherLabel={t("onboarding.rehaul.hotkey.chooseAnother")}validate={assistant ? validateAssistantHotkey : validateDictationHotkey}onConfirm={assistant ? confirmAssistantHotkey : confirmDictationHotkey}dense={assistant}- showCandidateActions={!assistant}/></div>);@@ -835,7 +947,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {}/></div>- {getPlatform() === "linux" && activationMode === "push" && (+ {platform === "linux" && activationMode === "push" && (<LinuxPttSetupInfo isAvailable={supportsPushToTalk} />)}</div>@@ -887,6 +999,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {/><DemoStepkind={assistant ? "assistant" : "dictation"}+ initialSuccessful={assistant ? assistantDemoSuccess : dictationDemoSuccess}firstMessage={t(assistant? "onboarding.rehaul.assistantDemo.email"@@ -983,11 +1096,14 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {/></div><ByokProviderStep+ key={currentStepId}stepId={currentStepId}selfHostedRequested={session.selfHostedRequested}onSelfHostedChange={setSelfHostedRequested}onConnectionChange={setStageReady}onProceed={() => void continueFromCurrentStep()}+ resumeState={session.resume.byok[currentStepId]}+ onResumeStateChange={updateCurrentByokDraft}/></div>);@@ -1008,10 +1124,13 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {]}/><LocalModelSetupStep+ key={currentStepId}stepId={currentStepId}onReadinessChange={setStageReady}onProceed={() => void continueFromCurrentStep()}onSkip={() => void skipLocalSetup()}+ resumeState={session.resume.localModels[currentStepId]}+ onResumeStateChange={updateCurrentLocalModelDraft}/></div>);@@ -1021,6 +1140,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {const hasShellNavigation = !compact;const hotkeyStep = currentStepId === "dictation-hotkey" || currentStepId === "assistant-hotkey";const demoStep = currentStepId === "dictation-demo" || currentStepId === "assistant-demo";+ const notesStep = currentStepId === "notes";const inlineGatedStep = hotkeyStep || demoStep;const choiceStep = currentStepId === "setup-choice";const inlineProviderStep =@@ -1028,13 +1148,17 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {currentStepId === "byok-assistant" ||currentStepId === "local-dictation" ||currentStepId === "local-assistant";- // Choice/provider pages own their forward action, while hotkey/demo pages- // withhold Continue until their task is complete.+ // Choice/provider pages own their forward action. Hotkey/demo pages withhold+ // Continue until complete; Notes does the same until a calendar is connected.const showsContinue =- hasShellNavigation && !choiceStep && !inlineProviderStep && (!inlineGatedStep || canContinue);- // Keep this branch's demo escape hatch: practice must remain skippable when a- // microphone or backend problem prevents completion.- const showsSkip = demoStep && !canContinue;+ hasShellNavigation &&+ !choiceStep &&+ !inlineProviderStep &&+ (!inlineGatedStep || canContinue) &&+ (!notesStep || notesFooterAction !== "skip");+ // Practice remains skippable if it cannot complete. Calendar connections are+ // optional, so Notes starts with Skip and replaces it with Continue on connect.+ const showsSkip = (demoStep && !canContinue) || (notesStep && notesFooterAction === "skip");return (<>@@ -1051,9 +1175,8 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {: undefined}onContinue={showsContinue ? () => void continueFromCurrentStep() : undefined}- // The demos are practice, not configuration — a mic problem or an- // unreachable transcription backend must never dead-end setup, so they- // stay skippable until they succeed.+ // Demos are optional practice, and calendar connections on Notes are+ // optional setup. Both advance through the same persisted route.onSkip={showsSkip ? () => void continueFromCurrentStep() : undefined}continueLabel={currentStepId === "use-cases"@@ -1063,7 +1186,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {skipLabel={t("common.skip")}continueDisabled={!canContinue}continueLoading={- isFinishing || isRegistering || (currentStepId === "notes" && workspaceResolutionPending)+ isFinishing || isRegistering || (notesStep && notesFooterAction === "loading")}progress={getOnboardingProgress(currentStepId, route)}// Label Back only when it is the sole footer action. Unlike the sourcediff --git a/src/components/onboarding/AssistantHotkeyPreview.tsx b/src/components/onboarding/AssistantHotkeyPreview.tsxindex 15067c385..fff6f6797 100644--- a/src/components/onboarding/AssistantHotkeyPreview.tsx+++ b/src/components/onboarding/AssistantHotkeyPreview.tsx@@ -11,20 +11,23 @@ import assistantPreview from "../../assets/onboarding-assistant-preview.webp";* it stays English in every locale. It is illustrative chrome, not UI the user* reads for meaning.*- * `shrink` + `min-h-0` matter — this is decoration, so on a short window it gives- * way and crops rather than pushing the hotkey capture box out of the shell.+ * This stays above the shortcut controls and outside the shrinking flex pool.+ * The frame crops a lightly enlarged image so no export edge or component+ * border is visible around the artwork.*/export default function AssistantHotkeyPreview() {return (- <img- src={assistantPreview}- alt=""- aria-hidden="true"- width={561}- height={318}- decoding="async"- draggable={false}- className="mx-auto mt-6 h-auto min-h-0 w-full max-w-[26rem] shrink select-none rounded-2xl border border-[var(--onboarding-control-border)] object-cover"- />+ <div className="mx-auto mt-3 aspect-video w-full max-w-[30rem] shrink-0 overflow-hidden rounded-2xl">+ <img+ src={assistantPreview}+ alt=""+ aria-hidden="true"+ width={561}+ height={318}+ decoding="async"+ draggable={false}+ className="h-full w-full scale-105 select-none object-cover"+ />+ </div>);}diff --git a/src/components/onboarding/BackgroundModelDownloadTray.tsx b/src/components/onboarding/BackgroundModelDownloadTray.tsxindex b17c3f7fe..94323bb8a 100644--- a/src/components/onboarding/BackgroundModelDownloadTray.tsx+++ b/src/components/onboarding/BackgroundModelDownloadTray.tsx@@ -1,4 +1,4 @@-import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { useCallback, useEffect, useMemo, useRef, useState, type CSSProperties } from "react";import { useTranslation } from "react-i18next";import { ProviderIcon } from "../ui/ProviderIcon";import { BrandMark } from "./OnboardingShell";@@ -24,6 +24,7 @@ import type {} from "../../types/electron";import { mergeHydratedDownloads } from "./localDownloadState";import { ONBOARDING_SESSION_KEY, isRequiredModelsOnboardingStepActive } from "./flow";+import { getPlatform } from "../../utils/platform";type DownloadKind = "whisper" | "parakeet" | "llm";@@ -119,7 +120,11 @@ function CancelGlyph() {);}-export default function BackgroundModelDownloadTray() {+export default function BackgroundModelDownloadTray({+ placement = "control-panel",+}: {+ placement?: "onboarding" | "control-panel";+}) {const { t } = useTranslation();const [downloads, setDownloads] = useState<Record<string, ActiveDownload>>({});const [hydrated, setHydrated] = useState(false);@@ -364,6 +369,12 @@ export default function BackgroundModelDownloadTray() {}, []);const activeDownloads = useMemo(() => Object.values(downloads), [downloads]);+ const positionClass =+ placement === "onboarding"+ ? getPlatform() === "darwin"+ ? "right-5 top-5"+ : "right-5 top-14"+ : "right-7 bottom-5";useEffect(() => {if (hydrated && activeDownloads.length === 0 && !hasPendingLocalModels()) {@@ -383,7 +394,10 @@ export default function BackgroundModelDownloadTray() {// both contexts and match the Figma light values within a couple of hex// steps.<aside- className="fixed right-7 bottom-5 z-50 w-[341px] overflow-hidden rounded-[12px] border border-border bg-card text-card-foreground"+ className={`fixed z-[60] w-[341px] overflow-hidden rounded-[12px] border border-border bg-card text-card-foreground ${positionClass}`}+ style={+ placement === "onboarding" ? ({ WebkitAppRegion: "no-drag" } as CSSProperties) : undefined+ }aria-label={t("onboarding.rehaul.local.downloads")}aria-live="polite">@@ -415,7 +429,7 @@ export default function BackgroundModelDownloadTray() {{downloadDisplay(download).name}</span></span>- <span className="shrink-0 font-medium text-muted-foreground">+ <span className="shrink-0 font-medium tabular-nums text-muted-foreground">{Math.round(download.percentage)}%</span></div>diff --git a/src/components/onboarding/CompactPermissionsStep.tsx b/src/components/onboarding/CompactPermissionsStep.tsxindex b1097fd60..2bfc1ece8 100644--- a/src/components/onboarding/CompactPermissionsStep.tsx+++ b/src/components/onboarding/CompactPermissionsStep.tsx@@ -1,6 +1,5 @@-import { useState, type CSSProperties } from "react";-import { createPortal } from "react-dom";-import { CircleCheck } from "lucide-react";+import { useState, type ReactNode } from "react";+import { CircleCheck, Laptop, LogOut } from "lucide-react";import { useTranslation } from "react-i18next";// Imported (not referenced by path) so Vite fingerprints them and they resolve// under the packaged app's file:// origin. Authored at 88px (2x the original@@ -9,7 +8,6 @@ import { useTranslation } from "react-i18next";import microphoneIcon from "@/assets/onboarding-permission-microphone.webp";import accessibilityIcon from "@/assets/onboarding-permission-accessibility.webp";import systemAudioIcon from "@/assets/onboarding-permission-system-audio.webp";-import screenContextIcon from "@/assets/onboarding-permission-screen-context.webp";import type { UsePermissionsReturn } from "../../hooks/usePermissions";import type { SystemAudioAccessResult } from "../../types/electron";import { canManageSystemAudioInApp } from "../../utils/systemAudioAccess";@@ -31,6 +29,8 @@ interface CompactPermissionsStepProps {needsRelaunch: boolean;request: () => Promise<boolean>;};+ /** Omitted on the guest route, which never signed in. */+ onLogout?: () => Promise<void>;onContinue: () => void;}@@ -39,20 +39,24 @@ type PermissionRowId = "microphone" | "accessibility" | "system-audio" | "screeninterface PermissionRowProps {title: string;description: string;+ badge?: string;granted: boolean;busy: boolean;disabled?: boolean;- iconSrc: string;+ iconSrc?: string;+ icon?: ReactNode;onRequest: () => Promise<void>;}function PermissionRow({title,description,+ badge,granted,busy,disabled = false,iconSrc,+ icon,onRequest,}: PermissionRowProps) {const { t } = useTranslation();@@ -62,20 +66,27 @@ function PermissionRow({{/* Decorative: the adjacent title and description already name thepermission, so announcing the icon too would just duplicate it. Theicon stays put once granted — the button carries the state. */}- <img- src={iconSrc}- alt=""- aria-hidden="true"- width={40}- height={40}- decoding="async"- draggable={false}- className="size-10 shrink-0 select-none"- />+ {icon ?? (+ <img+ src={iconSrc}+ alt=""+ aria-hidden="true"+ width={40}+ height={40}+ decoding="async"+ draggable={false}+ className="size-10 shrink-0 select-none"+ />+ )}<div className="min-w-0 flex-1 text-left"><p className="text-sm font-medium leading-5 text-[var(--onboarding-text-primary)]">{title}+ {badge && (+ <span className="ml-1.5 inline-flex items-center rounded-full bg-[var(--onboarding-surface-tertiary)] px-2 py-0.5 align-middle text-[10px] font-normal leading-4 text-[var(--onboarding-text-secondary)]">+ {badge}+ </span>+ )}</p><p className="mt-0.5 line-clamp-2 text-xs leading-4 text-[var(--onboarding-text-secondary)]">{description}@@ -109,6 +120,7 @@ export default function CompactPermissionsStep({permissions,systemAudio,screenContext,+ onLogout,onContinue,}: CompactPermissionsStepProps) {const { t } = useTranslation();@@ -141,26 +153,7 @@ export default function CompactPermissionsStep({return (<CompactOnboardingFrame showLegalNotice={false}>- {/* Continue appears once the required permission (microphone) is granted.- Portalled to body: inside the step wrapper it can never out-stack the- shell's z-50 drag band (see OnboardingShell), so clicks would be- swallowed as window drags. */}- {requiredGranted &&- createPortal(- <button- type="button"- onClick={onContinue}- // Literal white, not tokens: this sits on the indigo hero, which- // stays indigo in both themes.- style={{ WebkitAppRegion: "no-drag" } as CSSProperties}- className={`onboarding-pressable fixed top-4 z-[60] h-7 rounded-full bg-white px-3 text-xs font-medium text-neutral-950 transition-colors hover:bg-white/85 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70 ${platform === "darwin" ? "right-4" : "right-24"}`}- >- {t("common.continue")}- </button>,- document.body- )}-- <div className="onboarding-shell-scroll h-full overflow-y-auto px-5 pb-4 pt-44 text-center">+ <div className="onboarding-shell-scroll relative flex h-full flex-col overflow-y-auto px-5 pb-6 pt-38 text-center">{/* text-balance evens the two lines out ("Set up OpenWhispr" / "in 3minutes") instead of leaving one word stranded. Preferred over ahardcoded <br> because the break point stays correct in all 9@@ -172,7 +165,7 @@ export default function CompactPermissionsStep({{t("auth.welcomeSubtitle")}</p>- <div className="mt-8 rounded-[1.35rem] bg-[var(--onboarding-surface-secondary)] px-3 py-1">+ <div className="mt-6 rounded-[1.35rem] bg-[var(--onboarding-surface-secondary)] px-3 py-1"><PermissionRowtitle={t("onboarding.permissions.microphoneTitle")}description={t("onboarding.rehaul.permissions.microphoneDescription")}@@ -202,6 +195,7 @@ export default function CompactPermissionsStep({<PermissionRowtitle={t("onboarding.rehaul.permissions.systemAudioTitle")}description={t("onboarding.rehaul.permissions.systemAudioDescription")}+ badge={t("onboarding.permissions.optional")}granted={systemAudio.granted}busy={busyPermission === "system-audio"}disabled={!canRequestSystemAudio}@@ -216,9 +210,17 @@ export default function CompactPermissionsStep({<PermissionRowtitle={t("dictationAgent.screenContext.title")}description={t("onboarding.rehaul.permissions.screenContextDescription")}+ badge={t("onboarding.permissions.optional")}granted={screenContext.enabled && screenContext.granted}busy={busyPermission === "screen-context"}- iconSrc={screenContextIcon}+ icon={+ <span+ aria-hidden="true"+ className="flex size-10 shrink-0 items-center justify-center rounded-xl bg-[var(--onboarding-accent)] text-[var(--onboarding-accent-foreground)]"+ >+ <Laptop className="size-5" strokeWidth={2.2} />+ </span>+ }onRequest={() => request("screen-context", screenContext.request)}/></>@@ -250,6 +252,32 @@ export default function CompactPermissionsStep({/></div>)}++ {/* Last child so mt-auto actually pins the actions to the bottom: any+ element after them rides along on that auto margin, which put the+ relaunch hint and the two warnings below the buttons — and, on Linux+ where the paste guidance is the point of the screen, out of view. */}+ <div className="mt-auto flex w-full shrink-0 items-center justify-between gap-3 pt-5">+ {onLogout && (+ <button+ type="button"+ onClick={() => void onLogout()}+ className="onboarding-pressable inline-flex h-10 flex-1 items-center justify-center gap-1.5 rounded-full border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] px-5 text-sm font-medium text-[var(--onboarding-text-primary)] transition-colors hover:bg-[var(--onboarding-surface-hover)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--onboarding-accent)_30%,transparent)]"+ >+ <LogOut className="size-3.5" aria-hidden="true" />+ {t("common.logout")}+ </button>+ )}++ <button+ type="button"+ onClick={onContinue}+ disabled={!requiredGranted}+ className="onboarding-pressable h-10 flex-1 rounded-full bg-[var(--onboarding-accent)] px-5 text-sm font-medium text-[var(--onboarding-accent-foreground)] transition-colors hover:bg-[var(--onboarding-accent-hover)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--onboarding-accent)_30%,transparent)] disabled:cursor-default disabled:bg-[var(--onboarding-surface-tertiary)] disabled:text-[var(--onboarding-text-tertiary)]"+ >+ {t("common.continue")}+ </button>+ </div></div></CompactOnboardingFrame>);diff --git a/src/components/onboarding/DemoStep.tsx b/src/components/onboarding/DemoStep.tsxindex eae5e7c20..797b82373 100644--- a/src/components/onboarding/DemoStep.tsx+++ b/src/components/onboarding/DemoStep.tsx@@ -182,6 +182,7 @@ interface DemoStepProps {assistantSenderEmail?: string;assistantRecipientLabel?: string;onSuccessChange: (successful: boolean) => void;+ initialSuccessful?: boolean;}export default function DemoStep({@@ -198,11 +199,13 @@ export default function DemoStep({assistantSenderEmail,assistantRecipientLabel,onSuccessChange,+ initialSuccessful = false,}: DemoStepProps) {const [messageCount, setMessageCount] = useState(0);const [event, setEvent] = useState<OnboardingDemoEvent | null>(null);const [draft, setDraft] = useState("");const [demoId, setDemoId] = useState(() => crypto.randomUUID());+ const [restoredSuccessful, setRestoredSuccessful] = useState(initialSuccessful);const inputRef = useRef<HTMLTextAreaElement>(null);useEffect(() => {@@ -220,6 +223,7 @@ export default function DemoStep({void window.electronAPI?.beginOnboardingDemo?.({ id: demoId, kind });const unsubscribe = window.electronAPI?.onOnboardingDemoEvent?.((payload) => {if (payload.demoId !== demoId || payload.kind !== kind) return;+ setRestoredSuccessful(false);setEvent(payload);if (payload.text) setDraft(payload.text);if (payload.status === "success") onSuccessChange(true);@@ -231,6 +235,7 @@ export default function DemoStep({}, [demoId, kind, onSuccessChange]);const retry = () => {+ setRestoredSuccessful(false);onSuccessChange(false);setEvent(null);setDraft("");@@ -238,7 +243,10 @@ export default function DemoStep({setDemoId(crypto.randomUUID());};- const status = event?.status;+ const effectiveEvent: OnboardingDemoEvent | null = restoredSuccessful+ ? { demoId, kind, status: "success" }+ : event;+ const status = effectiveEvent?.status;const successful = status === "success";return (@@ -287,7 +295,7 @@ export default function DemoStep({value={draft}onChange={setDraft}placeholder={placeholder}- event={event}+ event={effectiveEvent}listeningLabel={listeningLabel}processingLabel={processingLabel}stopLabel={stopLabel}@@ -355,7 +363,7 @@ export default function DemoStep({value={draft || (successful ? (assistantResponse ?? "") : "")}onChange={setDraft}placeholder={secondMessage}- event={event}+ event={effectiveEvent}listeningLabel={listeningLabel}processingLabel={processingLabel}stopLabel={stopLabel}diff --git a/src/components/onboarding/OnboardingShell.tsx b/src/components/onboarding/OnboardingShell.tsxindex b50c6f0c7..45748f50d 100644--- a/src/components/onboarding/OnboardingShell.tsx+++ b/src/components/onboarding/OnboardingShell.tsx@@ -353,7 +353,7 @@ export function CompactOnboardingFrame({return (<section className="relative flex h-full min-h-screen w-full flex-col overflow-hidden bg-[var(--onboarding-surface)] text-[var(--onboarding-text-primary)]"><div- className="onboarding-compact-hero pointer-events-none absolute inset-x-0 top-0 h-48"+ className="onboarding-compact-hero pointer-events-none absolute inset-x-0 top-0 h-52"// Both strips are handed over as custom properties and .onboarding-compact-hero// picks one per theme; the URLs have to come from here because only an import// gets fingerprinted by Vite and resolves under the packaged file:// origin.diff --git a/src/components/onboarding/ProviderSetupStep.tsx b/src/components/onboarding/ProviderSetupStep.tsxindex 97b4ec922..fc5f54993 100644--- a/src/components/onboarding/ProviderSetupStep.tsx+++ b/src/components/onboarding/ProviderSetupStep.tsx@@ -1,4 +1,4 @@-import { useCallback, useEffect, useMemo, useState, type ReactNode } from "react";+import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";import { AudioLines, Check, CircleCheck, Download, MousePointer2 } from "lucide-react";import { useTranslation } from "react-i18next";import ProviderConnectionTest from "./ProviderConnectionTest";@@ -24,7 +24,13 @@ import {type TranscriptionProviderData,} from "../../models/ModelRegistry";import { pickDefaultModelId } from "../../models/providerDefaultModel";-import type { OnboardingStepId } from "./flow";+import {+ RESUME_DRAFT_PERSIST_DELAY_MS,+ type OnboardingByokDraft,+ type OnboardingLocalModelDraft,+ type OnboardingStepId,+} from "./flow";+import { useDebouncedCallback } from "../../hooks/useDebouncedCallback";import {forgetPendingLocalModel,isPendingLocalModel,@@ -36,48 +42,39 @@ import { isLocalStageDownloadActive } from "./localDownloadState";export function SetupStageStepper({ stepId }: { stepId: OnboardingStepId }) {const { t } = useTranslation();const assistant = stepId.endsWith("assistant");- const local = stepId.startsWith("local");return (<div- className="relative mx-auto flex w-36 items-start justify-between"+ className="relative mx-auto flex items-start justify-between w-40"aria-label={t("onboarding.rehaul.provider.progress")}>- <span className="absolute left-8 right-8 top-3.5 border-t border-dashed border-[var(--onboarding-control-border)]" />+ <span className="absolute left-8 right-8 border-t border-dashed border-[var(--onboarding-control-border)] top-4" /><div className="relative z-10 flex w-14 flex-col items-center gap-1.5 text-[var(--onboarding-text-secondary)]"><span- className={`flex size-7 items-center justify-center rounded-full ${+ className={`flex items-center justify-center rounded-full size-8 ${assistant? "bg-[var(--onboarding-accent)] text-[var(--onboarding-accent-foreground)]": "bg-[var(--onboarding-inverse-surface)] text-[var(--onboarding-inverse-text)]"}`}>{assistant ? (- local ? (- <AudioLines className="size-3.5" />- ) : (- <CircleCheck className="size-3.5" strokeWidth={2} />- )+ <CircleCheck className="size-4" strokeWidth={2} />) : (- <AudioLines className="size-3.5" />+ <AudioLines className="size-4" />)}</span>- <span className="text-[0.6875rem]">{t("onboarding.rehaul.provider.dictation")}</span>+ <span className="text-xs">{t("onboarding.rehaul.provider.dictation")}</span></div><div className="relative z-10 flex w-14 flex-col items-center gap-1.5 text-[var(--onboarding-text-secondary)]"><span- className={`flex size-7 items-center justify-center rounded-full ${+ className={`flex items-center justify-center rounded-full size-8 ${assistant? "bg-[var(--onboarding-inverse-surface)] text-[var(--onboarding-inverse-text)]": "border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] text-[var(--onboarding-text-primary)]"}`}>- <MousePointer2 className="size-3.5" />- </span>- <span className="text-[0.6875rem]">- {local && assistant- ? t("onboarding.rehaul.local.agent")- : t("onboarding.rehaul.provider.assistant")}+ <MousePointer2 className="size-4" /></span>+ <span className="text-xs">{t("onboarding.rehaul.provider.assistant")}</span></div></div>);@@ -140,12 +137,17 @@ function StepSecondaryAction({}/** The card each setup mode's step renders into. Top margin is per call site. */-export const SETUP_CARD_CLASS =- "mx-auto w-full max-w-[22rem] rounded-[1.125rem] border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] px-3 py-4 text-[var(--onboarding-text-primary)]";+const SETUP_CARD_BASE_CLASS =+ "mx-auto w-full rounded-[1.125rem] border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] text-[var(--onboarding-text-primary)]";++export const SETUP_CARD_CLASS = `${SETUP_CARD_BASE_CLASS} max-w-[30rem] px-3 py-4`;+const LOCAL_MODEL_CARD_CLASS = `${SETUP_CARD_BASE_CLASS} max-w-[30rem] px-4 py-4`;/** The field trigger. Call sites that can be disabled add the disabled: variants. */const SELECT_TRIGGER_CLASS ="h-9 rounded-xl border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface-secondary)] px-3 text-xs text-[var(--onboarding-text-primary)]";+const LOCAL_SELECT_TRIGGER_CLASS =+ "h-12 rounded-xl border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface-secondary)] px-3 text-sm text-[var(--onboarding-text-primary)]";/*** The dropdown sheet, Figma "Onboarding / Frame 16": radius 17 on@@ -213,6 +215,47 @@ function providerCredential(provider: string, store: ReturnType<typeof useSettin}}+/**+ * The provider/model a local step opens on: the draft this step last wrote, then+ * a selection whose download is still pending, then whatever the store already+ * holds. Reads localStorage, so it belongs in a state initializer, not a render.+ */+function resolveInitialLocalSelection(+ assistant: boolean,+ resumeState: OnboardingLocalModelDraft | undefined,+ store: ReturnType<typeof useSettingsStore.getState>+): OnboardingLocalModelDraft {+ const pending = readPendingLocalModels()[assistant ? "assistant" : "dictation"];+ const savedProvider = assistant+ ? modelRegistry.getProvider(store.chatAgentProvider)+ ? store.chatAgentProvider+ : "qwen"+ : store.localTranscriptionProvider === "nvidia"+ ? "nvidia"+ : "whisper";+ const requestedProvider = resumeState?.provider || pending?.provider || savedProvider;+ const provider = assistant+ ? modelRegistry.getProvider(requestedProvider)+ ? requestedProvider+ : "qwen"+ : requestedProvider === "nvidia"+ ? "nvidia"+ : "whisper";+ const savedModel = assistant+ ? store.chatAgentModel+ : provider === "nvidia"+ ? store.parakeetModel+ : store.whisperModel;++ return {+ provider,+ modelId:+ (resumeState?.provider === provider ? resumeState.modelId : "") ||+ (pending?.provider === provider ? pending.modelId : "") ||+ savedModel,+ };+}+type HostedProvider = CloudProviderData | TranscriptionProviderData;function FieldLabel({ children }: { children: ReactNode }) {@@ -227,6 +270,8 @@ export function ByokProviderStep({onSelfHostedChange,onConnectionChange,onProceed,+ resumeState,+ onResumeStateChange,}: {stepId: "byok-dictation" | "byok-assistant";/** Set when the user picked "Self-hosted" on setup-choice rather than BYOK. */@@ -234,6 +279,8 @@ export function ByokProviderStep({onSelfHostedChange: (requested: boolean) => void;onConnectionChange: (connected: boolean) => void;onProceed: () => void;+ resumeState?: OnboardingByokDraft;+ onResumeStateChange?: (state: OnboardingByokDraft) => void;}) {const { t } = useTranslation();const store = useSettingsStore();@@ -243,32 +290,6 @@ export function ByokProviderStep({const selfHostedAllowed =isModeAllowedByPolicy(policy, scope, "self-hosted") &&isProviderAllowedByPolicy(policy, scope, "custom");- const [selfHosted, setSelfHosted] = useState(false);- const [selectedProvider, setSelectedProvider] = useState("");- const [selectedModel, setSelectedModel] = useState("");- const [draftApiKey, setDraftApiKey] = useState("");- const [draftBaseUrl, setDraftBaseUrl] = useState("");- const [draftCustomModel, setDraftCustomModel] = useState("");- const [draftCortiClientId, setDraftCortiClientId] = useState("");- const [draftCortiClientSecret, setDraftCortiClientSecret] = useState("");- const [connected, setConnected] = useState(false);-- // Policy can forbid self-hosted, in which case the checkbox isn't rendered and- // honouring the request would strand the user in fields they can't switch away- // from.- useEffect(() => {- setSelfHosted(selfHostedRequested && selfHostedAllowed);- setSelectedProvider("");- setSelectedModel("");- setDraftApiKey("");- setDraftBaseUrl("");- setDraftCustomModel("");- setDraftCortiClientId("");- setDraftCortiClientSecret("");- setConnected(false);- onConnectionChange(false);- }, [onConnectionChange, selfHostedAllowed, selfHostedRequested, stepId]);-const providers = useMemo(() =>filterByokProviderOptionsByPolicy<HostedProvider>(@@ -278,6 +299,75 @@ export function ByokProviderStep({),[assistant, policy, scope]);+ const initialProvider =+ providers.find((provider) => provider.id === resumeState?.selectedProvider)?.id ?? "";+ const initialProviderModels =+ providers.find((provider) => provider.id === initialProvider)?.models ?? [];+ const initialModel = initialProviderModels.some(+ (model) => model.id === resumeState?.selectedModel+ )+ ? (resumeState?.selectedModel ?? "")+ : (initialProviderModels[0]?.id ?? "");+ const initiallySelfHosted = selfHostedRequested && selfHostedAllowed;+ const [selfHosted, setSelfHosted] = useState(initiallySelfHosted);+ const [selectedProvider, setSelectedProvider] = useState(+ initiallySelfHosted ? "" : initialProvider+ );+ const [selectedModel, setSelectedModel] = useState(initiallySelfHosted ? "" : initialModel);+ const [draftApiKey, setDraftApiKey] = useState(() =>+ initiallySelfHosted+ ? assistant+ ? store.chatAgentCustomApiKey+ : store.customTranscriptionApiKey+ : providerCredential(initialProvider, store).value+ );+ const [draftBaseUrl, setDraftBaseUrl] = useState(resumeState?.baseUrl ?? "");+ const [draftCustomModel, setDraftCustomModel] = useState(resumeState?.customModel ?? "");+ const [draftCortiClientId, setDraftCortiClientId] = useState(+ initialProvider === "corti" ? store.cortiClientId : ""+ );+ const [draftCortiClientSecret, setDraftCortiClientSecret] = useState(+ initialProvider === "corti" ? store.cortiClientSecret : ""+ );+ const [connected, setConnected] = useState(false);++ useEffect(() => {+ onConnectionChange(false);+ }, [onConnectionChange]);++ // Base URL and custom model are typed, so the write is debounced the way the+ // auth draft is; the flush covers the pending write this card drops when the+ // step advances and unmounts it.+ const latestByokDraft = useRef<OnboardingByokDraft | null>(null);+ const flushByokDraft = useCallback(() => {+ if (latestByokDraft.current) onResumeStateChange?.(latestByokDraft.current);+ }, [onResumeStateChange]);+ const persistByokDraft = useDebouncedCallback(flushByokDraft, RESUME_DRAFT_PERSIST_DELAY_MS);++ useEffect(() => {+ latestByokDraft.current = {+ selectedProvider,+ selectedModel,+ baseUrl: draftBaseUrl,+ customModel: draftCustomModel,+ };+ persistByokDraft();+ }, [draftBaseUrl, draftCustomModel, persistByokDraft, selectedModel, selectedProvider]);++ useEffect(() => flushByokDraft, [flushByokDraft]);++ // A live policy update can remove self-hosting while this card is open.+ useEffect(() => {+ if (!selfHosted || selfHostedAllowed) return;+ setSelfHosted(false);+ onSelfHostedChange(false);+ setDraftApiKey("");+ setDraftBaseUrl("");+ setDraftCustomModel("");+ setConnected(false);+ onConnectionChange(false);+ }, [onConnectionChange, onSelfHostedChange, selfHosted, selfHostedAllowed]);+const currentProvider = providers.find((provider) => provider.id === selectedProvider);const models = currentProvider?.models ?? [];const knownCredential = providerCredential(selectedProvider, store);@@ -290,6 +380,8 @@ export function ByokProviderStep({setDraftApiKey("");setDraftBaseUrl("");setDraftCustomModel("");+ setDraftCortiClientId("");+ setDraftCortiClientSecret("");setConnected(false);onConnectionChange(false);};@@ -299,6 +391,8 @@ export function ByokProviderStep({setSelectedProvider(providerId);setSelectedModel(fallbackModel);setDraftApiKey(providerCredential(providerId, store).value);+ setDraftCortiClientId(providerId === "corti" ? store.cortiClientId : "");+ setDraftCortiClientSecret(providerId === "corti" ? store.cortiClientSecret : "");setConnected(false);onConnectionChange(false);};@@ -578,17 +672,24 @@ export function LocalModelSetupStep({onReadinessChange,onProceed,onSkip,+ resumeState,+ onResumeStateChange,}: {stepId: "local-dictation" | "local-assistant";onReadinessChange: (ready: boolean) => void;onProceed: () => void;onSkip: () => void;+ resumeState?: OnboardingLocalModelDraft;+ onResumeStateChange?: (state: OnboardingLocalModelDraft) => void;}) {const { t } = useTranslation();const store = useSettingsStore();const assistant = stepId === "local-assistant";- const [selectedProvider, setSelectedProvider] = useState(assistant ? "qwen" : "whisper");- const [selectedModel, setSelectedModel] = useState("");+ const [initialSelection] = useState(() =>+ resolveInitialLocalSelection(assistant, resumeState, store)+ );+ const [selectedProvider, setSelectedProvider] = useState(initialSelection.provider);+ const [selectedModel, setSelectedModel] = useState(initialSelection.modelId);const [downloadedWhisper, setDownloadedWhisper] = useState<Set<string>>(new Set());const [downloadedParakeet, setDownloadedParakeet] = useState<Set<string>>(new Set());const [downloadedLlm, setDownloadedLlm] = useState<Set<string>>(new Set());@@ -631,20 +732,6 @@ export function LocalModelSetupStep({void refreshDownloadedModels();}, [refreshDownloadedModels]);- useEffect(() => {- const saved = useSettingsStore.getState();- const defaultProvider = assistant- ? modelRegistry.getProvider(saved.chatAgentProvider)- ? saved.chatAgentProvider- : "qwen"- : saved.localTranscriptionProvider === "nvidia"- ? "nvidia"- : "whisper";- setSelectedProvider(defaultProvider);- setSelectedModel("");- onReadinessChange(false);- }, [assistant, onReadinessChange, stepId]);-const providerOptions = useMemo(() => {if (assistant) {return modelRegistry.getAllProviders().map((provider) => ({@@ -691,6 +778,16 @@ export function LocalModelSetupStep({}));}, [assistant, selectedProvider]);+ useEffect(() => {+ if (selectedModel && !models.some((model) => model.id === selectedModel)) {+ setSelectedModel("");+ }+ }, [models, selectedModel]);++ useEffect(() => {+ onResumeStateChange?.({ provider: selectedProvider, modelId: selectedModel });+ }, [onResumeStateChange, selectedModel, selectedProvider]);+const currentProvider = providerOptions.find((provider) => provider.id === selectedProvider);const activeDownload = assistant? llmDownload@@ -803,22 +900,22 @@ export function LocalModelSetupStep({onProceed();};+ // Only reachable while a download runs (see the action row), so the transfer+ // always needs the tray to apply its pending selection once it lands.+ const skip = () => {+ localStorage.setItem("localSetupPending", "true");+ onSkip();+ };+return (- <section className={`mt-5 ${SETUP_CARD_CLASS}`}>+ <section className={`mt-8 ${LOCAL_MODEL_CARD_CLASS}`}><SetupStageStepper stepId={stepId} />- <div className="mt-5">+ <div className="mt-6"><FieldLabel>{t("onboarding.rehaul.local.providerLabel")}</FieldLabel><Select value={selectedProvider} onValueChange={chooseProvider}>- <SelectTrigger className={SELECT_TRIGGER_CLASS}>- <div className="flex items-center gap-2">- <ProviderIcon- provider={currentProvider?.icon ?? selectedProvider}- className="size-4"- monochrome={assistant && selectedProvider === "qwen"}- />- {currentProvider?.name ?? selectedProvider}- </div>+ <SelectTrigger className={LOCAL_SELECT_TRIGGER_CLASS}>+ <span>{currentProvider?.name ?? selectedProvider}</span></SelectTrigger><SelectContent className={`max-h-[14.625rem] ${SELECT_PANEL_CLASS}`}>{providerOptions.map((provider) => (@@ -837,18 +934,9 @@ export function LocalModelSetupStep({</Select></div>- {/* h, not max-h: a fixed 16rem keeps the card the same height for every- provider. Hugging the rows instead makes the card — and the Proceed- button under it — jump as you move through the provider dropdown, since- providers carry anywhere from one model to five. The empty grey under a- short list is the accepted cost of that stability. Rows are min-h-16, so- 16rem shows four and the rest scrolls. */}- {/* onboarding-scroll-hidden, not the 5px thin thumb: a classic scrollbar- reserves layout width, so rows in an overflowing list stopped short of- the edge while a short provider's list filled it, and the two read as- different widths. The partially visible row at the bottom edge is the- overflow affordance instead. */}- <div className="onboarding-scroll-hidden mt-3 h-56 overflow-y-auto rounded-2xl border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface-secondary)] px-3">+ {/* A fixed list height keeps the card and footer stable while the visible+ scrollbar makes additional provider models discoverable. */}+ <div className="onboarding-list-scroll mt-4 h-56 rounded-2xl border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface-secondary)]">{models.map((model) => {const isDownloaded = downloadedModels.has(model.id);const download = activeDownload.downloads[model.id];@@ -858,9 +946,9 @@ export function LocalModelSetupStep({return (<divkey={model.id}- className="flex min-h-14 items-center gap-3 border-b border-[var(--onboarding-control-border)] px-1 py-2 last:border-b-0"+ className="flex min-h-20 items-center gap-3 border-b border-[var(--onboarding-control-border)] px-2 py-3 last:border-b-0">- <span className="flex size-9 shrink-0 items-center justify-center rounded-xl border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)]">+ <span className="flex size-11 shrink-0 items-center justify-center rounded-xl border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)]"><ProviderIconprovider={model.icon}className="size-5"@@ -871,12 +959,12 @@ export function LocalModelSetupStep({type="button"disabled={!isDownloaded}onClick={() => chooseInstalledModel(model.id)}- className="min-w-0 flex-1 text-left disabled:cursor-default"+ className="min-w-0 flex-1 rounded-lg text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--onboarding-accent)_30%,transparent)] disabled:cursor-default">- <span className="block truncate text-sm font-medium text-[var(--onboarding-text-primary)]">+ <span className="block truncate text-base font-medium text-[var(--onboarding-text-primary)]">{model.name}</span>- <span className="mt-0.5 block truncate text-xs text-[var(--onboarding-text-secondary)]">+ <span className="mt-1 block truncate text-sm text-[var(--onboarding-text-secondary)]">{model.size}{!assistant && model.recommended && ` - ${t("common.recommended")}`}</span>@@ -888,7 +976,9 @@ export function LocalModelSetupStep({// text-secondary. Progress is a light/surface-tertiary fill// growing from the left behind them, not a fixed-width segment// around the percentage.- <span className="relative -mr-2 flex shrink-0 items-center gap-2 overflow-hidden rounded-[38px] border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] px-3 py-1.5 text-sm font-medium leading-[1.4] text-[var(--onboarding-text-secondary)]">+ // No aria-live: BackgroundModelDownloadTray is the one live region+ // for download progress, so a second one here read every tick twice.+ <span className="relative flex h-8 shrink-0 items-center gap-2 overflow-hidden rounded-full border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] px-3 text-sm font-medium leading-[1.4] tabular-nums text-[var(--onboarding-text-secondary)]">{/* Figma draws the rect taller than the pill so it bleeds topand bottom; inset-y-0 does that without a magic height. */}<span@@ -904,20 +994,18 @@ export function LocalModelSetupStep({</span></span>) : isSelected ? (- // Same token as the Use pill it replaces on click — on blue-500 it- // was a visibly different blue sitting in the same slot.- <span className="-mr-2 flex h-7 shrink-0 items-center gap-1 rounded-full bg-[var(--onboarding-accent)] px-3 text-xs text-[var(--onboarding-accent-foreground)]">- <Check className="size-3.5" />+ // Same token as the Use pill it replaces on click.+ <span className="flex h-8 shrink-0 items-center gap-1.5 rounded-full bg-[var(--onboarding-accent)] px-3 text-sm text-[var(--onboarding-accent-foreground)]">+ <Check className="size-4" />{t("onboarding.rehaul.local.selected")}</span>) : isDownloaded ? (- // On the accent rather than neutral-950: this is the row's- // affirmative action, so it carries the brand the way every other- // primary in onboarding does, and Download stays neutral below it.+ // Installed alternatives remain explicit primary actions until+ // they become the active selection.<Buttontype="button"onClick={() => chooseInstalledModel(model.id)}- className="-mr-2 h-7 gap-1.5 rounded-full border-0! bg-[var(--onboarding-accent)] px-2.5 text-xs font-normal text-[var(--onboarding-accent-foreground)] shadow-none! hover:bg-[var(--onboarding-accent-hover)] hover:shadow-none!"+ className="h-8 gap-1.5 rounded-full border-0! bg-[var(--onboarding-accent)] px-3 text-sm font-normal text-[var(--onboarding-accent-foreground)] shadow-none! hover:bg-[var(--onboarding-accent-hover)] hover:shadow-none!">{t("onboarding.rehaul.local.use")}</Button>@@ -925,7 +1013,7 @@ export function LocalModelSetupStep({<Buttontype="button"onClick={() => downloadModel(model.id)}- className="-mr-2 h-7 gap-1.5 rounded-full border-[var(--onboarding-inverse-surface)]! bg-[var(--onboarding-inverse-surface)] px-2.5 text-xs font-normal text-[var(--onboarding-inverse-text)] shadow-none! hover:shadow-none! hover:bg-[var(--onboarding-inverse-surface-secondary)] disabled:bg-[var(--onboarding-surface-tertiary-hover)] disabled:opacity-100"+ className="h-8 gap-1.5 rounded-full border-[var(--onboarding-inverse-surface)]! bg-[var(--onboarding-inverse-surface)] px-3 text-sm font-normal text-[var(--onboarding-inverse-text)] shadow-none! hover:bg-[var(--onboarding-inverse-surface-secondary)] hover:shadow-none! disabled:bg-[var(--onboarding-surface-tertiary-hover)] disabled:opacity-100"><Download className="size-3.5" />{t("onboarding.rehaul.local.download")}@@ -936,13 +1024,16 @@ export function LocalModelSetupStep({})}</div>- <div className={`mt-4 grid gap-2 ${anyDownloadActive ? "grid-cols-2" : "grid-cols-1"}`}>+ <div className={`mt-5 grid gap-2 ${anyDownloadActive ? "grid-cols-2" : "grid-cols-1"}`}>+ {/* Skip means "don't wait for this download", never "set up local with no+ model": leaving with nothing on disk still commits useLocalWhisper,+ and whisper.js then refuses to load the selected model. */}{anyDownloadActive && (- <StepSecondaryAction onClick={onSkip} disabled={!canProceed}>+ <StepSecondaryAction onClick={skip} disabled={!canProceed} className="h-10!">{t("common.skip")}</StepSecondaryAction>)}- <StepPrimaryAction onClick={proceed} disabled={!canProceed}>+ <StepPrimaryAction onClick={proceed} disabled={!canProceed} className="h-10!">{t("onboarding.rehaul.provider.proceed")}</StepPrimaryAction></div>diff --git a/src/components/onboarding/SetupChoiceStep.tsx b/src/components/onboarding/SetupChoiceStep.tsxindex a1ed6f2af..9d30a35e2 100644--- a/src/components/onboarding/SetupChoiceStep.tsx+++ b/src/components/onboarding/SetupChoiceStep.tsx@@ -129,12 +129,15 @@ export default function SetupChoiceStep({const [showMore, setShowMore] = useState(false);const localReferenceModel = getParakeetModelInfo(REFERENCE_LOCAL_MODEL_ID);+ // Two deliberately different numbers: the setup steps quote the transfer, so+ // they get the model's own download size, while the disk figure is rounded up+ // and floored at 2 GB because the model arrives as an archive and needs room+ // to unpack — quoting only the compressed size as the space requirement can+ // send a user into a setup that runs out of disk.const localModelSize = (localReferenceModel?.size ?? t("common.unknown")).replace(/(\d)([A-Za-z])/,"$1 $2");- // The model arrives as an archive and needs room to unpack, so quoting only- // its compressed size can send a user into a setup that runs out of disk.const minimumLocalSpaceGb = Math.max(2, Math.ceil((localReferenceModel?.sizeMb ?? 0) / 1000));const availability = getOnboardingSetupAvailability({@@ -311,7 +314,7 @@ export default function SetupChoiceStep({<div className="flex items-center justify-between">{/* Frame 48: 40px mark on the brand gradient. */}<span className="flex size-9 items-center justify-center rounded-full bg-gradient-to-b from-[#4079ed] to-[#244587] text-white">- <BrandMark className="size-5" />+ <BrandMark className="size-6" /></span>{/* Frame 49: the "Recommended" chip. Figma has white text on aglass fill over the card's background artwork ("Vector 1",diff --git a/src/components/onboarding/ShortcutSetupStep.tsx b/src/components/onboarding/ShortcutSetupStep.tsxindex a27fa0b8a..8ff08fe84 100644--- a/src/components/onboarding/ShortcutSetupStep.tsx+++ b/src/components/onboarding/ShortcutSetupStep.tsx@@ -1,8 +1,13 @@import { useState } from "react";import { useTranslation } from "react-i18next";+import { Globe, Loader2 } from "lucide-react";import { HotkeyInput } from "../ui/HotkeyInput";import { formatHotkeyLabel } from "../../utils/hotkeys";-import { formatHotkeyInstruction, getHotkeyKeycaps } from "./hotkeyPresentation";+import {+ formatHotkeyInstruction,+ formatRecommendedHotkey,+ getHotkeyKeycaps,+} from "./hotkeyPresentation";function HotkeyChord({ value, compact = false }: { value: string; compact?: boolean }) {const keycaps = getHotkeyKeycaps(value);@@ -12,20 +17,28 @@ function HotkeyChord({ value, compact = false }: { value: string; compact?: boolclassName={`flex flex-wrap items-center justify-center ${compact ? "gap-1.5" : "gap-3"}`}aria-label={formatHotkeyLabel(value)}>- {keycaps.map(({ id, label, symbol }) => (+ {keycaps.map(({ id, icon, label, symbol }) => (<kbdkey={id}// Surface, bevel and border live in .onboarding-keycap so the cap is// styled in one place; only the box metrics vary by size here.- className={`onboarding-keycap relative flex flex-col justify-between rounded-[12px] border text-[var(--onboarding-text-primary)] ${- compact ? "h-8 min-w-12 px-2 py-1 text-xs" : "h-16 min-w-20 px-2.5 py-2 text-xs"+ className={`onboarding-keycap relative flex flex-col justify-between rounded-xl border text-[var(--onboarding-text-primary)] ${+ compact ? "h-12 min-w-16 px-2.5 py-2 text-xs" : "h-24 min-w-32 px-3 py-3 text-base"}`}><span- className={`self-end font-medium leading-none ${compact ? "text-sm" : "text-lg"}`}+ className={`self-end font-medium leading-none ${compact ? "text-base" : "text-xl"}`}aria-hidden="true">- {symbol}+ {icon === "globe" ? (+ <Globe+ className={compact ? "size-4" : "size-5"}+ strokeWidth={1.8}+ aria-hidden="true"+ />+ ) : (+ symbol+ )}</span><span className="self-start font-medium leading-none text-[var(--onboarding-text-secondary)]">{label}@@ -38,8 +51,9 @@ function HotkeyChord({ value, compact = false }: { value: string; compact?: boolinterface ShortcutSetupStepProps {value: string;+ initiallyConfirmed?: boolean;onChange: (value: string) => void;- recommended: string;+ recommended: string | string[];captureLabel: string;recommendedLabel: string;chooseAnotherLabel: string;@@ -49,11 +63,11 @@ interface ShortcutSetupStepProps {whatever it recorded from a previous `onChange`. */onClearSelection?: () => void;dense?: boolean;- showCandidateActions?: boolean;}export default function ShortcutSetupStep({value,+ initiallyConfirmed,onChange,recommended,captureLabel,@@ -63,11 +77,15 @@ export default function ShortcutSetupStep({onConfirm,onClearSelection,dense = false,- showCandidateActions = true,}: ShortcutSetupStepProps) {const { t } = useTranslation();+ const recommendations = Array.isArray(recommended) ? recommended : [recommended];const [candidate, setCandidate] = useState(value);- const [confirmed, setConfirmed] = useState(Boolean(value));+ const [confirmed, setConfirmed] = useState(initiallyConfirmed ?? Boolean(value));+ // The step opens with a recommended chord already in the box, so "press it+ // again" only becomes true once the user has actually captured one.+ const [hasCapturedChord, setHasCapturedChord] = useState(false);+ const [seededValue, setSeededValue] = useState(value);const [error, setError] = useState<string | null>(null);const [isConfirming, setIsConfirming] = useState(false);const [captureKey, setCaptureKey] = useState(0);@@ -75,105 +93,184 @@ export default function ShortcutSetupStep({// held have to be echoed here or pressing a bare modifier looks like nothing.const [heldModifiers, setHeldModifiers] = useState("");- const handleChange = async (next: string) => {+ // The opening chord is resolved asynchronously — main reports the shortcut it+ // could actually register, and may replace it later — so the seed has to follow+ // `value` until the user captures something of their own, or the box keeps+ // offering a chord that is already known to fail. Adjusted during render rather+ // than in an effect so the superseded chord is never painted, and it is not a+ // capture: `hasCapturedChord` stays false, so the copy still asks for a first+ // press instead of asking to confirm.+ if (value !== seededValue) {+ setSeededValue(value);+ if (!hasCapturedChord) setCandidate(value);+ }++ const handleCapture = async (next: string) => {setError(null);- setCandidate(next);- setConfirmed(false);- setIsConfirming(true);- const confirmationError = (await onConfirm?.(next)) ?? null;- setIsConfirming(false);- if (confirmationError) {- setError(confirmationError);- setCandidate("");- setCaptureKey((current) => current + 1);- // A failed capture leaves the box empty, so an earlier confirmed hotkey- // must not keep the step looking complete.- onClearSelection?.();+ if (!confirmed && candidate === next) {+ setIsConfirming(true);+ const confirmationError = (await onConfirm?.(next)) ?? null;+ setIsConfirming(false);+ if (confirmationError) {+ setError(confirmationError);+ setCandidate("");+ setHasCapturedChord(false);+ setCaptureKey((current) => current + 1);+ onClearSelection?.();+ return;+ }+ setConfirmed(true);+ onChange(next);return;}- setConfirmed(true);- onChange(next);++ setCandidate(next);+ setHasCapturedChord(true);+ setConfirmed(false);+ onClearSelection?.();+ // HotkeyInput blurs after every completed capture. Remounting restores focus+ // so the candidate can be confirmed immediately with the same chord.+ setCaptureKey((current) => current + 1);};const reset = () => {setCandidate("");+ setHasCapturedChord(false);setConfirmed(false);setError(null);setCaptureKey((current) => current + 1);onClearSelection?.();};+ // The box opens pre-filled with one of the recommendations, so the row carries+ // the rest — without them the alternatives are reachable only by first clearing+ // the chord the step just offered. Once the user has a chord of their own,+ // suggesting others is noise.+ const visibleRecommendations =+ confirmed || hasCapturedChord+ ? []+ : // Deduplicate on the printed label, not the accelerator: GLOBE and Fn are+ // distinct chords that both render as "Globe/Fn".+ recommendations.filter(+ (hotkey) => formatRecommendedHotkey(hotkey) !== formatRecommendedHotkey(candidate)+ );+ const recommendationRow = visibleRecommendations.length > 0 && (+ <div+ className={`flex flex-wrap items-center justify-center leading-[1.4] text-[var(--onboarding-text-tertiary)] ${+ dense ? "mt-3 gap-2 text-sm" : "mt-6 gap-3 text-base"+ }`}+ >+ <span>{recommendedLabel}</span>+ {visibleRecommendations.map((hotkey) => (+ <span+ key={hotkey}+ className={`rounded-full bg-[var(--onboarding-surface-tertiary)] text-[var(--onboarding-text-secondary)] ${+ dense ? "px-2.5 py-1 text-xs" : "px-3 py-1.5 text-sm"+ }`}+ >+ {formatRecommendedHotkey(hotkey)}+ </span>+ ))}+ </div>+ );++ const captureInput = (+ <HotkeyInput+ key={captureKey}+ value={candidate}+ onChange={(next) => void handleCapture(next)}+ onClear={reset}+ autoFocus+ variant="capture-overlay"+ validate={validate}+ onValidationError={setError}+ onHeldModifiersChange={setHeldModifiers}+ disabled={isConfirming}+ />+ );+return (- // The assistant page keeps the tighter margin because it also includes the- // preview image; the standalone shortcut page has a little more separation.- <div className={`mx-auto w-full max-w-sm shrink-0 text-center ${dense ? "mt-4" : "mt-5"}`}>- {/* Compact capture surface. The filled state drops the dash and tint so- the keycaps sit on their own surface. */}- <div- className={`relative flex h-32 items-center justify-center rounded-2xl px-5 ${- candidate- ? "border-2 border-transparent bg-[var(--onboarding-surface)]"- : "border-2 border-dashed border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface-secondary)]"- }`}- >- <HotkeyInput- key={captureKey}- value={candidate}- onChange={(next) => void handleChange(next)}- onClear={reset}- autoFocus- variant="capture-overlay"- validate={validate}- onValidationError={setError}- onHeldModifiersChange={setHeldModifiers}- disabled={isConfirming}- />+ <div+ className={`mx-auto mt-6 flex min-h-0 w-full flex-1 flex-col text-center ${dense ? "max-w-sm" : "max-w-lg"}`}+ >+ {candidate ? (+ <>+ <div+ className={`relative flex items-center justify-center ${dense ? "h-12 shrink-0" : "h-40"}`}+ >+ {captureInput}+ {error ? (+ <p+ role="alert"+ className="max-w-72 text-sm leading-5 text-[var(--onboarding-danger)]"+ >+ {error}+ </p>+ ) : isConfirming ? (+ <Loader2 className="size-5 animate-spin text-[var(--onboarding-accent)]" />+ ) : (+ <HotkeyChord value={heldModifiers || candidate} compact={dense} />+ )}+ </div>- {error ? (- <p role="alert" className="max-w-60 text-sm leading-5 text-[var(--onboarding-danger)]">- {error}- </p>- ) : heldModifiers ? (- <div className="pointer-events-none flex flex-col items-center gap-3">- <HotkeyChord value={heldModifiers} />- <p className="text-sm leading-[1.4] text-[var(--onboarding-text-tertiary)]">- {t("onboarding.rehaul.hotkey.holding")}- </p>+ {recommendationRow}++ <div+ className={`mt-auto flex flex-col items-center gap-2.5 pb-1 ${dense ? "translate-y-3 pt-5" : "pt-8"}`}+ aria-live="polite"+ >+ {confirmed ? (+ <p className="sr-only">{formatHotkeyInstruction(candidate)}</p>+ ) : (+ <p+ className={`rounded-full bg-[var(--onboarding-surface-tertiary)] px-5 py-2 text-sm text-[var(--onboarding-text-tertiary)] ${dense ? "" : "mt-6"}`}+ >+ {hasCapturedChord+ ? t("onboarding.rehaul.hotkey.confirmAgain", {+ hotkey: formatHotkeyInstruction(candidate),+ })+ : captureLabel}+ </p>+ )}+ <button+ type="button"+ onClick={reset}+ className="rounded-full border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] px-5 py-2 text-sm text-[var(--onboarding-text-primary)] hover:bg-[var(--onboarding-surface-hover)]"+ >+ {chooseAnotherLabel}+ </button></div>- ) : candidate ? (- <HotkeyChord value={candidate} />- ) : (- // The recommendation leads and the capture instruction closes; the- // pair remains centred as the surface scales down.- <div className="pointer-events-none flex flex-col items-center gap-8">- <p className="flex items-center gap-2 text-base leading-[1.4] text-[var(--onboarding-text-tertiary)]">- {recommendedLabel}- <span className="rounded-[39px] bg-[var(--onboarding-surface-tertiary)] px-2.5 py-1.5 text-xs leading-[1.4] text-[var(--onboarding-text-secondary)]">- {formatHotkeyInstruction(recommended)}- </span>- </p>- <p className="text-base leading-[1.4] text-[var(--onboarding-text-tertiary)]">- {captureLabel}- </p>+ </>+ ) : (+ <>+ <div className="relative flex h-44 items-center justify-center rounded-3xl border-2 border-dashed border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] px-5">+ {captureInput}+ {error ? (+ <p+ role="alert"+ className="max-w-72 text-sm leading-5 text-[var(--onboarding-danger)]"+ >+ {error}+ </p>+ ) : heldModifiers ? (+ <div className="pointer-events-none flex flex-col items-center gap-3">+ <HotkeyChord value={heldModifiers} compact />+ <p className="text-sm leading-[1.4] text-[var(--onboarding-text-tertiary)]">+ {t("onboarding.rehaul.hotkey.holding")}+ </p>+ </div>+ ) : (+ <div className="pointer-events-none flex flex-col items-center gap-4">+ <Loader2 className="size-5 animate-spin text-[var(--onboarding-accent)]" />+ <p className="text-base leading-[1.4] text-[var(--onboarding-text-tertiary)]">+ {captureLabel}+ </p>+ </div>+ )}</div>- )}- </div>- {candidate && confirmed && !error && showCandidateActions && (- <div className="mt-5 text-center" aria-live="polite">- {/* The keycaps above are the visual confirmation, so the pill that used- to sit here is sr-only rather than deleted: HotkeyChord's aria-label- is not a live region, so this is the only spoken confirmation that- the chord was accepted. */}- <p className="sr-only">{formatHotkeyInstruction(candidate)}</p>- <button- type="button"- onClick={reset}- className="rounded-full border border-[var(--onboarding-control-border)] bg-[var(--onboarding-surface)] px-4 py-1.5 text-sm text-[var(--onboarding-text-primary)] hover:bg-[var(--onboarding-surface-hover)]"- >- {chooseAnotherLabel}- </button>- </div>+ {recommendationRow}+ </>)}</div>);diff --git a/src/components/onboarding/flow.ts b/src/components/onboarding/flow.tsindex e2591eaef..fc95fdf5a 100644--- a/src/components/onboarding/flow.ts+++ b/src/components/onboarding/flow.ts@@ -1,7 +1,15 @@+import { PENDING_LOCAL_MODELS_KEY } from "./pendingLocalModels";+export const ONBOARDING_SESSION_KEY = "onboardingSessionV2";export const LEGACY_ONBOARDING_STEP_KEY = "onboardingCurrentStep";export const ONBOARDING_FLOW_VERSION = 2;+/**+ * Resume drafts hold typed fields, and every write persists the whole session, so+ * the steps that own a text input write once per pause rather than per keystroke.+ */+export const RESUME_DRAFT_PERSIST_DELAY_MS = 400;+type OnboardingStorage = Pick<Storage, "setItem" | "removeItem">;export type OnboardingStepId =@@ -24,6 +32,45 @@ export type OnboardingStepId =export type OnboardingAuthPath = "account" | "guest" | null;export type OnboardingSetupMode = "cloud" | "byok" | "local" | null;+export type OnboardingAuthMode = "sign-in" | "sign-up" | null;+export type OnboardingByokStepId = "byok-dictation" | "byok-assistant";+export type OnboardingLocalStepId = "local-dictation" | "local-assistant";++export interface OnboardingSsoDiscoveryDraft {+ required: boolean;+ domain: string;+ exists: boolean;+}++export interface OnboardingAuthDraft {+ authMode: OnboardingAuthMode;+ email: string;+ fullName: string;+ ssoDiscovery: OnboardingSsoDiscoveryDraft | null;+ pendingVerificationEmail: string | null;+}++export interface OnboardingByokDraft {+ selectedProvider: string;+ selectedModel: string;+ baseUrl: string;+ customModel: string;+}++export interface OnboardingLocalModelDraft {+ provider: string;+ modelId: string;+}++export interface OnboardingResumeState {+ dictationHotkeyConfirmed: boolean;+ assistantHotkeyConfirmed: boolean;+ dictationDemoCompleted: boolean;+ assistantDemoCompleted: boolean;+ auth: OnboardingAuthDraft;+ byok: Partial<Record<OnboardingByokStepId, OnboardingByokDraft>>;+ localModels: Partial<Record<OnboardingLocalStepId, OnboardingLocalModelDraft>>;+}export interface OnboardingSession {version: typeof ONBOARDING_FLOW_VERSION;@@ -32,6 +79,7 @@ export interface OnboardingSession {authPath: OnboardingAuthPath;setupMode: OnboardingSetupMode;selfHostedRequested: boolean;+ resume: OnboardingResumeState;}export interface OnboardingRouteContext {@@ -112,6 +160,24 @@ const LEGACY_STEP_MAP: OnboardingStepId[] = ["setup-choice",];+export function createOnboardingResumeState(): OnboardingResumeState {+ return {+ dictationHotkeyConfirmed: false,+ assistantHotkeyConfirmed: false,+ dictationDemoCompleted: false,+ assistantDemoCompleted: false,+ auth: {+ authMode: null,+ email: "",+ fullName: "",+ ssoDiscovery: null,+ pendingVerificationEmail: null,+ },+ byok: {},+ localModels: {},+ };+}+export function createOnboardingSession(): OnboardingSession {return {version: ONBOARDING_FLOW_VERSION,@@ -120,6 +186,7 @@ export function createOnboardingSession(): OnboardingSession {authPath: null,setupMode: null,selfHostedRequested: false,+ resume: createOnboardingResumeState(),};}@@ -128,6 +195,8 @@ export function resetOnboardingProgress(storage: OnboardingStorage): void {storage.removeItem("onboardingCompleted");storage.removeItem("authenticationSkipped");storage.removeItem("skipAuth");+ storage.removeItem("localSetupPending");+ storage.removeItem(PENDING_LOCAL_MODELS_KEY);// AppRouter uses this marker to distinguish an explicit restart from a// returning signed-in user, while useOnboardingSession migrates it to auth.storage.setItem(LEGACY_ONBOARDING_STEP_KEY, "0");@@ -175,10 +244,147 @@ export function getOnboardingRoute(context: OnboardingRouteContext): OnboardingSreturn route;}+/**+ * The Notes step's forward action. Calendar connections are optional, so the step+ * offers Skip until one connects and Continue afterwards. "loading" is its own+ * state rather than an absence: while the workspace resolves there is nothing to+ * commit yet, but the step still has to show a disabled Continue — dropping the+ * action entirely leaves the footer with only Back and no explanation.+ */+export function getNotesFooterAction({+ workspaceResolutionPending,+ hasConnectedCalendar,+}: {+ workspaceResolutionPending: boolean;+ hasConnectedCalendar: boolean;+}): "skip" | "continue" | "loading" {+ if (workspaceResolutionPending) return "loading";+ return hasConnectedCalendar ? "continue" : "skip";+}++/**+ * Whether the permissions step offers Log out. `authPath` alone is not the+ * question: migrateLegacyOnboardingStep labels any pre-v2 session past the auth+ * step "account" without anyone having signed in, and the action clears the+ * session, localSetupPending and the pending model selections without confirming.+ */+export function shouldOfferOnboardingLogout({+ isSignedIn,+ authPath,+}: {+ isSignedIn: boolean;+ authPath: OnboardingAuthPath;+}): boolean {+ return isSignedIn && authPath === "account";+}+export function isOnboardingStepId(value: unknown): value is OnboardingStepId {return typeof value === "string" && KNOWN_STEPS.has(value as OnboardingStepId);}+function isRecord(value: unknown): value is Record<string, unknown> {+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);+}++function readDraftString(value: unknown): string {+ return typeof value === "string" ? value : "";+}++function parseSsoDiscoveryDraft(value: unknown): OnboardingSsoDiscoveryDraft | null {+ if (+ !isRecord(value) ||+ typeof value.required !== "boolean" ||+ typeof value.domain !== "string" ||+ typeof value.exists !== "boolean"+ ) {+ return null;+ }+ return { required: value.required, domain: value.domain, exists: value.exists };+}++function parseByokDraft(value: unknown): OnboardingByokDraft | undefined {+ if (!isRecord(value)) return undefined;+ return {+ selectedProvider: readDraftString(value.selectedProvider),+ selectedModel: readDraftString(value.selectedModel),+ baseUrl: readDraftString(value.baseUrl),+ customModel: readDraftString(value.customModel),+ };+}++function parseLocalModelDraft(value: unknown): OnboardingLocalModelDraft | undefined {+ if (!isRecord(value)) return undefined;+ return {+ provider: readDraftString(value.provider),+ modelId: readDraftString(value.modelId),+ };+}++/**+ * Sessions written before `resume` existed carry no confirmation flags, and+ * reading them as "never confirmed" is not safe: the hotkey flags decide whether+ * onboarding may replace a registered chord with the platform's onboarding one,+ * and finalizeOnboarding re-registers that on routes which never show the hotkey+ * step again. Having moved past the step is the evidence those builds left —+ * their Continue was gated on confirming.+ *+ * Only the hotkey flags are inferred. The demo flags gate nothing but a Continue+ * on the step the user is standing on, so guessing them would skip practice the+ * user never did.+ */+function inferResumeFlagsFromStep(currentStepId: OnboardingStepId): OnboardingResumeState {+ const isPast = (stepId: OnboardingStepId) =>+ STEP_ORDER.indexOf(currentStepId) > STEP_ORDER.indexOf(stepId);+ return {+ ...createOnboardingResumeState(),+ dictationHotkeyConfirmed: isPast("dictation-hotkey"),+ assistantHotkeyConfirmed: isPast("assistant-hotkey"),+ };+}++function parseOnboardingResumeState(+ value: unknown,+ currentStepId: OnboardingStepId+): OnboardingResumeState {+ if (value === undefined) return inferResumeFlagsFromStep(currentStepId);+ const defaults = createOnboardingResumeState();+ if (!isRecord(value)) return defaults;++ const authValue = isRecord(value.auth) ? value.auth : {};+ const authMode = authValue.authMode;+ const byokValue = isRecord(value.byok) ? value.byok : {};+ const localModelsValue = isRecord(value.localModels) ? value.localModels : {};+ const byokDictation = parseByokDraft(byokValue["byok-dictation"]);+ const byokAssistant = parseByokDraft(byokValue["byok-assistant"]);+ const localDictation = parseLocalModelDraft(localModelsValue["local-dictation"]);+ const localAssistant = parseLocalModelDraft(localModelsValue["local-assistant"]);++ return {+ dictationHotkeyConfirmed: value.dictationHotkeyConfirmed === true,+ assistantHotkeyConfirmed: value.assistantHotkeyConfirmed === true,+ dictationDemoCompleted: value.dictationDemoCompleted === true,+ assistantDemoCompleted: value.assistantDemoCompleted === true,+ auth: {+ authMode: authMode === "sign-in" || authMode === "sign-up" ? authMode : null,+ email: readDraftString(authValue.email),+ fullName: readDraftString(authValue.fullName),+ ssoDiscovery: parseSsoDiscoveryDraft(authValue.ssoDiscovery),+ pendingVerificationEmail:+ typeof authValue.pendingVerificationEmail === "string"+ ? authValue.pendingVerificationEmail+ : null,+ },+ byok: {+ ...(byokDictation ? { "byok-dictation": byokDictation } : {}),+ ...(byokAssistant ? { "byok-assistant": byokAssistant } : {}),+ },+ localModels: {+ ...(localDictation ? { "local-dictation": localDictation } : {}),+ ...(localAssistant ? { "local-assistant": localAssistant } : {}),+ },+ };+}+export function parseOnboardingSession(value: string | null): OnboardingSession | null {if (!value) return null;@@ -217,6 +423,7 @@ export function parseOnboardingSession(value: string | null): OnboardingSessionauthPath,setupMode,selfHostedRequested: parsed.selfHostedRequested ?? false,+ resume: parseOnboardingResumeState(parsed.resume, parsed.currentStepId),};} catch {return null;diff --git a/src/components/onboarding/hotkeyPresentation.ts b/src/components/onboarding/hotkeyPresentation.tsindex 72e03cb31..689cebf8a 100644--- a/src/components/onboarding/hotkeyPresentation.ts+++ b/src/components/onboarding/hotkeyPresentation.ts@@ -1,9 +1,11 @@-import { formatHotkeyLabel } from "../../utils/hotkeys";+import { formatHotkeyLabel, isGlobeLikeHotkey } from "../../utils/hotkeys";+import type { Platform } from "../../utils/platform";export interface HotkeyKeycapDescriptor {id: string;label: string;symbol: string;+ icon?: "globe";}const SYMBOLS: Record<string, string> = {@@ -70,7 +72,7 @@ const LABELS: Record<string, string> = {* "Right Option" keeps ⌥ as its symbol and says which side in the label, so a* side-specific binding is readable on a cap sized for one glyph.*/-function describeKeycap(part: string): { label: string; symbol: string } {+function describeKeycap(part: string): Omit<HotkeyKeycapDescriptor, "id"> {const sided = /^(Right|Left) (.+)$/.exec(part);if (sided) {const [, side, base] = sided;@@ -80,6 +82,10 @@ function describeKeycap(part: string): { label: string; symbol: string } {};}+ if (part === "Globe/Fn" || part === "Fn") {+ return { label: "fn", symbol: "◎", icon: "globe" };+ }+return {label: LABELS[part] ?? part.toLocaleLowerCase(),symbol: SYMBOLS[part] ?? (part.length === 1 ? part.toLocaleUpperCase() : part),@@ -95,3 +101,54 @@ export function getHotkeyKeycaps(value: string): HotkeyKeycapDescriptor[] {export const formatHotkeyInstruction = (value: string) =>formatHotkeyLabel(value).split("+").join(" + ");++export const formatRecommendedHotkey = (value: string) =>+ isGlobeLikeHotkey(value) ? "Globe/Fn" : formatHotkeyInstruction(value);++export const MACOS_DEFAULT_ONBOARDING_HOTKEY = "RightOption";+export const DEFAULT_ASSISTANT_ONBOARDING_HOTKEY = "CommandOrControl+Shift+Space";++/**+ * The chord the dictation step opens on.+ *+ * macOS onboards on Right Option rather than the platform default, but only when+ * there is nothing of the user's to lose. `dictationKey` is not that signal on its+ * own — main auto-registers and persists the platform default before onboarding+ * ever runs — so `confirmed` is what separates a chord the user stood on the+ * hotkey step and accepted from one that merely got registered for them.+ * finalizeOnboarding re-registers whatever this returns, so substituting over a+ * confirmed chord overwrites their real hotkey with no screen ever saying so.+ * parseOnboardingSession is responsible for `confirmed` being true for sessions+ * that predate the flag.+ */+export const resolveOnboardingDictationHotkey = ({+ platform,+ savedHotkey,+ platformDefault,+ confirmed,+}: {+ platform: Platform;+ savedHotkey: string;+ platformDefault: string;+ confirmed: boolean;+}): string => {+ if (platform !== "darwin") return savedHotkey || platformDefault;+ if (savedHotkey && (confirmed || savedHotkey !== platformDefault)) return savedHotkey;+ return MACOS_DEFAULT_ONBOARDING_HOTKEY;+};++/**+ * The chord the assistant step opens on. `voiceAgentKey` is opt-in with no+ * platform default and nothing auto-registers it, so anything saved is the user's+ * own pick and there is no substitution to make.+ */+export const resolveOnboardingAssistantHotkey = (savedHotkey: string): string =>+ savedHotkey || DEFAULT_ASSISTANT_ONBOARDING_HOTKEY;++export const getRecommendedDictationHotkeys = (+ platform: Platform,+ effectiveDefault: string+): string[] =>+ platform === "darwin"+ ? [MACOS_DEFAULT_ONBOARDING_HOTKEY, "GLOBE", "Control+R"]+ : [effectiveDefault];diff --git a/src/components/ui/HotkeyInput.tsx b/src/components/ui/HotkeyInput.tsxindex a30f104d0..ac1e699f4 100644--- a/src/components/ui/HotkeyInput.tsx+++ b/src/components/ui/HotkeyInput.tsx@@ -8,6 +8,11 @@ import {sidedModifierToken,} from "../../utils/hotkeys";import { getPlatform, type Platform } from "../../utils/platform";+import {+ hasMetModifierOnlyHoldThreshold,+ shouldAcceptModifierOnlyCapture,+ shouldRestoreCaptureFocus,+} from "./hotkeyCapturePolicy";const CODE_TO_KEY: Record<string, string> = {Backquote: "`",@@ -276,8 +281,6 @@ export function HotkeyInput({const platform = getPlatform();const isMac = platform === "darwin";- const MODIFIER_HOLD_THRESHOLD_MS = 200;-const resolveModifierOnlyCapture = useCallback((modifiers: Record<ModifierKind, boolean>,@@ -446,31 +449,36 @@ export function HotkeyInput({if (wasHoldingModifiers && MODIFIER_CODES.has(e.nativeEvent.code)) {const holdDuration = Date.now() - keyDownTimeRef.current;-- if (holdDuration >= MODIFIER_HOLD_THRESHOLD_MS) {- const capture = resolveModifierOnlyCapture(- heldModifiersRef.current,- modifierCodesRef.current- );- if (capture?.kind === "hotkey") {- attempted = true;- if (fnHeldRef.current) {- fnCapturedKeyRef.current = true;- finalizeCapture(`Fn+${capture.hotkey}`);- } else {- finalizeCapture(capture.hotkey);- }- } else if (capture?.kind === "needsRightSide" && !fnHeldRef.current) {- // Silently dropping this release is what made a left-side Option or- // Control look like the field was ignoring the key entirely.- attempted = true;- rejectCapture(- t("hotkeyInput.singleModifierNeedsRightSide", {- key: capture.held,- alternative: capture.rightSide,- })- );+ const capture = resolveModifierOnlyCapture(+ heldModifiersRef.current,+ modifierCodesRef.current+ );++ if (+ capture?.kind === "hotkey" &&+ shouldAcceptModifierOnlyCapture(capture.hotkey, holdDuration)+ ) {+ attempted = true;+ if (fnHeldRef.current) {+ fnCapturedKeyRef.current = true;+ finalizeCapture(`Fn+${capture.hotkey}`);+ } else {+ finalizeCapture(capture.hotkey);}+ } else if (+ capture?.kind === "needsRightSide" &&+ hasMetModifierOnlyHoldThreshold(holdDuration) &&+ !fnHeldRef.current+ ) {+ // Silently dropping this release is what made a left-side Option or+ // Control look like the field was ignoring the key entirely.+ attempted = true;+ rejectCapture(+ t("hotkeyInput.singleModifierNeedsRightSide", {+ key: capture.held,+ alternative: capture.rightSide,+ })+ );}}@@ -486,7 +494,11 @@ export function HotkeyInput({const handleMouseDown = useCallback((e: React.MouseEvent<HTMLDivElement>) => {- if (disabled || !isCapturing) return;+ if (disabled) return;+ if (!isCapturing) {+ containerRef.current?.focus({ preventScroll: true });+ return;+ }const mouseHotkey = e.button === 3 ? "MouseButton4" : e.button === 4 ? "MouseButton5" : null;if (!mouseHotkey) return;@@ -525,7 +537,7 @@ export function HotkeyInput({let cancelled = false;let frame: number | null = null;- const focusCaptureSurface = async () => {+ const focusCaptureSurface = async (onlyIfPageFocusIsUnclaimed = false) => {if (platform === "win32") {// On Windows, focusing a DOM node does not bring an inactive native// window to the foreground. Main restores/focuses the BrowserWindow as@@ -535,12 +547,30 @@ export function HotkeyInput({}if (cancelled) return;- frame = requestAnimationFrame(() => containerRef.current?.focus({ preventScroll: true }));+ if (frame !== null) cancelAnimationFrame(frame);+ frame = requestAnimationFrame(() => {+ frame = null;+ if (+ onlyIfPageFocusIsUnclaimed &&+ !shouldRestoreCaptureFocus(document.activeElement, document.body)+ ) {+ return;+ }+ containerRef.current?.focus({ preventScroll: true });+ });};void focusCaptureSurface();+ const handleWindowFocus = () => void focusCaptureSurface(true);+ const handleVisibilityChange = () => {+ if (document.visibilityState === "visible") void focusCaptureSurface(true);+ };+ window.addEventListener("focus", handleWindowFocus);+ document.addEventListener("visibilitychange", handleVisibilityChange);return () => {cancelled = true;+ window.removeEventListener("focus", handleWindowFocus);+ document.removeEventListener("visibilitychange", handleVisibilityChange);if (frame !== null) cancelAnimationFrame(frame);};}, [autoFocus, platform]);diff --git a/src/components/ui/hotkeyCapturePolicy.ts b/src/components/ui/hotkeyCapturePolicy.tsnew file mode 100644index 000000000..2a83520cb--- /dev/null+++ b/src/components/ui/hotkeyCapturePolicy.ts@@ -0,0 +1,16 @@+export const MODIFIER_ONLY_HOLD_THRESHOLD_MS = 200;++export function hasMetModifierOnlyHoldThreshold(holdDurationMs: number): boolean {+ return holdDurationMs >= MODIFIER_ONLY_HOLD_THRESHOLD_MS;+}++export function shouldAcceptModifierOnlyCapture(hotkey: string, holdDurationMs: number): boolean {+ return hotkey.startsWith("Right") || hasMetModifierOnlyHoldThreshold(holdDurationMs);+}++export function shouldRestoreCaptureFocus(+ activeElement: Element | null,+ body: HTMLElement | null+): boolean {+ return activeElement === null || activeElement === body;+}diff --git a/src/index.css b/src/index.cssindex 71a49071d..e27d5b5dd 100644--- a/src/index.css+++ b/src/index.css@@ -318,9 +318,9 @@ body:has(.onboarding-canvas) {/* Keycap. The cap is lit from above, so it needs its own top/bottom pair ratherthan reusing the surface tokens: in dark it has to sit *above* the page fillwhile still reading as a physical key. */- --onboarding-keycap-top: #ffffff;- --onboarding-keycap-bottom: #f5f5f5;- --onboarding-keycap-bevel: #ffffff;+ --onboarding-keycap-top: #eeeeee;+ --onboarding-keycap-bottom: #dddddd;+ --onboarding-keycap-bevel: #f8f8f8;--onboarding-keycap-shadow: #0a0a0a;/* Provider marks ship as full-colour SVGs; the onboarding rows want themmonochrome. brightness(0) collapses to black, so dark has to invert after. */@@ -770,11 +770,10 @@ body:has(.onboarding-canvas) kbd {box-shadow:/* top bevel */inset 0 1px 0 var(--onboarding-keycap-bevel),- /* the cap's side wall — 2px, not 3px, so it reads as a key rather than a slab */ 0 2px 0- var(--onboarding-control-border),- /* contact shadow, then a wider ambient one */ 0 3px 4px- color-mix(in oklch, var(--onboarding-keycap-shadow) 5%, transparent),- 0 8px 16px color-mix(in oklch, var(--onboarding-keycap-shadow) 7%, transparent);+ /* the cap's side wall */ 1px 3px 0 var(--onboarding-control-border),+ /* contact shadow, then a wider ambient one */ 0 5px 5px+ color-mix(in oklch, var(--onboarding-keycap-shadow) 9%, transparent),+ 0 12px 20px color-mix(in oklch, var(--onboarding-keycap-shadow) 8%, transparent);}/* OpenWhispr Brand Typography */diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 568ab99ea..57a9478e6 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -164,6 +164,7 @@"add": "Hinzufügen","retry": "Erneut versuchen","back": "Zurück",+ "logout": "Abmelden","next": "Weiter","complete": "Fertig","reset": "Zurücksetzen",@@ -200,7 +201,7 @@"done": "Fertig","skip": "Überspringen","policyAiProcessingRestricted": "Die KI-Verarbeitung ist durch Ihre Organisation eingeschränkt.",- "policyAgentRestricted": "Die Nutzung des KI-Agenten ist durch Ihre Organisation eingeschränkt.",+ "policyAgentRestricted": "Die Nutzung des KI-Assistenten ist durch Ihre Organisation eingeschränkt.","policyTranscriptionRestricted": "Die Transkription ist durch Ihre Organisation eingeschränkt.","managedConfigLoading": "Die verwaltete Einrichtung Ihrer Organisation wird überprüft. Versuchen Sie es gleich noch einmal.","managedConfigUnavailable": "Der verwaltete Unternehmenszugriff ist nicht verfügbar. Melden Sie sich erneut an oder wenden Sie sich an Ihren Administrator.",@@ -213,8 +214,8 @@"microphoneDescription": "Verwandelt Sprache in Text.","accessibilityDescription": "Fügt Text in deine aktive App ein.","systemAudioTitle": "Systemaudio",- "systemAudioDescription": "Nimmt Audio aus anderen Apps auf.",- "screenContextDescription": "Lässt deinen Sprachassistenten deinen Bildschirm sehen. Wird nie gespeichert.",+ "systemAudioDescription": "Erforderlich, um Audio für Besprechungsnotizen aufzunehmen.",+ "screenContextDescription": "Bildschirmkontext mit dem Sprachassistenten teilen.","enable": "Aktivieren","enabled": "Aktiviert"},@@ -239,6 +240,7 @@"hotkey": {"capture": "Drücken Sie die Tasten, die Sie verwenden möchten","chooseAnother": "Anderes Tastenkürzel wählen",+ "confirmAgain": "Drücke {{hotkey}} erneut zum Bestätigen","inUse": "Dieses Tastenkürzel wird bereits verwendet. Wähle ein anderes.","holding": "Weiter halten oder eine andere Taste drücken"},@@ -411,7 +413,6 @@"descriptionLineOne": "Wählen Sie die Modelle, die","descriptionLineTwo": "auf Ihrem Gerät laufen sollen.","providerLabel": "Anbieter",- "agent": "Agent","download": "Herunterladen","downloadingShort": "Wird geladen","selected": "Ausgewählt",@@ -420,7 +421,7 @@"cancelDownload": "Download von {{model}} abbrechen","downloads": "Modell-Downloads","downloading": "Wird heruntergeladen… {{progress}}%",- "installing": "Modell wird installiert…"+ "installing": "Wird installiert"}},"steps": {@@ -864,7 +865,7 @@"errorTitles": {"sessionExpired": "Sitzung abgelaufen","offline": "Sie sind offline",- "agentUnavailable": "Agent nicht verfügbar",+ "agentUnavailable": "Assistent nicht verfügbar","screenContextSkipped": "Bildschirmkontext übersprungen","dailyLimitReached": "Tägliches Limit erreicht","providerRateLimited": "Anbieter-Ratenlimit erreicht"@@ -1101,12 +1102,12 @@"welcomeBack": "Willkommen zurück"},"signedIn": {- "ready": "Bereit",- "welcomeBack": "Willkommen zurück",- "welcomeBackName": "Willkommen zurück, {{name}}"+ "welcomeBack": "Willkommen zurück"},"sso": {"continueWithSSO": "Mit SSO anmelden",+ "workEmailLabel": "Geschäftliche E-Mail",+ "emailPlaceholder": "E-Mail-Adresse hinzufügen","emailRequired": "Geben Sie Ihre geschäftliche E-Mail-Adresse ein, um SSO zu verwenden.","failed": "Single Sign-on fehlgeschlagen. Bitte versuchen Sie es erneut.","companySignInTitle": "Unternehmensanmeldung verwenden",@@ -1461,10 +1462,10 @@}},"edit": {- "agentNameLabel": "Agent-Name:",+ "agentNameLabel": "Assistent-Name:","cautionLabel": "Vorsicht","cautionTextPrefix": "Änderungen an diesem Prompt können die Transkriptionsqualität beeinträchtigen.",- "cautionTextSuffix": "Behalten Sie den Platzhalter {{agentName}} bei, um die Agent-Erkennung zu gewährleisten.",+ "cautionTextSuffix": "Behalten Sie den Platzhalter {{agentName}} bei, um die Assistent-Erkennung zu gewährleisten.","placeholder": "Geben Sie Ihren benutzerdefinierten System-Prompt ein..."},"tabs": {@@ -1879,7 +1880,7 @@"features": ["Unbegrenzte Meeting-Aufnahmen","Workspace-Rollen & Mitgliederverwaltung",- "Agentenmodus",+ "Assistentenmodus","Chat über Ihre Daten","Prioritäts-Support"],@@ -2003,11 +2004,11 @@}},"agentConfig": {- "agentName": "Agent-Name",+ "agentName": "Assistent-Name","description": "Benennen Sie Ihren KI-Assistenten, damit Sie ihn beim Diktieren direkt ansprechen können","dialogs": {- "updatedDescription": "Ihr Agent heißt jetzt '{{name}}'. Sprechen Sie ihn an, indem Sie 'Hey {{name}}' gefolgt von Ihren Anweisungen sagen.",- "updatedTitle": "Agent-Name aktualisiert"+ "updatedDescription": "Ihr Assistent heißt jetzt '{{name}}'. Sprechen Sie ihn an, indem Sie 'Hey {{name}}' gefolgt von Ihren Anweisungen sagen.",+ "updatedTitle": "Assistent-Name aktualisiert"},"examplesTitle": "Beispiele","helper": "Wählen Sie etwas Kurzes und Natürliches zum Aussprechen",@@ -2122,7 +2123,7 @@"clearDictionaryTitle": "Wörterbuch löschen?","clearDictionaryDescription": "Dadurch werden alle Wörter aus Ihrem benutzerdefinierten Wörterbuch entfernt. Diese Aktion kann nicht rückgängig gemacht werden.","clearAll": "Alles löschen",- "agentNameAutoManaged": "Automatisch verwaltet — synchronisiert mit dem Agentennamen",+ "agentNameAutoManaged": "Automatisch verwaltet — synchronisiert mit dem Assistentennamen","removeWord": "Wort entfernen","noWords": "Noch keine Wörter","wordsAppearHere": "Hinzugefügte Wörter erscheinen hier",@@ -2633,7 +2634,7 @@"openai_gpt_4_1_mini": "Kleineres GPT-4.1-Modell","openai_gpt_4_1_nano": "GPT-4.1 mit der niedrigsten Latenz","anthropic_claude_fable_5": "Leistungsstärkstes Modell von Anthropic, Mythos-Klasse",- "anthropic_claude_sonnet_5": "Schnelles, leistungsfähiges Agent-Modell zu geringeren Kosten",+ "anthropic_claude_sonnet_5": "Schnelles, leistungsfähiges Assistentenmodell zu geringeren Kosten","anthropic_claude_sonnet_4_6": "Ausgewogene Leistung","anthropic_claude_sonnet_4_5": "Vorherige Sonnet-Generation","anthropic_claude_haiku_4_5": "Schnell mit nahezu Frontier-Intelligenz",@@ -2668,12 +2669,12 @@"corti_corti_s1_mini": "Kompaktes klinisches Modell mit Reasoning zum halben Preis"},"enterprise": {- "bedrock_claude_fable_5": "Leistungsstärkstes Claude-Modell. Ideal für die schwierigsten Agent-Modus-Aufgaben.",+ "bedrock_claude_fable_5": "Leistungsstärkstes Claude-Modell. Ideal für die schwierigsten Assistenten-Aufgaben.","bedrock_claude_haiku_4_5": "Schnell und günstig. Ideal zum Bereinigen von Text.",- "bedrock_claude_sonnet_5": "Ausgewogen. Empfohlener Standard für den Agent-Modus.",- "bedrock_claude_opus_4_8": "Höchste Intelligenz. Für komplexe Aufgaben im Agent-Modus.",+ "bedrock_claude_sonnet_5": "Ausgewogen. Empfohlener Standard für Assistenten-Aufgaben.",+ "bedrock_claude_opus_4_8": "Höchste Intelligenz. Für komplexe Assistenten-Aufgaben.","bedrock_gpt_oss_120b": "Offenes OpenAI-Modell. Starkes Reasoning zu geringen Kosten.",- "bedrock_deepseek_v3_2": "Offenes Frontier-Modell. Starker Wert für den Agent-Modus.",+ "bedrock_deepseek_v3_2": "Offenes Frontier-Modell. Starker Wert für Assistenten-Aufgaben.","bedrock_qwen3_next_80b": "Sparsames offenes Modell. Schnell und mehrsprachig.","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3566,7 +3567,7 @@},"dictationAgent": {"enabled": "Sprachassistenten aktivieren",- "enabledDescription": "Diktieren Sie Anweisungen an Ihren Agenten. Markierter Text wird an das konfigurierte Modell gesendet und direkt bearbeitet. Aktivieren Sie ihn, indem Sie \"{{agentName}}\" sagen.",+ "enabledDescription": "Diktieren Sie Anweisungen an Ihren Assistenten. Markierter Text wird an das konfigurierte Modell gesendet und direkt bearbeitet. Aktivieren Sie ihn, indem Sie \"{{agentName}}\" sagen.","screenContext": {"title": "Bildschirmkontext","description": "Hängt einen Screenshot Ihres aktiven Bildschirms an Sprachassistent-Befehle an.",@@ -3581,7 +3582,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "Den von OpenWhispr verwalteten Agenten nutzen, kein API-Schlüssel nötig.",+ "openwhisprDesc": "Den von OpenWhispr verwalteten Assistenten nutzen, kein API-Schlüssel nötig.","providers": "Eigenen Schlüssel nutzen","providersDesc": "Mit Ihrem eigenen API-Schlüssel an OpenAI, Anthropic, Gemini oder Groq anbinden.","local": "Lokal",@@ -3592,14 +3593,14 @@"enterpriseDesc": "AWS Bedrock, Azure OpenAI oder Google Vertex nutzen."},"prompt": {- "title": "Agent-Prompt",+ "title": "Assistent-Prompt","description": "Der System-Prompt, der bei Erkennung des Aktivierungsworts verwendet wird. Fällt auf die integrierte Standardvorgabe zurück."}},"agentMode": {"settings": {"systemPrompt": "System-Prompt",- "systemPromptDescription": "Benutzerdefinierte Anweisungen für den Agenten",+ "systemPromptDescription": "Benutzerdefinierte Anweisungen für den Assistenten","systemPromptPlaceholder": "Benutzerdefinierten System-Prompt eingeben...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3751,7 +3752,7 @@},"cli": {"title": "Kommandozeilen-Zugriff",- "description": "Gib deinem Agenten über das Terminal Zugriff auf deine Notizen.",+ "description": "Gib deinem Assistenten über das Terminal Zugriff auf deine Notizen.","installLabel": "Installieren","learnMore": "Dokumentation lesen","copyDocsLink": "Doku-Link kopieren",diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 16c1fc05b..414e4e0ab 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -164,6 +164,7 @@"add": "Add","retry": "Retry","back": "Back",+ "logout": "Log out","next": "Next","complete": "Complete","reset": "Reset",@@ -200,7 +201,7 @@"done": "Done","skip": "Skip","policyAiProcessingRestricted": "AI processing is restricted by your organization.",- "policyAgentRestricted": "AI agent use is restricted by your organization.",+ "policyAgentRestricted": "AI assistant use is restricted by your organization.","policyTranscriptionRestricted": "Transcription is restricted by your organization.","managedConfigLoading": "Checking your organization's managed setup. Try again in a moment.","managedConfigUnavailable": "Managed enterprise access is unavailable. Sign in again or contact your administrator.",@@ -213,8 +214,8 @@"microphoneDescription": "Turns speech into text.","accessibilityDescription": "Pastes text into your active app.","systemAudioTitle": "System Audio",- "systemAudioDescription": "Captures audio from other apps.",- "screenContextDescription": "Lets your voice assistant see your screen. Never stored.",+ "systemAudioDescription": "Required for capturing audio in Meeting Notes.",+ "screenContextDescription": "Share screen context with Voice Assistant.","enable": "Enable","enabled": "Enabled"},@@ -239,6 +240,7 @@"hotkey": {"capture": "Press the keys you want to use","chooseAnother": "Choose another shortcut",+ "confirmAgain": "Press {{hotkey}} again to confirm","inUse": "That shortcut is already in use. Choose another one.","holding": "Keep holding, or press another key"},@@ -411,7 +413,6 @@"descriptionLineOne": "Choose the models you want","descriptionLineTwo": "to run on your device.","providerLabel": "Provider",- "agent": "Agent","download": "Download","downloadingShort": "Downloading","selected": "Selected",@@ -420,7 +421,7 @@"cancelDownload": "Cancel download of {{model}}","downloads": "Model downloads","downloading": "Downloading… {{progress}}%",- "installing": "Installing model…"+ "installing": "Installing"}},"steps": {@@ -864,7 +865,7 @@"errorTitles": {"sessionExpired": "Session Expired","offline": "You're Offline",- "agentUnavailable": "Agent Unavailable",+ "agentUnavailable": "Assistant Unavailable","screenContextSkipped": "Screen Context Skipped","dailyLimitReached": "Daily Limit Reached","providerRateLimited": "Provider Rate Limited"@@ -1101,12 +1102,12 @@"welcomeBack": "Welcome back"},"signedIn": {- "ready": "Ready",- "welcomeBack": "Welcome back",- "welcomeBackName": "Welcome back, {{name}}"+ "welcomeBack": "Welcome back"},"sso": {"continueWithSSO": "Sign in with SSO",+ "workEmailLabel": "Work email",+ "emailPlaceholder": "Add your email","emailRequired": "Enter your work email to use SSO.","failed": "Single sign-on failed. Please try again.","companySignInTitle": "Use your company sign-in",@@ -1461,10 +1462,10 @@}},"edit": {- "agentNameLabel": "Agent name:",+ "agentNameLabel": "Assistant name:","cautionLabel": "Caution","cautionTextPrefix": "Modifying this prompt may affect transcription quality.",- "cautionTextSuffix": "Keep the {{agentName}} placeholder to preserve agent detection.",+ "cautionTextSuffix": "Keep the {{agentName}} placeholder to preserve assistant detection.","placeholder": "Enter your custom system prompt..."},"tabs": {@@ -1879,7 +1880,7 @@"features": ["Unlimited meeting recordings","Workspace roles & member management",- "Agent mode",+ "Assistant mode","Chat over your data","Priority support"],@@ -2003,11 +2004,11 @@}},"agentConfig": {- "agentName": "Agent Name",+ "agentName": "Assistant name","description": "Name your AI assistant so you can address it directly during dictation","dialogs": {- "updatedDescription": "Your agent is now named \"{{name}}\". Address it by saying \"Hey {{name}}\" followed by your instructions.",- "updatedTitle": "Agent Name Updated"+ "updatedDescription": "Your assistant is now named \"{{name}}\". Address it by saying \"Hey {{name}}\" followed by your instructions.",+ "updatedTitle": "Assistant name updated"},"examplesTitle": "Examples","helper": "Pick something short and natural to say aloud",@@ -2122,7 +2123,7 @@"clearDictionaryTitle": "Clear dictionary?","clearDictionaryDescription": "This will remove all words from your custom dictionary. This action cannot be undone.","clearAll": "Clear all",- "agentNameAutoManaged": "Auto-managed — synced from agent name",+ "agentNameAutoManaged": "Auto-managed — synced from assistant name","removeWord": "Remove word","noWords": "No words yet","wordsAppearHere": "Words you add will appear here",@@ -2633,7 +2634,7 @@"openai_gpt_4_1_mini": "Smaller GPT-4.1 model","openai_gpt_4_1_nano": "Lowest latency GPT-4.1","anthropic_claude_fable_5": "Anthropic's most capable model, Mythos-class",- "anthropic_claude_sonnet_5": "Fast, capable agentic model at lower cost",+ "anthropic_claude_sonnet_5": "Fast, capable assistant model at lower cost","anthropic_claude_sonnet_4_6": "Balanced performance","anthropic_claude_sonnet_4_5": "Previous Sonnet generation","anthropic_claude_haiku_4_5": "Fast with near-frontier intelligence",@@ -2668,12 +2669,12 @@"corti_corti_s1_mini": "Compact clinical model with reasoning at half the price"},"enterprise": {- "bedrock_claude_fable_5": "Most capable Claude model. Best for the hardest Agent Mode tasks.",+ "bedrock_claude_fable_5": "Most capable Claude model. Best for the hardest Assistant tasks.","bedrock_claude_haiku_4_5": "Fast and cheap. Great default for text cleanup.",- "bedrock_claude_sonnet_5": "Balanced workhorse. Best default for Agent Mode.",- "bedrock_claude_opus_4_8": "Max intelligence. Best for complex Agent Mode tasks.",+ "bedrock_claude_sonnet_5": "Balanced workhorse. Best default for Assistant tasks.",+ "bedrock_claude_opus_4_8": "Max intelligence. Best for complex Assistant tasks.","bedrock_gpt_oss_120b": "Open-weight OpenAI model. Strong reasoning at low cost.",- "bedrock_deepseek_v3_2": "Open-weight frontier model. Great value for Agent Mode.",+ "bedrock_deepseek_v3_2": "Open-weight frontier model. Great value for Assistant tasks.","bedrock_qwen3_next_80b": "Sparse open-weight model. Fast and multilingual.","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3474,7 +3475,7 @@"addPlaceholder": "Add a trigger phrase — \"investor ask\", \"cal link\""},"emptyTitle": "Your dictionary is empty",- "emptyDescription": "Add words {{agentName}} should always get right: names, tools, acronyms.",+ "emptyDescription": "Add words for {{agentName}} to always get right: names, tools, acronyms.","addFirstWord": "Add your first word","importList": "Import a list","agentDefault": "Added by default"@@ -3566,7 +3567,7 @@},"dictationAgent": {"enabled": "Enable voice assistant",- "enabledDescription": "Dictate instructions to your agent. Highlighted text is sent to the configured model and edited in place. Activate by saying \"{{agentName}}\".",+ "enabledDescription": "Dictate instructions to your assistant. Highlighted text is sent to the configured model and edited in place. Activate by saying \"{{agentName}}\".","screenContext": {"title": "Screen Context","description": "Attach a screenshot of your active screen to voice assistant commands.",@@ -3581,7 +3582,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "Use the OpenWhispr-managed agent — no API key needed.",+ "openwhisprDesc": "Use the OpenWhispr-managed assistant — no API key needed.","providers": "Bring your own key","providersDesc": "Connect to OpenAI, Anthropic, Gemini, or Groq with your own API key.","local": "Local",@@ -3592,14 +3593,14 @@"enterpriseDesc": "Use AWS Bedrock, Azure OpenAI, or Google Vertex."},"prompt": {- "title": "Agent prompt",+ "title": "Assistant prompt","description": "The system prompt used when the wake word is detected. Falls back to the built-in default."}},"agentMode": {"settings": {"systemPrompt": "System Prompt",- "systemPromptDescription": "Custom instructions for the agent",+ "systemPromptDescription": "Custom instructions for the assistant","systemPromptPlaceholder": "Enter custom system prompt...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3751,7 +3752,7 @@},"cli": {"title": "Command-line access",- "description": "Give your agent access to your notes from the terminal.",+ "description": "Give your assistant access to your notes from the terminal.","installLabel": "Install","learnMore": "Read the docs","copyDocsLink": "Copy docs link",diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex a8e9df3ac..4263d4625 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -164,6 +164,7 @@"add": "Añadir","retry": "Reintentar","back": "Atrás",+ "logout": "Cerrar sesión","next": "Siguiente","complete": "Completar","reset": "Restablecer",@@ -200,7 +201,7 @@"done": "Listo","skip": "Omitir","policyAiProcessingRestricted": "El procesamiento con IA está restringido por tu organización.",- "policyAgentRestricted": "El uso del agente de IA está restringido por tu organización.",+ "policyAgentRestricted": "El uso del asistente de IA está restringido por tu organización.","policyTranscriptionRestricted": "La transcripción está restringida por tu organización.","managedConfigLoading": "Comprobando la configuración gestionada de tu organización. Inténtalo de nuevo en un momento.","managedConfigUnavailable": "El acceso empresarial gestionado no está disponible. Vuelve a iniciar sesión o contacta a tu administrador.",@@ -213,8 +214,8 @@"microphoneDescription": "Convierte la voz en texto.","accessibilityDescription": "Pega texto en tu aplicación activa.","systemAudioTitle": "Audio del Sistema",- "systemAudioDescription": "Captura audio de otras aplicaciones.",- "screenContextDescription": "Permite que tu asistente de voz vea tu pantalla. Nunca se guarda.",+ "systemAudioDescription": "Necesario para capturar audio en las notas de reuniones.",+ "screenContextDescription": "Comparte el contexto de pantalla con el asistente de voz.","enable": "Activar","enabled": "Activado"},@@ -239,6 +240,7 @@"hotkey": {"capture": "Pulsa las teclas que quieras usar","chooseAnother": "Elegir otro atajo",+ "confirmAgain": "Pulsa {{hotkey}} otra vez para confirmar","inUse": "Ese atajo ya está en uso. Elige otro.","holding": "Mantén pulsado o pulsa otra tecla"},@@ -411,7 +413,6 @@"descriptionLineOne": "Elige los modelos que quieres","descriptionLineTwo": "ejecutar en tu dispositivo.","providerLabel": "Proveedor",- "agent": "Agente","download": "Descargar","downloadingShort": "Descargando","selected": "Seleccionado",@@ -420,7 +421,7 @@"cancelDownload": "Cancelar la descarga de {{model}}","downloads": "Descargas de modelos","downloading": "Descargando… {{progress}}%",- "installing": "Instalando el modelo…"+ "installing": "Instalando"}},"steps": {@@ -864,7 +865,7 @@"errorTitles": {"sessionExpired": "Sesión expirada","offline": "Sin conexión",- "agentUnavailable": "Agente no disponible",+ "agentUnavailable": "Asistente no disponible","screenContextSkipped": "Contexto de pantalla omitido","dailyLimitReached": "Límite diario alcanzado","providerRateLimited": "Límite de tasa del proveedor"@@ -1101,12 +1102,12 @@"welcomeBack": "Bienvenido de nuevo"},"signedIn": {- "ready": "Listo",- "welcomeBack": "Bienvenido de nuevo",- "welcomeBackName": "Bienvenido de nuevo, {{name}}"+ "welcomeBack": "Bienvenido de nuevo"},"sso": {"continueWithSSO": "Iniciar sesión con SSO",+ "workEmailLabel": "Correo del trabajo",+ "emailPlaceholder": "Añade tu correo","emailRequired": "Introduce tu correo del trabajo para usar SSO.","failed": "Error al iniciar sesión con SSO. Inténtalo de nuevo.","companySignInTitle": "Usa el inicio de sesión de tu empresa",@@ -1420,10 +1421,10 @@}},"edit": {- "agentNameLabel": "Nombre del agente:",+ "agentNameLabel": "Nombre del asistente:","cautionLabel": "Precaución","cautionTextPrefix": "Modificar este prompt puede afectar la calidad de transcripción.",- "cautionTextSuffix": "Mantén el marcador {{agentName}} para preservar la detección del agente.",+ "cautionTextSuffix": "Mantén el marcador {{agentName}} para preservar la detección del asistente.","placeholder": "Introduce tu prompt de sistema personalizado..."},"tabs": {@@ -1638,7 +1639,7 @@"features": ["Grabaciones de reuniones ilimitadas","Roles y gestión de miembros del espacio de trabajo",- "Modo agente",+ "Modo asistente","Chatea sobre tus datos","Soporte prioritario"],@@ -1762,11 +1763,11 @@}},"agentConfig": {- "agentName": "Nombre del agente",+ "agentName": "Nombre del asistente","description": "Nombra a tu asistente de IA para que puedas dirigirte a él directamente durante el dictado","dialogs": {- "updatedDescription": "Tu agente ahora se llama \"{{name}}\". Dirígete a él diciendo \"Hey {{name}}\" seguido de tus instrucciones.",- "updatedTitle": "Nombre del agente actualizado"+ "updatedDescription": "Tu asistente ahora se llama \"{{name}}\". Dirígete a él diciendo \"Hey {{name}}\" seguido de tus instrucciones.",+ "updatedTitle": "Nombre del asistente actualizado"},"examplesTitle": "Ejemplos","helper": "Elige algo corto y natural para decir en voz alta",@@ -1881,7 +1882,7 @@"clearDictionaryTitle": "¿Borrar diccionario?","clearDictionaryDescription": "Esto eliminará todas las palabras de tu diccionario personalizado. Esta acción no se puede deshacer.","clearAll": "Borrar todo",- "agentNameAutoManaged": "Gestionado automáticamente — sincronizado con el nombre del agente",+ "agentNameAutoManaged": "Gestionado automáticamente — sincronizado con el nombre del asistente","removeWord": "Eliminar palabra","noWords": "Aún no hay palabras","wordsAppearHere": "Las palabras que añadas aparecerán aquí",@@ -2588,7 +2589,7 @@"openai_gpt_4_1_mini": "Modelo GPT-4.1 más pequeño","openai_gpt_4_1_nano": "GPT-4.1 de menor latencia","anthropic_claude_fable_5": "El modelo más capaz de Anthropic, clase Mythos",- "anthropic_claude_sonnet_5": "Modelo agéntico rápido y capaz a menor costo",+ "anthropic_claude_sonnet_5": "Modelo asistente rápido y capaz a menor costo","anthropic_claude_sonnet_4_6": "Rendimiento equilibrado","anthropic_claude_sonnet_4_5": "Generación anterior de Sonnet","anthropic_claude_haiku_4_5": "Rápido con inteligencia cercana a la frontera",@@ -2623,12 +2624,12 @@"corti_corti_s1_mini": "Modelo clínico compacto con razonamiento a mitad de precio"},"enterprise": {- "bedrock_claude_fable_5": "El modelo Claude más capaz. Ideal para las tareas más difíciles del Modo Agente.",+ "bedrock_claude_fable_5": "El modelo Claude más capaz. Ideal para las tareas de asistente más difíciles.","bedrock_claude_haiku_4_5": "Rápido y económico. Ideal para limpiar texto.",- "bedrock_claude_sonnet_5": "Equilibrado. Opción por defecto para el Modo Agente.",- "bedrock_claude_opus_4_8": "Máxima inteligencia. Para tareas complejas del Modo Agente.",+ "bedrock_claude_sonnet_5": "Equilibrado. Opción por defecto para las tareas de asistente.",+ "bedrock_claude_opus_4_8": "Máxima inteligencia. Para tareas complejas de asistente.","bedrock_gpt_oss_120b": "Modelo abierto de OpenAI. Gran razonamiento a bajo costo.",- "bedrock_deepseek_v3_2": "Modelo frontera de pesos abiertos. Gran valor para el Modo Agente.",+ "bedrock_deepseek_v3_2": "Modelo frontera de pesos abiertos. Gran valor para las tareas de asistente.","bedrock_qwen3_next_80b": "Modelo abierto disperso. Rápido y multilingüe.","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3449,7 +3450,7 @@},"dictationAgent": {"enabled": "Activar asistente de voz",- "enabledDescription": "Dicta instrucciones a tu agente. El texto resaltado se envía al modelo configurado y se edita en su lugar. Actívalo diciendo \"{{agentName}}\".",+ "enabledDescription": "Dicta instrucciones a tu asistente. El texto resaltado se envía al modelo configurado y se edita en su lugar. Actívalo diciendo \"{{agentName}}\".","screenContext": {"title": "Contexto de pantalla","description": "Adjunta una captura de tu pantalla activa a los comandos del asistente de voz.",@@ -3464,7 +3465,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "Usa el agente gestionado por OpenWhispr, sin necesidad de clave API.",+ "openwhisprDesc": "Usa el asistente gestionado por OpenWhispr, sin necesidad de clave API.","providers": "Usa tu propia clave API","providersDesc": "Conéctate a OpenAI, Anthropic, Gemini o Groq con tu propia clave API.","local": "Local",@@ -3475,14 +3476,14 @@"enterpriseDesc": "Usa AWS Bedrock, Azure OpenAI o Google Vertex."},"prompt": {- "title": "Prompt del agente",+ "title": "Prompt del asistente","description": "El prompt de sistema usado cuando se detecta la palabra de activación. Recurre al valor predeterminado integrado."}},"agentMode": {"settings": {"systemPrompt": "Prompt del Sistema",- "systemPromptDescription": "Instrucciones personalizadas para el agente",+ "systemPromptDescription": "Instrucciones personalizadas para el asistente","systemPromptPlaceholder": "Introduce un prompt de sistema personalizado...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3634,7 +3635,7 @@},"cli": {"title": "Acceso por línea de comandos",- "description": "Dale a tu agente acceso a tus notas desde la terminal.",+ "description": "Dale a tu asistente acceso a tus notas desde la terminal.","installLabel": "Instalar","learnMore": "Leer la documentación","copyDocsLink": "Copiar enlace de la documentación",diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex 2d3274f74..562ebc904 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -164,6 +164,7 @@"add": "Ajouter","retry": "Réessayer","back": "Retour",+ "logout": "Se déconnecter","next": "Suivant","complete": "Terminer","reset": "Réinitialiser",@@ -200,7 +201,7 @@"done": "Terminé","skip": "Passer","policyAiProcessingRestricted": "Le traitement par IA est restreint par votre organisation.",- "policyAgentRestricted": "L’utilisation de l’agent IA est restreinte par votre organisation.",+ "policyAgentRestricted": "L’utilisation de l’assistant IA est restreinte par votre organisation.","policyTranscriptionRestricted": "La transcription est restreinte par votre organisation.","managedConfigLoading": "Vérification de la configuration gérée de votre organisation en cours. Réessayez dans un instant.","managedConfigUnavailable": "L'accès d'entreprise géré est indisponible. Reconnectez-vous ou contactez votre administrateur.",@@ -213,8 +214,8 @@"microphoneDescription": "Transforme la voix en texte.","accessibilityDescription": "Colle le texte dans votre application active.","systemAudioTitle": "Audio Système",- "systemAudioDescription": "Capture l’audio d’autres applications.",- "screenContextDescription": "Permet à votre assistant vocal de voir votre écran. Jamais enregistré.",+ "systemAudioDescription": "Nécessaire pour capturer l’audio dans les notes de réunion.",+ "screenContextDescription": "Partagez le contexte de l’écran avec l’assistant vocal.","enable": "Activer","enabled": "Activé"},@@ -239,6 +240,7 @@"hotkey": {"capture": "Appuyez sur les touches que vous souhaitez utiliser","chooseAnother": "Choisir un autre raccourci",+ "confirmAgain": "Appuyez à nouveau sur {{hotkey}} pour confirmer","inUse": "Ce raccourci est déjà utilisé. Choisissez-en un autre.","holding": "Maintenez la touche ou appuyez sur une autre"},@@ -411,7 +413,6 @@"descriptionLineOne": "Choisissez les modèles à exécuter","descriptionLineTwo": "sur votre appareil.","providerLabel": "Fournisseur",- "agent": "Agent","download": "Télécharger","downloadingShort": "Téléchargement","selected": "Sélectionné",@@ -420,7 +421,7 @@"cancelDownload": "Annuler le téléchargement de {{model}}","downloads": "Téléchargements de modèles","downloading": "Téléchargement… {{progress}}%",- "installing": "Installation du modèle…"+ "installing": "Installation"}},"steps": {@@ -864,7 +865,7 @@"errorTitles": {"sessionExpired": "Session expirée","offline": "Vous êtes hors ligne",- "agentUnavailable": "Agent indisponible",+ "agentUnavailable": "Assistant indisponible","screenContextSkipped": "Contexte d'écran ignoré","dailyLimitReached": "Limite quotidienne atteinte","providerRateLimited": "Limite de débit du fournisseur"@@ -1101,12 +1102,12 @@"welcomeBack": "Bon retour"},"signedIn": {- "ready": "Prêt",- "welcomeBack": "Bon retour",- "welcomeBackName": "Bon retour, {{name}}"+ "welcomeBack": "Bon retour"},"sso": {"continueWithSSO": "Se connecter avec le SSO",+ "workEmailLabel": "E-mail professionnel",+ "emailPlaceholder": "Ajoutez votre e-mail","emailRequired": "Saisissez votre e-mail professionnel pour utiliser le SSO.","failed": "Échec de l’authentification unique. Veuillez réessayer.","companySignInTitle": "Utiliser la connexion de votre entreprise",@@ -1461,10 +1462,10 @@}},"edit": {- "agentNameLabel": "Nom de l'agent :",+ "agentNameLabel": "Nom de l'assistant :","cautionLabel": "Attention","cautionTextPrefix": "Modifier ce prompt peut affecter la qualité de la transcription.",- "cautionTextSuffix": "Conservez le placeholder {{agentName}} pour préserver la détection de l'agent.",+ "cautionTextSuffix": "Conservez le placeholder {{agentName}} pour préserver la détection de l'assistant.","placeholder": "Saisissez votre prompt système personnalisé..."},"tabs": {@@ -1879,7 +1880,7 @@"features": ["Enregistrements de réunions illimités","Rôles et gestion des membres de l'espace de travail",- "Mode agent",+ "Mode assistant","Discutez avec vos données","Support prioritaire"],@@ -2003,11 +2004,11 @@}},"agentConfig": {- "agentName": "Nom de l'agent",+ "agentName": "Nom de l'assistant","description": "Nommez votre assistant IA pour pouvoir l'interpeller directement pendant la dictée","dialogs": {- "updatedDescription": "Votre agent s'appelle désormais « {{name}} ». Interpellez-le en disant « Hey {{name}} » suivi de vos instructions.",- "updatedTitle": "Nom de l'agent mis à jour"+ "updatedDescription": "Votre assistant s'appelle désormais « {{name}} ». Interpellez-le en disant « Hey {{name}} » suivi de vos instructions.",+ "updatedTitle": "Nom de l'assistant mis à jour"},"examplesTitle": "Exemples","helper": "Choisissez un nom court et naturel à prononcer",@@ -2122,7 +2123,7 @@"clearDictionaryTitle": "Effacer le dictionnaire ?","clearDictionaryDescription": "Cela supprimera tous les mots de votre dictionnaire personnalisé. Cette action est irréversible.","clearAll": "Tout effacer",- "agentNameAutoManaged": "Géré automatiquement — synchronisé avec le nom de l'agent",+ "agentNameAutoManaged": "Géré automatiquement — synchronisé avec le nom de l'assistant","removeWord": "Supprimer le mot","noWords": "Aucun mot pour l'instant","wordsAppearHere": "Les mots que vous ajoutez apparaîtront ici",@@ -2633,7 +2634,7 @@"openai_gpt_4_1_mini": "Modèle GPT-4.1 plus petit","openai_gpt_4_1_nano": "GPT-4.1 à la latence la plus faible","anthropic_claude_fable_5": "Le modèle le plus performant d'Anthropic, classe Mythos",- "anthropic_claude_sonnet_5": "Modèle agentique rapide et performant à moindre coût",+ "anthropic_claude_sonnet_5": "Modèle assistant rapide et performant à moindre coût","anthropic_claude_sonnet_4_6": "Performances équilibrées","anthropic_claude_sonnet_4_5": "Génération Sonnet précédente","anthropic_claude_haiku_4_5": "Rapide avec une intelligence de pointe",@@ -2668,12 +2669,12 @@"corti_corti_s1_mini": "Modèle clinique compact avec raisonnement à moitié prix"},"enterprise": {- "bedrock_claude_fable_5": "Le modèle Claude le plus performant. Idéal pour les tâches les plus difficiles du Mode Agent.",+ "bedrock_claude_fable_5": "Le modèle Claude le plus performant. Idéal pour les tâches d'assistant les plus difficiles.","bedrock_claude_haiku_4_5": "Rapide et économique. Parfait pour nettoyer le texte.",- "bedrock_claude_sonnet_5": "Équilibré. Choix par défaut pour le Mode Agent.",- "bedrock_claude_opus_4_8": "Intelligence maximale. Pour les tâches complexes en Mode Agent.",+ "bedrock_claude_sonnet_5": "Équilibré. Choix par défaut pour les tâches d'assistant.",+ "bedrock_claude_opus_4_8": "Intelligence maximale. Pour les tâches d'assistant complexes.","bedrock_gpt_oss_120b": "Modèle ouvert d'OpenAI. Raisonnement solide à faible coût.",- "bedrock_deepseek_v3_2": "Modèle frontière à poids ouverts. Excellent rapport qualité-prix en Mode Agent.",+ "bedrock_deepseek_v3_2": "Modèle frontière à poids ouverts. Excellent rapport qualité-prix pour les tâches d'assistant.","bedrock_qwen3_next_80b": "Modèle ouvert épars. Rapide et multilingue.","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3566,7 +3567,7 @@},"dictationAgent": {"enabled": "Activer l'assistant vocal",- "enabledDescription": "Dictez des instructions à votre agent. Le texte surligné est envoyé au modèle configuré et modifié sur place. Activez-le en disant « \"{{agentName}}\" ».",+ "enabledDescription": "Dictez des instructions à votre assistant. Le texte surligné est envoyé au modèle configuré et modifié sur place. Activez-le en disant « \"{{agentName}}\" ».","screenContext": {"title": "Contexte d'écran","description": "Joint une capture de votre écran actif aux commandes de l'assistant vocal.",@@ -3581,7 +3582,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "Utilisez l'agent géré par OpenWhispr, sans clé API.",+ "openwhisprDesc": "Utilisez l'assistant géré par OpenWhispr, sans clé API.","providers": "Utilisez votre propre clé API","providersDesc": "Connectez-vous à OpenAI, Anthropic, Gemini ou Groq avec votre propre clé API.","local": "Local",@@ -3592,14 +3593,14 @@"enterpriseDesc": "Utilisez AWS Bedrock, Azure OpenAI ou Google Vertex."},"prompt": {- "title": "Invite de l'agent",+ "title": "Invite de l'assistant","description": "L'invite système utilisée lorsque le mot de réveil est détecté. Revient à l'invite par défaut intégrée."}},"agentMode": {"settings": {"systemPrompt": "Prompt système",- "systemPromptDescription": "Instructions personnalisées pour l'agent",+ "systemPromptDescription": "Instructions personnalisées pour l'assistant","systemPromptPlaceholder": "Entrez un prompt système personnalisé...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3751,7 +3752,7 @@},"cli": {"title": "Accès en ligne de commande",- "description": "Donnez à votre agent l'accès à vos notes depuis le terminal.",+ "description": "Donnez à votre assistant l'accès à vos notes depuis le terminal.","installLabel": "Installer","learnMore": "Lire la documentation","copyDocsLink": "Copier le lien de la documentation",diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 1a42f9ab2..a2c9bb19d 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -164,6 +164,7 @@"add": "Aggiungi","retry": "Riprova","back": "Indietro",+ "logout": "Disconnetti","next": "Avanti","complete": "Completa","reset": "Reimposta",@@ -200,7 +201,7 @@"done": "Fatto","skip": "Salta","policyAiProcessingRestricted": "L’elaborazione con IA è limitata dalla tua organizzazione.",- "policyAgentRestricted": "L’uso dell’agente IA è limitato dalla tua organizzazione.",+ "policyAgentRestricted": "L’uso dell’assistente IA è limitato dalla tua organizzazione.","policyTranscriptionRestricted": "La trascrizione è limitata dalla tua organizzazione.","managedConfigLoading": "Verifica della configurazione gestita della tua organizzazione in corso. Riprova tra un momento.","managedConfigUnavailable": "L'accesso aziendale gestito non è disponibile. Accedi di nuovo o contatta l'amministratore.",@@ -213,8 +214,8 @@"microphoneDescription": "Trasforma la voce in testo.","accessibilityDescription": "Incolla il testo nell’app attiva.","systemAudioTitle": "Audio di Sistema",- "systemAudioDescription": "Acquisisce l’audio da altre app.",- "screenContextDescription": "Consente all’assistente vocale di vedere lo schermo. Mai salvato.",+ "systemAudioDescription": "Necessario per acquisire l’audio nelle note delle riunioni.",+ "screenContextDescription": "Condividi il contesto dello schermo con l’assistente vocale.","enable": "Attiva","enabled": "Attivato"},@@ -239,6 +240,7 @@"hotkey": {"capture": "Premi i tasti che vuoi usare","chooseAnother": "Scegli un’altra scorciatoia",+ "confirmAgain": "Premi di nuovo {{hotkey}} per confermare","inUse": "Questa scorciatoia è già in uso. Scegline un’altra.","holding": "Continua a tenere premuto o premi un altro tasto"},@@ -411,7 +413,6 @@"descriptionLineOne": "Scegli i modelli da eseguire","descriptionLineTwo": "sul tuo dispositivo.","providerLabel": "Provider",- "agent": "Agente","download": "Scarica","downloadingShort": "Download","selected": "Selezionato",@@ -420,7 +421,7 @@"cancelDownload": "Annulla il download di {{model}}","downloads": "Download dei modelli","downloading": "Download in corso… {{progress}}%",- "installing": "Installazione del modello…"+ "installing": "Installazione"}},"steps": {@@ -864,7 +865,7 @@"errorTitles": {"sessionExpired": "Sessione scaduta","offline": "Sei offline",- "agentUnavailable": "Agente non disponibile",+ "agentUnavailable": "Assistente non disponibile","screenContextSkipped": "Contesto dello schermo ignorato","dailyLimitReached": "Limite giornaliero raggiunto","providerRateLimited": "Limite di velocità del provider"@@ -1102,12 +1103,12 @@"welcomeBack": "Bentornato"},"signedIn": {- "ready": "Pronto",- "welcomeBack": "Bentornato",- "welcomeBackName": "Bentornato, {{name}}"+ "welcomeBack": "Bentornato"},"sso": {"continueWithSSO": "Accedi con SSO",+ "workEmailLabel": "E-mail di lavoro",+ "emailPlaceholder": "Aggiungi la tua e-mail","emailRequired": "Inserisci la tua email di lavoro per usare l’SSO.","failed": "Accesso SSO non riuscito. Riprova.","companySignInTitle": "Usa l'accesso aziendale",@@ -1372,10 +1373,10 @@}},"edit": {- "agentNameLabel": "Nome dell'agente:",+ "agentNameLabel": "Nome dell'assistente:","cautionLabel": "Attenzione","cautionTextPrefix": "La modifica di questo prompt potrebbe influire sulla qualità della trascrizione.",- "cautionTextSuffix": "Mantieni il segnaposto {{agentName}} per preservare il rilevamento dell'agente.",+ "cautionTextSuffix": "Mantieni il segnaposto {{agentName}} per preservare il rilevamento dell'assistente.","placeholder": "Inserisci il tuo prompt di sistema personalizzato..."},"tabs": {@@ -1609,7 +1610,7 @@"features": ["Registrazioni riunioni illimitate","Ruoli e gestione dei membri dell'area di lavoro",- "Modalità agente",+ "Modalità assistente","Chatta con i tuoi dati","Supporto prioritario"],@@ -1714,11 +1715,11 @@}},"agentConfig": {- "agentName": "Nome dell'agente",+ "agentName": "Nome dell'assistente","description": "Dai un nome al tuo assistente IA per rivolgerti direttamente a lui durante la dettatura","dialogs": {- "updatedDescription": "Il tuo agente ora si chiama \"{{name}}\". Rivolgiti a lui dicendo \"Ehi {{name}}\" seguito dalle tue istruzioni.",- "updatedTitle": "Nome dell'agente aggiornato"+ "updatedDescription": "Il tuo assistente ora si chiama \"{{name}}\". Rivolgiti a lui dicendo \"Ehi {{name}}\" seguito dalle tue istruzioni.",+ "updatedTitle": "Nome dell'assistente aggiornato"},"examplesTitle": "Esempi","helper": "Scegli qualcosa di breve e naturale da dire ad alta voce",@@ -1833,7 +1834,7 @@"clearDictionaryTitle": "Svuotare il dizionario?","clearDictionaryDescription": "Verranno rimosse tutte le parole dal tuo dizionario personalizzato. Questa azione non può essere annullata.","clearAll": "Cancella tutto",- "agentNameAutoManaged": "Gestito automaticamente — sincronizzato con il nome dell'agente",+ "agentNameAutoManaged": "Gestito automaticamente — sincronizzato con il nome dell'assistente","removeWord": "Rimuovi parola","noWords": "Nessuna parola ancora","wordsAppearHere": "Le parole aggiunte appariranno qui",@@ -2540,7 +2541,7 @@"openai_gpt_4_1_mini": "Modello GPT-4.1 più piccolo","openai_gpt_4_1_nano": "GPT-4.1 con la latenza più bassa","anthropic_claude_fable_5": "Il modello più capace di Anthropic, classe Mythos",- "anthropic_claude_sonnet_5": "Modello agentico veloce e capace a costo inferiore",+ "anthropic_claude_sonnet_5": "Modello assistente veloce e capace a costo inferiore","anthropic_claude_sonnet_4_6": "Prestazioni bilanciate","anthropic_claude_sonnet_4_5": "Generazione Sonnet precedente","anthropic_claude_haiku_4_5": "Veloce con intelligenza quasi da frontiera",@@ -2575,12 +2576,12 @@"corti_corti_s1_mini": "Modello clinico compatto con ragionamento a metà prezzo"},"enterprise": {- "bedrock_claude_fable_5": "Il modello Claude più capace. Ideale per i compiti più difficili della Modalità Agente.",+ "bedrock_claude_fable_5": "Il modello Claude più capace. Ideale per i compiti di assistente più difficili.","bedrock_claude_haiku_4_5": "Veloce ed economico. Ideale per ripulire il testo.",- "bedrock_claude_sonnet_5": "Equilibrato. Scelta predefinita per la Modalità Agente.",- "bedrock_claude_opus_4_8": "Massima intelligenza. Per compiti complessi in Modalità Agente.",+ "bedrock_claude_sonnet_5": "Equilibrato. Scelta predefinita per i compiti di assistente.",+ "bedrock_claude_opus_4_8": "Massima intelligenza. Per compiti di assistente complessi.","bedrock_gpt_oss_120b": "Modello aperto di OpenAI. Ottimo ragionamento a basso costo.",- "bedrock_deepseek_v3_2": "Modello frontier a pesi aperti. Ottimo valore per la Modalità Agente.",+ "bedrock_deepseek_v3_2": "Modello frontier a pesi aperti. Ottimo valore per i compiti di assistente.","bedrock_qwen3_next_80b": "Modello aperto sparso. Veloce e multilingue.","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3401,7 +3402,7 @@},"dictationAgent": {"enabled": "Attiva assistente vocale",- "enabledDescription": "Detta istruzioni al tuo agente. Il testo evidenziato viene inviato al modello configurato e modificato sul posto. Attivalo dicendo \"{{agentName}}\".",+ "enabledDescription": "Detta istruzioni al tuo assistente. Il testo evidenziato viene inviato al modello configurato e modificato sul posto. Attivalo dicendo \"{{agentName}}\".","screenContext": {"title": "Contesto dello schermo","description": "Allega uno screenshot dello schermo attivo ai comandi dell'assistente vocale.",@@ -3416,7 +3417,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "Usa l'agente gestito da OpenWhispr, senza bisogno di chiave API.",+ "openwhisprDesc": "Usa l'assistente gestito da OpenWhispr, senza bisogno di chiave API.","providers": "Usa la tua chiave API","providersDesc": "Connettiti a OpenAI, Anthropic, Gemini o Groq con la tua chiave API.","local": "Locale",@@ -3427,14 +3428,14 @@"enterpriseDesc": "Usa AWS Bedrock, Azure OpenAI o Google Vertex."},"prompt": {- "title": "Prompt dell'agente",+ "title": "Prompt dell'assistente","description": "Il prompt di sistema usato quando viene rilevata la parola di attivazione. In assenza, usa quello predefinito integrato."}},"agentMode": {"settings": {"systemPrompt": "Prompt di Sistema",- "systemPromptDescription": "Istruzioni personalizzate per l'agente",+ "systemPromptDescription": "Istruzioni personalizzate per l'assistente","systemPromptPlaceholder": "Inserisci un prompt di sistema personalizzato...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3586,7 +3587,7 @@},"cli": {"title": "Accesso da riga di comando",- "description": "Dai al tuo agente l'accesso alle note dal terminale.",+ "description": "Dai al tuo assistente l'accesso alle note dal terminale.","installLabel": "Installa","learnMore": "Leggi la documentazione","copyDocsLink": "Copia link della documentazione",diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 8f534c4bb..5880cccf8 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -164,6 +164,7 @@"add": "追加","retry": "再試行","back": "戻る",+ "logout": "ログアウト","next": "次へ","complete": "完了","reset": "リセット",@@ -200,7 +201,7 @@"done": "完了","skip": "スキップ","policyAiProcessingRestricted": "AI処理は組織によって制限されています。",- "policyAgentRestricted": "AIエージェントの使用は組織によって制限されています。",+ "policyAgentRestricted": "AIアシスタントの使用は組織によって制限されています。","policyTranscriptionRestricted": "文字起こしは組織によって制限されています。","managedConfigLoading": "組織のマネージド設定を確認しています。しばらくしてからもう一度お試しください。","managedConfigUnavailable": "マネージド エンタープライズ アクセスを利用できません。再度サインインするか、管理者にお問い合わせください。",@@ -213,8 +214,8 @@"microphoneDescription": "音声をテキストに変換します。","accessibilityDescription": "アクティブなアプリにテキストを貼り付けます。","systemAudioTitle": "システムオーディオ",- "systemAudioDescription": "ほかのアプリの音声を取り込みます。",- "screenContextDescription": "音声アシスタントが作業中の画面を確認できます。保存はされません。",+ "systemAudioDescription": "会議メモで音声を取り込むために必要です。",+ "screenContextDescription": "画面コンテキストを音声アシスタントと共有します。","enable": "有効にする","enabled": "有効"},@@ -239,6 +240,7 @@"hotkey": {"capture": "使用したいキーを押してください","chooseAnother": "別のショートカットを選ぶ",+ "confirmAgain": "確認するには {{hotkey}} をもう一度押してください","inUse": "そのショートカットはすでに使用されています。別のものを選んでください。","holding": "押したままにするか、別のキーを押してください"},@@ -411,7 +413,6 @@"descriptionLineOne": "デバイス上で実行する","descriptionLineTwo": "モデルを選択してください。","providerLabel": "プロバイダー",- "agent": "エージェント","download": "ダウンロード","downloadingShort": "ダウンロード中","selected": "選択済み",@@ -420,7 +421,7 @@"cancelDownload": "{{model}} のダウンロードをキャンセル","downloads": "モデルのダウンロード","downloading": "ダウンロード中… {{progress}}%",- "installing": "モデルをインストール中…"+ "installing": "インストール中"}},"steps": {@@ -864,7 +865,7 @@"errorTitles": {"sessionExpired": "セッション期限切れ","offline": "オフラインです",- "agentUnavailable": "エージェントを利用できません",+ "agentUnavailable": "アシスタントを利用できません","screenContextSkipped": "画面コンテキストをスキップしました","dailyLimitReached": "1 日の上限に達しました","providerRateLimited": "プロバイダーのレート制限"@@ -1102,12 +1103,12 @@"welcomeBack": "おかえりなさい"},"signedIn": {- "ready": "準備完了",- "welcomeBack": "おかえりなさい",- "welcomeBackName": "おかえりなさい、{{name}} さん"+ "welcomeBack": "おかえりなさい"},"sso": {"continueWithSSO": "SSO でサインイン",+ "workEmailLabel": "勤務先のメールアドレス",+ "emailPlaceholder": "メールアドレスを入力","emailRequired": "SSO を使用するには勤務先のメールアドレスを入力してください。","failed": "シングルサインオンに失敗しました。もう一度お試しください。","companySignInTitle": "会社のサインインを使用",@@ -1372,10 +1373,10 @@}},"edit": {- "agentNameLabel": "エージェント名:",+ "agentNameLabel": "アシスタント名:","cautionLabel": "注意","cautionTextPrefix": "このプロンプトを変更すると文字起こしの品質に影響する場合があります。",- "cautionTextSuffix": "エージェント検出を維持するために {{agentName}} プレースホルダーを残してください。",+ "cautionTextSuffix": "アシスタント検出を維持するために {{agentName}} プレースホルダーを残してください。","placeholder": "カスタムシステムプロンプトを入力..."},"tabs": {@@ -1590,7 +1591,7 @@"features": ["無制限の会議録音","ワークスペースのロールとメンバー管理",- "エージェントモード",+ "アシスタントモード","データとチャット","優先サポート"],@@ -1714,11 +1715,11 @@}},"agentConfig": {- "agentName": "エージェント名",+ "agentName": "アシスタント名","description": "ディクテーション中に直接呼びかけられるよう、AI アシスタントに名前を付けましょう","dialogs": {- "updatedDescription": "エージェントの名前が「{{name}}」になりました。「ねぇ {{name}}」と呼びかけて指示を出してください。",- "updatedTitle": "エージェント名を更新しました"+ "updatedDescription": "アシスタントの名前が「{{name}}」になりました。「ねぇ {{name}}」と呼びかけて指示を出してください。",+ "updatedTitle": "アシスタント名を更新しました"},"examplesTitle": "例","helper": "声に出して言いやすい短い名前を選びましょう",@@ -1833,7 +1834,7 @@"clearDictionaryTitle": "辞書をクリアしますか?","clearDictionaryDescription": "カスタム辞書からすべての単語が削除されます。この操作は元に戻せません。","clearAll": "すべてクリア",- "agentNameAutoManaged": "自動管理 — エージェント名と同期",+ "agentNameAutoManaged": "自動管理 — アシスタント名と同期","removeWord": "単語を削除","noWords": "まだ単語がありません","wordsAppearHere": "追加した単語がここに表示されます",@@ -2540,7 +2541,7 @@"openai_gpt_4_1_mini": "小型 GPT-4.1 モデル","openai_gpt_4_1_nano": "最低レイテンシーの GPT-4.1","anthropic_claude_fable_5": "Anthropic の最も高性能なモデル、Mythos クラス",- "anthropic_claude_sonnet_5": "低コストで高速かつ高性能なエージェントモデル",+ "anthropic_claude_sonnet_5": "低コストで高速かつ高性能なアシスタントモデル","anthropic_claude_sonnet_4_6": "バランスの取れた性能","anthropic_claude_sonnet_4_5": "前世代の Sonnet モデル","anthropic_claude_haiku_4_5": "高速でフロンティアに近い知能",@@ -2575,12 +2576,12 @@"corti_corti_s1_mini": "推論対応のコンパクトな臨床モデルを半額で"},"enterprise": {- "bedrock_claude_fable_5": "最も高性能な Claude モデル。最も難しいエージェントモードのタスクに最適です。",+ "bedrock_claude_fable_5": "最も高性能な Claude モデル。最も難しいアシスタントタスクに最適です。","bedrock_claude_haiku_4_5": "高速で低コスト。テキスト整形に最適です。",- "bedrock_claude_sonnet_5": "バランス型。エージェントモードの既定モデルに最適です。",- "bedrock_claude_opus_4_8": "最高性能。複雑なエージェントモードのタスクに最適です。",+ "bedrock_claude_sonnet_5": "バランス型。アシスタントタスクの既定モデルに最適です。",+ "bedrock_claude_opus_4_8": "最高性能。複雑なアシスタントタスクに最適です。","bedrock_gpt_oss_120b": "OpenAI のオープンウェイトモデル。低コストで高い推論力。",- "bedrock_deepseek_v3_2": "オープンウェイトのフロンティアモデル。エージェントモードに最適。",+ "bedrock_deepseek_v3_2": "オープンウェイトのフロンティアモデル。アシスタントタスクに最適。","bedrock_qwen3_next_80b": "スパースなオープンウェイトモデル。高速で多言語対応。","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3401,7 +3402,7 @@},"dictationAgent": {"enabled": "音声アシスタントを有効にする",- "enabledDescription": "エージェントに指示を口述できます。選択中のテキストは設定済みのモデルに送信され、その場で編集されます。「{{agentName}}」と話しかけて起動します。",+ "enabledDescription": "アシスタントに指示を口述できます。選択中のテキストは設定済みのモデルに送信され、その場で編集されます。「{{agentName}}」と話しかけて起動します。","screenContext": {"title": "画面コンテキスト","description": "音声アシスタントのコマンドに、作業中の画面のスクリーンショットを添付します。",@@ -3416,7 +3417,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "OpenWhispr が管理するエージェントを使用。API キーは不要です。",+ "openwhisprDesc": "OpenWhispr が管理するアシスタントを使用。API キーは不要です。","providers": "自分の API キーを使用","providersDesc": "自分の API キーで OpenAI、Anthropic、Gemini、Groq に接続します。","local": "ローカル",@@ -3427,14 +3428,14 @@"enterpriseDesc": "AWS Bedrock、Azure OpenAI、Google Vertex を使用します。"},"prompt": {- "title": "エージェントプロンプト",+ "title": "アシスタントプロンプト","description": "ウェイクワードが検出されたときに使用するシステムプロンプト。未設定の場合は組み込みのデフォルトが使われます。"}},"agentMode": {"settings": {"systemPrompt": "システムプロンプト",- "systemPromptDescription": "エージェントへのカスタム指示",+ "systemPromptDescription": "アシスタントへのカスタム指示","systemPromptPlaceholder": "カスタムシステムプロンプトを入力...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3586,7 +3587,7 @@},"cli": {"title": "コマンドラインアクセス",- "description": "ターミナルからエージェントにメモへのアクセスを許可します。",+ "description": "ターミナルからアシスタントにメモへのアクセスを許可します。","installLabel": "インストール","learnMore": "ドキュメントを読む","copyDocsLink": "ドキュメントリンクをコピー",diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 66fd63f07..1bfd29be3 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -143,6 +143,7 @@"add": "Adicionar","retry": "Tentar novamente","back": "Voltar",+ "logout": "Sair","next": "Avançar","complete": "Concluir","reset": "Redefinir",@@ -179,7 +180,7 @@"done": "Listo","skip": "Pular","policyAiProcessingRestricted": "O processamento de IA está restrito pela sua organização.",- "policyAgentRestricted": "O uso do agente de IA está restrito pela sua organização.",+ "policyAgentRestricted": "O uso do assistente de IA está restrito pela sua organização.","policyTranscriptionRestricted": "A transcrição está restrita pela sua organização.","managedConfigLoading": "Verificando a configuração gerenciada da sua organização. Tente novamente em instantes.","managedConfigUnavailable": "O acesso empresarial gerenciado está indisponível. Entre novamente ou entre em contato com o administrador.",@@ -192,8 +193,8 @@"microphoneDescription": "Transforma voz em texto.","accessibilityDescription": "Cola o texto no app ativo.","systemAudioTitle": "Áudio do Sistema",- "systemAudioDescription": "Captura o áudio de outros apps.",- "screenContextDescription": "Permite que o assistente de voz veja sua tela. Nunca é salvo.",+ "systemAudioDescription": "Necessário para capturar áudio nas notas de reunião.",+ "screenContextDescription": "Compartilhe o contexto da tela com o assistente de voz.","enable": "Ativar","enabled": "Ativado"},@@ -218,6 +219,7 @@"hotkey": {"capture": "Pressione as teclas que você quer usar","chooseAnother": "Escolher outro atalho",+ "confirmAgain": "Pressione {{hotkey}} novamente para confirmar","inUse": "Esse atalho já está em uso. Escolha outro.","holding": "Continue pressionando ou pressione outra tecla"},@@ -390,7 +392,6 @@"descriptionLineOne": "Escolha os modelos que você quer","descriptionLineTwo": "executar no seu dispositivo.","providerLabel": "Provedor",- "agent": "Agente","download": "Baixar","downloadingShort": "Baixando","selected": "Selecionado",@@ -399,7 +400,7 @@"cancelDownload": "Cancelar o download de {{model}}","downloads": "Downloads de modelos","downloading": "Baixando… {{progress}}%",- "installing": "Instalando o modelo…"+ "installing": "Instalando"}},"steps": {@@ -843,7 +844,7 @@"errorTitles": {"sessionExpired": "Sessão expirada","offline": "Sem conexão",- "agentUnavailable": "Agente indisponível",+ "agentUnavailable": "Assistente indisponível","screenContextSkipped": "Contexto de tela ignorado","dailyLimitReached": "Limite diário atingido","providerRateLimited": "Limite de taxa do provedor"@@ -1081,12 +1082,12 @@"welcomeBack": "Que bom ter você de volta"},"signedIn": {- "ready": "Pronto",- "welcomeBack": "Que bom ter você de volta",- "welcomeBackName": "Que bom ter você de volta, {{name}}"+ "welcomeBack": "Que bom ter você de volta"},"sso": {"continueWithSSO": "Entrar com SSO",+ "workEmailLabel": "E-mail profissional",+ "emailPlaceholder": "Adicione seu e-mail","emailRequired": "Insira seu e-mail corporativo para usar o SSO.","failed": "Falha no logon único. Tente novamente.","companySignInTitle": "Usar o login da sua empresa",@@ -1351,10 +1352,10 @@}},"edit": {- "agentNameLabel": "Nome do agente:",+ "agentNameLabel": "Nome do assistente:","cautionLabel": "Cuidado","cautionTextPrefix": "Modificar este prompt pode afetar a qualidade da transcrição.",- "cautionTextSuffix": "Mantenha o marcador {{agentName}} para preservar a detecção do agente.",+ "cautionTextSuffix": "Mantenha o marcador {{agentName}} para preservar a detecção do assistente.","placeholder": "Digite seu prompt de sistema personalizado..."},"tabs": {@@ -1588,7 +1589,7 @@"features": ["Gravações de reuniões ilimitadas","Funções e gestão de membros do espaço de trabalho",- "Modo agente",+ "Modo assistente","Converse com seus dados","Suporte prioritário"],@@ -1693,11 +1694,11 @@}},"agentConfig": {- "agentName": "Nome do agente",+ "agentName": "Nome do assistente","description": "Dê um nome ao seu assistente de IA para poder chamá-lo diretamente durante o ditado","dialogs": {- "updatedDescription": "Seu agente agora se chama \"{{name}}\". Chame-o dizendo \"Ei {{name}}\" seguido das suas instruções.",- "updatedTitle": "Nome do agente atualizado"+ "updatedDescription": "Seu assistente agora se chama \"{{name}}\". Chame-o dizendo \"Ei {{name}}\" seguido das suas instruções.",+ "updatedTitle": "Nome do assistente atualizado"},"examplesTitle": "Exemplos","helper": "Escolha algo curto e natural de se dizer em voz alta",@@ -1812,7 +1813,7 @@"clearDictionaryTitle": "Limpar dicionário?","clearDictionaryDescription": "Isso removerá todas as palavras do seu dicionário personalizado. Esta ação não pode ser desfeita.","clearAll": "Limpar tudo",- "agentNameAutoManaged": "Gerenciado automaticamente — sincronizado com o nome do agente",+ "agentNameAutoManaged": "Gerenciado automaticamente — sincronizado com o nome do assistente","removeWord": "Remover palavra","noWords": "Nenhuma palavra ainda","wordsAppearHere": "Palavras que você adicionar aparecerão aqui",@@ -2519,7 +2520,7 @@"openai_gpt_4_1_mini": "Modelo GPT-4.1 menor","openai_gpt_4_1_nano": "GPT-4.1 com menor latência","anthropic_claude_fable_5": "O modelo mais capaz da Anthropic, classe Mythos",- "anthropic_claude_sonnet_5": "Modelo agêntico rápido e capaz por menor custo",+ "anthropic_claude_sonnet_5": "Modelo assistente rápido e capaz por menor custo","anthropic_claude_sonnet_4_6": "Desempenho equilibrado","anthropic_claude_sonnet_4_5": "Geração anterior do Sonnet","anthropic_claude_haiku_4_5": "Rápido com inteligência quase de ponta",@@ -2554,12 +2555,12 @@"corti_corti_s1_mini": "Modelo clínico compacto com raciocínio pela metade do preço"},"enterprise": {- "bedrock_claude_fable_5": "O modelo Claude mais capaz. Ideal para as tarefas mais difíceis do Modo Agente.",+ "bedrock_claude_fable_5": "O modelo Claude mais capaz. Ideal para as tarefas de assistente mais difíceis.","bedrock_claude_haiku_4_5": "Rápido e barato. Ótimo para limpar texto.",- "bedrock_claude_sonnet_5": "Equilibrado. Padrão recomendado para o Modo Agente.",- "bedrock_claude_opus_4_8": "Máxima inteligência. Para tarefas complexas do Modo Agente.",+ "bedrock_claude_sonnet_5": "Equilibrado. Padrão recomendado para tarefas de assistente.",+ "bedrock_claude_opus_4_8": "Máxima inteligência. Para tarefas complexas de assistente.","bedrock_gpt_oss_120b": "Modelo aberto da OpenAI. Ótimo raciocínio a baixo custo.",- "bedrock_deepseek_v3_2": "Modelo de fronteira de pesos abertos. Ótimo custo-benefício para o Modo Agente.",+ "bedrock_deepseek_v3_2": "Modelo de fronteira de pesos abertos. Ótimo custo-benefício para tarefas de assistente.","bedrock_qwen3_next_80b": "Modelo aberto esparso. Rápido e multilíngue.","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3401,7 +3402,7 @@},"dictationAgent": {"enabled": "Ativar assistente de voz",- "enabledDescription": "Dite instruções para o seu agente. O texto destacado é enviado ao modelo configurado e editado no lugar. Ative dizendo \"{{agentName}}\".",+ "enabledDescription": "Dite instruções para o seu assistente. O texto destacado é enviado ao modelo configurado e editado no lugar. Ative dizendo \"{{agentName}}\".","screenContext": {"title": "Contexto de tela","description": "Anexa uma captura da tela ativa aos comandos do assistente de voz.",@@ -3416,7 +3417,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "Use o agente gerenciado pelo OpenWhispr, sem precisar de chave API.",+ "openwhisprDesc": "Use o assistente gerenciado pelo OpenWhispr, sem precisar de chave API.","providers": "Use sua própria chave","providersDesc": "Conecte-se à OpenAI, Anthropic, Gemini ou Groq com sua própria chave API.","local": "Local",@@ -3427,14 +3428,14 @@"enterpriseDesc": "Use AWS Bedrock, Azure OpenAI ou Google Vertex."},"prompt": {- "title": "Prompt do agente",+ "title": "Prompt do assistente","description": "O prompt de sistema usado quando a palavra de ativação é detectada. Recorre ao padrão integrado."}},"agentMode": {"settings": {"systemPrompt": "Prompt do Sistema",- "systemPromptDescription": "Instruções personalizadas para o agente",+ "systemPromptDescription": "Instruções personalizadas para o assistente","systemPromptPlaceholder": "Digite um prompt de sistema personalizado...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3586,7 +3587,7 @@},"cli": {"title": "Acesso pela linha de comando",- "description": "Dê ao seu agente acesso às suas notas pelo terminal.",+ "description": "Dê ao seu assistente acesso às suas notas pelo terminal.","installLabel": "Instalar","learnMore": "Ler a documentação","copyDocsLink": "Copiar link da documentação",diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 9938b2d27..c32370c38 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -164,6 +164,7 @@"add": "Добавить","retry": "Повторить","back": "Назад",+ "logout": "Выйти","next": "Далее","complete": "Готово","reset": "Сбросить",@@ -200,7 +201,7 @@"done": "Готово","skip": "Пропустить","policyAiProcessingRestricted": "Обработка ИИ ограничена вашей организацией.",- "policyAgentRestricted": "Использование ИИ-агента ограничено вашей организацией.",+ "policyAgentRestricted": "Использование ИИ-помощника ограничено вашей организацией.","policyTranscriptionRestricted": "Транскрипция ограничена вашей организацией.","managedConfigLoading": "Проверяется управляемая настройка вашей организации. Повторите попытку через некоторое время.","managedConfigUnavailable": "Управляемый корпоративный доступ недоступен. Войдите снова или обратитесь к администратору.",@@ -213,8 +214,8 @@"microphoneDescription": "Преобразует речь в текст.","accessibilityDescription": "Вставляет текст в активное приложение.","systemAudioTitle": "Системное аудио",- "systemAudioDescription": "Записывает звук из других приложений.",- "screenContextDescription": "Позволяет голосовому помощнику видеть ваш экран. Никогда не сохраняется.",+ "systemAudioDescription": "Необходимо для захвата звука в заметках о встречах.",+ "screenContextDescription": "Делитесь контекстом экрана с голосовым помощником.","enable": "Включить","enabled": "Включено"},@@ -239,6 +240,7 @@"hotkey": {"capture": "Нажмите клавиши, которые хотите использовать","chooseAnother": "Выбрать другое сочетание",+ "confirmAgain": "Нажмите {{hotkey}} ещё раз для подтверждения","inUse": "Это сочетание уже используется. Выберите другое.","holding": "Удерживайте или нажмите другую клавишу"},@@ -411,7 +413,6 @@"descriptionLineOne": "Выберите модели, которые хотите","descriptionLineTwo": "запускать на своём устройстве.","providerLabel": "Провайдер",- "agent": "Агент","download": "Скачать","downloadingShort": "Загрузка","selected": "Выбрано",@@ -420,7 +421,7 @@"cancelDownload": "Отменить загрузку {{model}}","downloads": "Загрузки моделей","downloading": "Загрузка… {{progress}}%",- "installing": "Установка модели…"+ "installing": "Установка"}},"steps": {@@ -864,7 +865,7 @@"errorTitles": {"sessionExpired": "Сессия истекла","offline": "Нет подключения к интернету",- "agentUnavailable": "Агент недоступен",+ "agentUnavailable": "Помощник недоступен","screenContextSkipped": "Контекст экрана пропущен","dailyLimitReached": "Дневной лимит достигнут","providerRateLimited": "Ограничение провайдера"@@ -1101,12 +1102,12 @@"welcomeBack": "С возвращением"},"signedIn": {- "ready": "Готово",- "welcomeBack": "С возвращением",- "welcomeBackName": "С возвращением, {{name}}"+ "welcomeBack": "С возвращением"},"sso": {"continueWithSSO": "Войти через SSO",+ "workEmailLabel": "Рабочая электронная почта",+ "emailPlaceholder": "Добавьте адрес электронной почты","emailRequired": "Введите рабочий адрес электронной почты для использования SSO.","failed": "Не удалось выполнить единый вход. Повторите попытку.","companySignInTitle": "Войти через корпоративную учётную запись",@@ -1372,10 +1373,10 @@}},"edit": {- "agentNameLabel": "Имя агента:",+ "agentNameLabel": "Имя помощника:","cautionLabel": "Внимание","cautionTextPrefix": "Изменение этого промпта может повлиять на качество транскрипции.",- "cautionTextSuffix": "Сохраняйте заполнитель {{agentName}}, чтобы обнаружение агента работало корректно.",+ "cautionTextSuffix": "Сохраняйте заполнитель {{agentName}}, чтобы обнаружение помощника работало корректно.","placeholder": "Введите пользовательский системный промпт..."},"tabs": {@@ -1613,7 +1614,7 @@"features": ["Безлимитные записи встреч","Роли и управление участниками рабочего пространства",- "Режим агента",+ "Режим помощника","Чат с вашими данными","Приоритетная поддержка"],@@ -1718,11 +1719,11 @@}},"agentConfig": {- "agentName": "Имя агента",+ "agentName": "Имя помощника","description": "Назовите вашего ИИ-помощника, чтобы обращаться к нему во время диктовки","dialogs": {- "updatedDescription": "Ваш агент теперь называется «{{name}}». Обращайтесь к нему, говоря «Привет, {{name}}», а затем давайте инструкции.",- "updatedTitle": "Имя агента обновлено"+ "updatedDescription": "Ваш помощник теперь называется «{{name}}». Обращайтесь к нему, говоря «Привет, {{name}}», а затем давайте инструкции.",+ "updatedTitle": "Имя помощника обновлено"},"examplesTitle": "Примеры","helper": "Выберите что-то короткое и естественное для произношения",@@ -1837,7 +1838,7 @@"clearDictionaryTitle": "Очистить словарь?","clearDictionaryDescription": "Все слова из вашего пользовательского словаря будут удалены. Это действие нельзя отменить.","clearAll": "Очистить всё",- "agentNameAutoManaged": "Управляется автоматически — синхронизировано с именем агента",+ "agentNameAutoManaged": "Управляется автоматически — синхронизировано с именем помощника","removeWord": "Удалить слово","noWords": "Слов пока нет","wordsAppearHere": "Добавленные слова появятся здесь",@@ -2556,7 +2557,7 @@"openai_gpt_4_1_mini": "Компактная версия GPT-4.1","openai_gpt_4_1_nano": "Минимальная задержка GPT-4.1","anthropic_claude_fable_5": "Самая мощная модель Anthropic, класс Mythos",- "anthropic_claude_sonnet_5": "Быстрая и мощная агентная модель по низкой цене",+ "anthropic_claude_sonnet_5": "Быстрая и мощная модель-помощник по низкой цене","anthropic_claude_sonnet_4_6": "Сбалансированная производительность","anthropic_claude_sonnet_4_5": "Предыдущее поколение Sonnet","anthropic_claude_haiku_4_5": "Быстрая с почти передовым интеллектом",@@ -2591,12 +2592,12 @@"corti_corti_s1_mini": "Компактная клиническая модель с рассуждением за полцены"},"enterprise": {- "bedrock_claude_fable_5": "Самая мощная модель Claude. Лучше всего для самых сложных задач режима агента.",+ "bedrock_claude_fable_5": "Самая мощная модель Claude. Лучше всего для самых сложных задач помощника.","bedrock_claude_haiku_4_5": "Быстрая и дешёвая. Отлично подходит для очистки текста.",- "bedrock_claude_sonnet_5": "Сбалансированная. Лучший выбор для режима агента.",- "bedrock_claude_opus_4_8": "Максимальный интеллект. Для сложных задач в режиме агента.",+ "bedrock_claude_sonnet_5": "Сбалансированная. Лучший выбор для задач помощника.",+ "bedrock_claude_opus_4_8": "Максимальный интеллект. Для сложных задач помощника.","bedrock_gpt_oss_120b": "Открытая модель OpenAI. Сильные рассуждения по низкой цене.",- "bedrock_deepseek_v3_2": "Открытая передовая модель. Отличный выбор для режима агента.",+ "bedrock_deepseek_v3_2": "Открытая передовая модель. Отличный выбор для задач помощника.","bedrock_qwen3_next_80b": "Разреженная открытая модель. Быстрая и многоязычная.","vertex_gemini_2_5_flash": "Fast multimodal model via Vertex","vertex_gemini_2_5_pro": "Advanced reasoning via Vertex"@@ -3439,7 +3440,7 @@},"dictationAgent": {"enabled": "Включить голосового помощника",- "enabledDescription": "Диктуйте инструкции своему агенту. Выделенный текст отправляется в настроенную модель и редактируется на месте. Активируется словом \"{{agentName}}\".",+ "enabledDescription": "Диктуйте инструкции своему помощнику. Выделенный текст отправляется в настроенную модель и редактируется на месте. Активируется словом \"{{agentName}}\".","screenContext": {"title": "Контекст экрана","description": "Прикрепляет снимок активного экрана к командам голосового помощника.",@@ -3454,7 +3455,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "Используйте агента под управлением OpenWhispr, без API-ключа.",+ "openwhisprDesc": "Используйте помощника под управлением OpenWhispr, без API-ключа.","providers": "Свой ключ","providersDesc": "Подключитесь к OpenAI, Anthropic, Gemini или Groq со своим API-ключом.","local": "Локально",@@ -3465,14 +3466,14 @@"enterpriseDesc": "Используйте AWS Bedrock, Azure OpenAI или Google Vertex."},"prompt": {- "title": "Подсказка агента",+ "title": "Подсказка помощника","description": "Системная подсказка, используемая при обнаружении слова активации. По умолчанию применяется встроенная."}},"agentMode": {"settings": {"systemPrompt": "Системный промпт",- "systemPromptDescription": "Пользовательские инструкции для агента",+ "systemPromptDescription": "Пользовательские инструкции для помощника","systemPromptPlaceholder": "Введите пользовательский системный промпт...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3624,7 +3625,7 @@},"cli": {"title": "Доступ через командную строку",- "description": "Дайте своему агенту доступ к заметкам из терминала.",+ "description": "Дайте своему помощнику доступ к заметкам из терминала.","installLabel": "Установить","learnMore": "Открыть документацию","copyDocsLink": "Скопировать ссылку на документацию",diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex 357c40c66..b6f15a350 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -164,6 +164,7 @@"add": "添加","retry": "重试","back": "返回",+ "logout": "退出登录","next": "下一步","complete": "完成","reset": "重置",@@ -200,7 +201,7 @@"done": "完成","skip": "跳过","policyAiProcessingRestricted": "AI 处理已被您的组织限制。",- "policyAgentRestricted": "AI 智能体的使用已被您的组织限制。",+ "policyAgentRestricted": "AI 助手的使用已被您的组织限制。","policyTranscriptionRestricted": "转录已被您的组织限制。","managedConfigLoading": "正在检查您组织的托管设置。请稍候再试。","managedConfigUnavailable": "托管企业访问不可用。请重新登录或联系管理员。",@@ -213,8 +214,8 @@"microphoneDescription": "将语音转换为文本。","accessibilityDescription": "将文本粘贴到当前应用。","systemAudioTitle": "系统音频",- "systemAudioDescription": "捕获其他应用的音频。",- "screenContextDescription": "让语音助手查看当前屏幕,绝不保存。",+ "systemAudioDescription": "在会议笔记中捕获音频时必需。",+ "screenContextDescription": "与语音助手共享屏幕上下文。","enable": "启用","enabled": "已启用"},@@ -239,6 +240,7 @@"hotkey": {"capture": "请按下你想使用的按键","chooseAnother": "选择其他快捷键",+ "confirmAgain": "再次按下 {{hotkey}} 以确认","inUse": "该快捷键已被使用。请选择其他快捷键。","holding": "继续按住,或按下另一个键"},@@ -411,7 +413,6 @@"descriptionLineOne": "选择你想在设备上","descriptionLineTwo": "运行的模型。","providerLabel": "服务商",- "agent": "智能体","download": "下载","downloadingShort": "下载中","selected": "已选择",@@ -420,7 +421,7 @@"cancelDownload": "取消下载 {{model}}","downloads": "模型下载","downloading": "正在下载… {{progress}}%",- "installing": "正在安装模型…"+ "installing": "安装中"}},"steps": {@@ -1101,12 +1102,12 @@"welcomeBack": "欢迎回来"},"signedIn": {- "ready": "就绪",- "welcomeBack": "欢迎回来",- "welcomeBackName": "欢迎回来,{{name}}"+ "welcomeBack": "欢迎回来"},"sso": {"continueWithSSO": "使用 SSO 登录",+ "workEmailLabel": "工作邮箱",+ "emailPlaceholder": "添加您的邮箱","emailRequired": "输入您的工作邮箱以使用 SSO。","failed": "单点登录失败,请重试。","companySignInTitle": "使用公司登录",@@ -1609,7 +1610,7 @@"features": ["无限会议录制","工作区角色与成员管理",- "代理模式",+ "助手模式","与您的数据对话","优先支持"],@@ -2540,7 +2541,7 @@"openai_gpt_4_1_mini": "精简版 GPT-4.1","openai_gpt_4_1_nano": "最低延迟 GPT-4.1","anthropic_claude_fable_5": "Anthropic 最强大的模型,Mythos 级",- "anthropic_claude_sonnet_5": "快速且强大的智能体模型,成本更低",+ "anthropic_claude_sonnet_5": "快速且强大的助手模型,成本更低","anthropic_claude_sonnet_4_6": "均衡性能","anthropic_claude_sonnet_4_5": "上一代 Sonnet","anthropic_claude_haiku_4_5": "快速且接近前沿水平",@@ -2575,12 +2576,12 @@"corti_corti_s1_mini": "紧凑型临床模型,半价提供推理"},"enterprise": {- "bedrock_claude_fable_5": "最强大的 Claude 模型。最适合最具挑战性的智能助手模式任务。",+ "bedrock_claude_fable_5": "最强大的 Claude 模型。最适合最具挑战性的助手任务。","bedrock_claude_haiku_4_5": "快速且低成本。适合文本清理。",- "bedrock_claude_sonnet_5": "均衡性能。推荐用作智能助手模式的默认模型。",- "bedrock_claude_opus_4_8": "最高智能。适用于复杂的智能助手模式任务。",+ "bedrock_claude_sonnet_5": "均衡性能。推荐用作助手任务的默认模型。",+ "bedrock_claude_opus_4_8": "最高智能。适用于复杂的助手任务。","bedrock_gpt_oss_120b": "OpenAI 开放权重模型。低成本下的强大推理能力。",- "bedrock_deepseek_v3_2": "开放权重前沿模型。智能助手模式的高性价比之选。",+ "bedrock_deepseek_v3_2": "开放权重前沿模型。助手任务的高性价比之选。","bedrock_qwen3_next_80b": "稀疏开放权重模型。快速且多语言。","vertex_gemini_2_5_flash": "通过 Vertex 提供的快速多模态模型","vertex_gemini_2_5_pro": "通过 Vertex 提供的高级推理模型"@@ -3586,7 +3587,7 @@},"cli": {"title": "命令行访问",- "description": "让你的智能助手通过终端访问你的笔记。",+ "description": "让你的助手通过终端访问你的笔记。","installLabel": "安装","learnMore": "查看文档","copyDocsLink": "复制文档链接",diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 1827327a1..b1ead5a58 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -164,6 +164,7 @@"add": "新增","retry": "重試","back": "返回",+ "logout": "登出","next": "下一步","complete": "完成","reset": "重設",@@ -200,7 +201,7 @@"done": "完成","skip": "略過","policyAiProcessingRestricted": "AI 處理已被您的組織限制。",- "policyAgentRestricted": "AI 代理的使用已被您的組織限制。",+ "policyAgentRestricted": "AI 助理的使用已被您的組織限制。","policyTranscriptionRestricted": "轉錄已被您的組織限制。","managedConfigLoading": "正在檢查您組織的託管設定。請稍候再試。","managedConfigUnavailable": "託管企業存取無法使用。請重新登入或聯絡管理員。",@@ -213,8 +214,8 @@"microphoneDescription": "將語音轉換為文字。","accessibilityDescription": "將文字貼到目前的 App。","systemAudioTitle": "系統音訊",- "systemAudioDescription": "擷取其他 App 的音訊。",- "screenContextDescription": "讓語音助理查看目前螢幕,絕不儲存。",+ "systemAudioDescription": "在會議筆記中擷取音訊時必需。",+ "screenContextDescription": "與語音助理分享螢幕內容。","enable": "啟用","enabled": "已啟用"},@@ -239,6 +240,7 @@"hotkey": {"capture": "請按下你想使用的按鍵","chooseAnother": "選擇其他快速鍵",+ "confirmAgain": "再次按下 {{hotkey}} 以確認","inUse": "此快速鍵已被使用。請選擇其他快速鍵。","holding": "繼續按住,或按下另一個鍵"},@@ -411,7 +413,6 @@"descriptionLineOne": "選擇你想在裝置上","descriptionLineTwo": "執行的模型。","providerLabel": "服務商",- "agent": "代理程式","download": "下載","downloadingShort": "下載中","selected": "已選擇",@@ -420,7 +421,7 @@"cancelDownload": "取消下載 {{model}}","downloads": "模型下載","downloading": "正在下載… {{progress}}%",- "installing": "正在安裝模型…"+ "installing": "安裝中"}},"steps": {@@ -1101,12 +1102,12 @@"welcomeBack": "歡迎回來"},"signedIn": {- "ready": "準備就緒",- "welcomeBack": "歡迎回來",- "welcomeBackName": "歡迎回來,{{name}}"+ "welcomeBack": "歡迎回來"},"sso": {"continueWithSSO": "使用 SSO 登入",+ "workEmailLabel": "工作電子郵件",+ "emailPlaceholder": "新增您的電子郵件","emailRequired": "輸入您的工作電子郵件以使用 SSO。","failed": "單一登入失敗,請再試一次。","companySignInTitle": "使用公司登入",@@ -1609,7 +1610,7 @@"features": ["無限會議錄製","工作區角色與成員管理",- "代理模式",+ "助理模式","與您的資料對話","優先支援"],@@ -2540,7 +2541,7 @@"openai_gpt_4_1_mini": "較小的 GPT-4.1 模型","openai_gpt_4_1_nano": "最低延遲的 GPT-4.1","anthropic_claude_fable_5": "Anthropic 最強大的模型,Mythos 級",- "anthropic_claude_sonnet_5": "快速且強大的智慧代理模型,成本更低",+ "anthropic_claude_sonnet_5": "快速且強大的助理模型,成本更低","anthropic_claude_sonnet_4_6": "均衡表現","anthropic_claude_sonnet_4_5": "上一代 Sonnet 模型","anthropic_claude_haiku_4_5": "快速且接近頂尖智慧",@@ -2575,12 +2576,12 @@"corti_corti_s1_mini": "精簡型臨床模型,半價提供推理"},"enterprise": {- "bedrock_claude_fable_5": "最強大的 Claude 模型。最適合最具挑戰性的智慧助手模式任務。",+ "bedrock_claude_fable_5": "最強大的 Claude 模型。最適合最具挑戰性的助理任務。","bedrock_claude_haiku_4_5": "快速且低成本。適合文字清理。",- "bedrock_claude_sonnet_5": "均衡效能。建議作為智慧助手模式的預設模型。",- "bedrock_claude_opus_4_8": "最高智能。適用於複雜的智慧助手模式任務。",+ "bedrock_claude_sonnet_5": "均衡效能。建議作為助理任務的預設模型。",+ "bedrock_claude_opus_4_8": "最高智能。適用於複雜的助理任務。","bedrock_gpt_oss_120b": "OpenAI 開放權重模型。低成本下的強大推理能力。",- "bedrock_deepseek_v3_2": "開放權重前沿模型。智慧助手模式的高性價比之選。",+ "bedrock_deepseek_v3_2": "開放權重前沿模型。助理任務的高性價比之選。","bedrock_qwen3_next_80b": "稀疏開放權重模型。快速且多語言。","vertex_gemini_2_5_flash": "透過 Vertex 提供的快速多模態模型","vertex_gemini_2_5_pro": "透過 Vertex 提供的進階推理模型"@@ -3401,7 +3402,7 @@},"dictationAgent": {"enabled": "啟用語音助理",- "enabledDescription": "向你的代理口述指令。選取的文字會傳送到所設定的模型並就地編輯。說出 \"{{agentName}}\" 即可啟用。",+ "enabledDescription": "向你的助理口述指令。選取的文字會傳送到所設定的模型並就地編輯。說出 \"{{agentName}}\" 即可啟用。","screenContext": {"title": "螢幕內容","description": "在語音助理指令中附上目前螢幕的截圖。",@@ -3416,7 +3417,7 @@},"modes": {"openwhispr": "OpenWhispr Cloud",- "openwhisprDesc": "使用 OpenWhispr 託管的代理,無需 API Key。",+ "openwhisprDesc": "使用 OpenWhispr 託管的助理,無需 API Key。","providers": "使用你自己的 API Key","providersDesc": "用你自己的 API Key 連接 OpenAI、Anthropic、Gemini 或 Groq。","local": "本機",@@ -3427,14 +3428,14 @@"enterpriseDesc": "使用 AWS Bedrock、Azure OpenAI 或 Google Vertex。"},"prompt": {- "title": "代理提示詞",+ "title": "助理提示詞","description": "偵測到喚醒詞時使用的系統提示詞。若未設定則使用內建預設值。"}},"agentMode": {"settings": {"systemPrompt": "系統提示詞",- "systemPromptDescription": "助手的自訂指令",+ "systemPromptDescription": "助理的自訂指令","systemPromptPlaceholder": "輸入自訂系統提示詞...","modes": {"openwhispr": "OpenWhispr Cloud",@@ -3586,7 +3587,7 @@},"cli": {"title": "命令列存取",- "description": "讓你的智慧助手透過終端機存取你的筆記。",+ "description": "讓你的助理透過終端機存取你的筆記。","installLabel": "安裝","learnMore": "查看文件","copyDocsLink": "複製文件連結",diff --git a/src/utils/hotkeyValidator.ts b/src/utils/hotkeyValidator.tsindex 4e363b438..aa008c0a8 100644--- a/src/utils/hotkeyValidator.ts+++ b/src/utils/hotkeyValidator.ts@@ -291,29 +291,6 @@ const LINUX_RESERVED_SHORTCUTS = ["Super+PrintScreen",] as const;-const MAC_RECOMMENDED = [- "Fn",- "Ctrl + Option",- "Option + Cmd",- "Right Cmd or Right Option",- "Modifier + unused key (e.g., Ctrl + Page Up)",-] as const;--const WINDOWS_RECOMMENDED = [- "Ctrl + Win",- "Ctrl + Alt",- "Ctrl (right) or Alt (right)",- "Modifier + rarely used key (e.g., Ctrl + Page Up)",-] as const;--const LINUX_RECOMMENDED = [- "Ctrl + Super",- "Ctrl + Shift + Super",- "Super + Shift",- "Ctrl (right) or Alt (right)",- "Modifier + rarely used key (e.g., Ctrl + Page Up or Ctrl + Scroll Lock)",-] as const;-const MAC_EXAMPLES = ["Control+Shift+K","Alt+F7",@@ -534,19 +511,6 @@ export function getReservedShortcuts(platform: Platform): readonly string[] {}}-export function getRecommendedPatterns(platform: Platform): readonly string[] {- switch (platform) {- case "darwin":- return MAC_RECOMMENDED;- case "win32":- return WINDOWS_RECOMMENDED;- case "linux":- return LINUX_RECOMMENDED;- default:- return [];- }-}-export function getValidExamples(platform: Platform): readonly string[] {switch (platform) {case "darwin":diff --git a/test/components/authenticationStep.test.js b/test/components/authenticationStep.test.jsindex e3ed9ccb2..65a41f1b2 100644--- a/test/components/authenticationStep.test.js+++ b/test/components/authenticationStep.test.js@@ -2,23 +2,30 @@ const assert = require("node:assert/strict");const test = require("node:test");const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");-const AUTH_MODE_INDEX = 0;-const EMAIL_INDEX = 1;-const PASSWORD_INDEX = 2;-const FULL_NAME_INDEX = 3;-const SSO_DISCOVERY_INDEX = 8;-const ERROR_INDEX = 9;--function createHarness(values = {}) {+const EMPTY_AUTH_DRAFT = {+ authMode: null,+ email: "",+ fullName: "",+ ssoDiscovery: null,+ pendingVerificationEmail: null,+};++function createHarness() {return {cursor: 0,refCursor: 0,- values,+ values: {},refs: {},+ effects: [],+ cleanups: [],+ debouncedCalls: 0,+ pendingDebounced: null,discoveryCalls: [],+ ssoCalls: [],discoveryResult: { exists: false },discoveryError: null,signupResult: {},+ ssoResult: {},portalContainers: [],};}@@ -36,11 +43,36 @@ function findElement(node, predicate) {return findElement(node.props?.children, predicate);}+function textContent(node) {+ if (Array.isArray(node)) return node.map(textContent).join("");+ if (typeof node === "string") return node;+ if (!node || typeof node !== "object") return "";+ return textContent(node.props?.children);+}++const isInput = (node) => node.type?.name === "Input";+const inputByPlaceholder = (tree, placeholder) =>+ findElement(tree, (node) => isInput(node) && node.props?.placeholder === placeholder);+// Sign-in shows the address back instead of asking for a name, so a read-only+// field is how "this is the password step for a known account" reads.+const readOnlyEmailField = (tree) =>+ findElement(tree, (node) => isInput(node) && node.props?.readOnly === true);+const passwordField = (tree) =>+ findElement(tree, (node) => isInput(node) && node.props?.type === "password");+const providerTile = (tree, label) =>+ findElement(+ tree,+ (node) =>+ node.type?.name === "ProviderTile" && (label === undefined || node.props?.label === label)+ );+const buttonLabelled = (tree, label) =>+ findElement(tree, (node) => node.type?.name === "Button" && textContent(node) === label);+async function settleAsyncHandler() {await new Promise((resolve) => setImmediate(resolve));}-test("email authentication discovers accounts before choosing sign-in or sign-up", async (t) => {+test("email authentication discovers accounts, restores drafts, and persists them once per pause", async (t) => {installBrowserGlobals(t, { window: { electronAPI: {} } });// The compact Back control is portalled to body (it has to out-stack the// onboarding shell's drag band), so rendering reads document.body.@@ -56,27 +88,32 @@ test("email authentication discovers accounts before choosing sign-in or sign-upcachePrefix: "openwhispr-authentication-step-",noExternal: ["react", "react-dom", "react-i18next", "lucide-react"],mockModules: {+ // A minimal renderer rather than react-dom: it returns the element tree so+ // the assertions can read rendered output, and it collects effects so the+ // render helper can run them. Nothing here is keyed on hook call order.react: `export default {};export function useState(initialValue) {const harness = globalThis.__authenticationStepHarness;- const index = harness.cursor++;- if (!(index in harness.values)) {- harness.values[index] = typeof initialValue === "function" ? initialValue() : initialValue;+ const slot = harness.cursor++;+ if (!(slot in harness.values)) {+ harness.values[slot] = typeof initialValue === "function" ? initialValue() : initialValue;}- return [harness.values[index], (nextValue) => {- harness.values[index] = typeof nextValue === "function"- ? nextValue(harness.values[index])+ return [harness.values[slot], (nextValue) => {+ harness.values[slot] = typeof nextValue === "function"+ ? nextValue(harness.values[slot]): nextValue;}];}export function useCallback(callback) { return callback; }- export function useEffect() {}+ export function useEffect(effect) {+ globalThis.__authenticationStepHarness.effects.push(effect);+ }export function useRef(initialValue) {const harness = globalThis.__authenticationStepHarness;- const index = harness.refCursor++;- if (!(index in harness.refs)) harness.refs[index] = { current: initialValue };- return harness.refs[index];+ const slot = harness.refCursor++;+ if (!(slot in harness.refs)) harness.refs[slot] = { current: initialValue };+ return harness.refs[slot];}`,"/jsx-dev-runtime": `@@ -85,7 +122,16 @@ test("email authentication discovers accounts before choosing sign-in or sign-up`,"react-i18next": `export function useTranslation() {- return { t(key) { return key; } };+ return { t(key, options) { return options ? key + ":" + JSON.stringify(options) : key; } };+ }+ `,+ // Records the pending write instead of firing it, so the test can tell a+ // scheduled draft apart from a persisted one.+ "/hooks/useDebouncedCallback": `+ export function useDebouncedCallback(callback) {+ const harness = globalThis.__authenticationStepHarness;+ harness.pendingDebounced = callback;+ return () => { harness.debouncedCalls += 1; };}`,"/hooks/useAuth": `@@ -106,7 +152,11 @@ test("email authentication discovers accounts before choosing sign-in or sign-upsignIn: { async email() { return {}; } },};export async function signInWithSocial() { return {}; }- export async function signInWithSSO() { return {}; }+ export async function signInWithSSO(email) {+ const harness = globalThis.__authenticationStepHarness;+ harness.ssoCalls.push(email);+ return harness.ssoResult;+ }export function updateLastSignInTime() {}`,"/lib/emailAuthDiscovery": `@@ -145,70 +195,136 @@ test("email authentication discovers accounts before choosing sign-in or sign-up);const props = { onAuthComplete() {}, onNeedsVerification() {} };- const render = (harness) => {+ const render = (harness, overrides = {}) => {globalThis.__authenticationStepHarness = harness;harness.cursor = 0;harness.refCursor = 0;- return AuthenticationStep(props);+ harness.effects = [];+ const tree = AuthenticationStep({ ...props, ...overrides });+ // Running the collected effects is what makes the draft ref, the scheduled+ // write and the unmount flush observable.+ harness.cleanups = harness.effects+ .map((effect) => effect())+ .filter((cleanup) => typeof cleanup === "function");+ return tree;+ };+ const typeEmail = (harness, address, overrides) => {+ const tree = render(harness, overrides);+ const field = inputByPlaceholder(tree, "auth.emailStep.emailPlaceholder");+ assert.ok(field, "the welcome view should offer an email field");+ field.props.onChange({ target: { value: address } });+ return tree;};- const submitEmail = async (harness) => {- const form = findElement(render(harness), (node) => node.type === "form");+ const submitEmail = async (harness, address, overrides) => {+ typeEmail(harness, address, overrides);+ const form = findElement(render(harness, overrides), (node) => node.type === "form");assert.ok(form, "email form should render");form.props.onSubmit({ preventDefault() {} });await settleAsyncHandler();+ return render(harness, overrides);};- const backPortal = createHarness({ [AUTH_MODE_INDEX]: "sign-in" });- render(backPortal);- assert.deepEqual(- backPortal.portalContainers,- [globalThis.document.body],- "the compact Back must be portalled to document.body so the shell's drag band cannot swallow it"- );-- const existingAccount = createHarness({ [EMAIL_INDEX]: "[email protected]" });+ const existingAccount = createHarness();existingAccount.discoveryResult = { exists: true };- await submitEmail(existingAccount);- assert.equal(existingAccount.values[AUTH_MODE_INDEX], "sign-in");+ const signIn = await submitEmail(existingAccount, "[email protected]");+ assert.equal(readOnlyEmailField(signIn)?.props.value, "[email protected]");+ assert.ok(passwordField(signIn), "a known account goes straight to the password step");+ assert.match(textContent(signIn), /auth\.passwordForm\.signIn/);+ assert.match(textContent(signIn), /auth\.passwordForm\.forgotPassword/);+ assert.ok(existingAccount.portalContainers.length > 0, "the compact Back should be portalled");+ assert.ok(+ existingAccount.portalContainers.every((container) => container === globalThis.document.body),+ "the compact Back must escape the shell's drag band through document.body"+ );assert.deepEqual(existingAccount.discoveryCalls, [{ email: "[email protected]", authUrl: "https://auth.example.test" },]);- const newAccount = createHarness({ [EMAIL_INDEX]: "[email protected]" });- await submitEmail(newAccount);- assert.equal(newAccount.values[AUTH_MODE_INDEX], "sign-up");+ const newAccount = createHarness();+ const signUp = await submitEmail(newAccount, "[email protected]");+ assert.ok(+ inputByPlaceholder(signUp, "auth.passwordForm.fullNamePlaceholder"),+ "an unknown address asks for a name"+ );+ assert.match(textContent(signUp), /auth\.passwordForm\.createAccountButton/);- const missingEndpoint = createHarness({ [EMAIL_INDEX]: "[email protected]" });+ // A self-hosted deployment without the discovery endpoint still gets sign-up,+ // and no error for the missing endpoint.+ const missingEndpoint = createHarness();missingEndpoint.discoveryResult = null;- await submitEmail(missingEndpoint);- assert.equal(missingEndpoint.values[AUTH_MODE_INDEX], "sign-up");- assert.equal(missingEndpoint.values[ERROR_INDEX], null);+ const selfHosted = await submitEmail(missingEndpoint, "[email protected]");+ assert.ok(inputByPlaceholder(selfHosted, "auth.passwordForm.fullNamePlaceholder"));+ assert.doesNotMatch(textContent(selfHosted), /auth\.errors\./);- const unavailableDiscovery = createHarness({ [EMAIL_INDEX]: "[email protected]" });+ const unavailableDiscovery = createHarness();unavailableDiscovery.discoveryError = new Error("offline");- await submitEmail(unavailableDiscovery);- assert.equal(unavailableDiscovery.values[AUTH_MODE_INDEX], null);- assert.equal(unavailableDiscovery.values[ERROR_INDEX], "auth.errors.failedUserCheck");+ const offline = await submitEmail(unavailableDiscovery, "[email protected]");+ assert.ok(providerTile(offline), "an unreachable check must not advance the flow");+ assert.match(textContent(offline), /auth\.errors\.failedUserCheck/);- const ssoAccount = createHarness({ [EMAIL_INDEX]: "[email protected]" });+ const ssoAccount = createHarness();ssoAccount.discoveryResult = {exists: true,sso: { available: true, required: false, domain: "example.com" },};- await submitEmail(ssoAccount);- assert.equal(ssoAccount.values[AUTH_MODE_INDEX], null);- assert.deepEqual(ssoAccount.values[SSO_DISCOVERY_INDEX], {- exists: true,- required: false,- domain: "example.com",+ const company = await submitEmail(ssoAccount, "[email protected]");+ assert.match(textContent(company), /auth\.sso\.companySignInTitle/);+ assert.match(textContent(company), /auth\.sso\.availableDescription:\{"domain":"example\.com"\}/);+ const useEmailInstead = buttonLabelled(company, "auth.sso.useEmailInstead");+ assert.ok(useEmailInstead, "an optional SSO domain keeps the password route open");+ useEmailInstead.props.onClick();+ assert.ok(+ readOnlyEmailField(render(ssoAccount)),+ "leaving SSO for an existing account lands on sign-in"+ );++ const directSso = createHarness();+ const ssoTile = providerTile(typeEmail(directSso, "[email protected]"), "SSO");+ assert.ok(ssoTile, "SSO provider tile should render");+ ssoTile.props.onClick();+ const ssoScreen = render(directSso);+ assert.match(textContent(ssoScreen), /auth\.sso\.workEmailLabel/);+ const ssoForm = findElement(ssoScreen, (node) => node.type === "form");+ assert.ok(ssoForm, "SSO work-email form should render after choosing SSO");+ ssoForm.props.onSubmit({ preventDefault() {} });+ await settleAsyncHandler();+ assert.deepEqual(directSso.ssoCalls, ["[email protected]"]);++ // A resumed draft restores the identity fields only. The SSO work-email screen+ // is transient, so a returning user lands back on the provider choices.+ const resumedWelcome = createHarness();+ const resumedTree = render(resumedWelcome, {+ resumeState: { ...EMPTY_AUTH_DRAFT, email: "[email protected]", fullName: "Resume User" },+ });+ assert.equal(+ inputByPlaceholder(resumedTree, "auth.emailStep.emailPlaceholder").props.value,+ );+ assert.ok(+ providerTile(resumedTree),+ "a resumed draft should reopen the provider choices, not the SSO email step"+ );++ const resumedSignUp = createHarness();+ const resumedSignUpTree = render(resumedSignUp, {+ resumeState: {+ ...EMPTY_AUTH_DRAFT,+ authMode: "sign-up",+ email: "[email protected]",+ fullName: "Resume User",+ },});+ assert.equal(+ inputByPlaceholder(resumedSignUpTree, "auth.passwordForm.fullNamePlaceholder").props.value,+ "Resume User"+ );- const duplicateRace = createHarness({- [AUTH_MODE_INDEX]: "sign-up",- [EMAIL_INDEX]: "[email protected]",- [PASSWORD_INDEX]: "password123",- [FULL_NAME_INDEX]: "Returning User",+ const duplicateRace = createHarness();+ const raceSignUp = await submitEmail(duplicateRace, "[email protected]");+ inputByPlaceholder(raceSignUp, "auth.passwordForm.fullNamePlaceholder").props.onChange({+ target: { value: "Returning User" },});+ passwordField(render(duplicateRace)).props.onChange({ target: { value: "password123" } });duplicateRace.signupResult = {error: {code: "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL",@@ -218,7 +334,42 @@ test("email authentication discovers accounts before choosing sign-in or sign-upconst signupForm = findElement(render(duplicateRace), (node) => node.type === "form");assert.ok(signupForm, "sign-up form should render");await signupForm.props.onSubmit({ preventDefault() {} });- assert.equal(duplicateRace.values[AUTH_MODE_INDEX], "sign-in");- assert.equal(duplicateRace.values[PASSWORD_INDEX], "");- assert.equal(duplicateRace.values[ERROR_INDEX], "auth.errors.accountExistsSignIn");+ const afterRace = render(duplicateRace);+ assert.ok(readOnlyEmailField(afterRace), "a duplicate account switches to sign-in");+ assert.equal(passwordField(afterRace).props.value, "", "the password is cleared for the retry");+ assert.match(textContent(afterRace), /auth\.errors\.accountExistsSignIn/);++ // The resume draft is written once per typing pause, never per keystroke, and+ // carries only the fields this step owns.+ const drafting = createHarness();+ const draftWrites = [];+ const draftProps = {+ resumeState: EMPTY_AUTH_DRAFT,+ onResumeStateChange: (patch) => draftWrites.push(patch),+ };+ typeEmail(drafting, "[email protected]", draftProps);+ render(drafting, draftProps);+ assert.deepEqual(draftWrites, [], "typing must not persist per keystroke");+ assert.ok(drafting.debouncedCalls >= 2, "every change schedules the debounced write");+ drafting.pendingDebounced();+ assert.deepEqual(draftWrites, [+ { authMode: null, email: "[email protected]", fullName: "", ssoDiscovery: null },+ ]);++ // Sign-up unmounts this step on its way to verification, so the flush has to+ // cover the write the debounce still had pending.+ const abandoned = createHarness();+ const flushedWrites = [];+ const flushProps = {+ resumeState: EMPTY_AUTH_DRAFT,+ onResumeStateChange: (patch) => flushedWrites.push(patch),+ };+ typeEmail(abandoned, "[email protected]", flushProps);+ render(abandoned, flushProps);+ assert.deepEqual(flushedWrites, []);+ assert.ok(abandoned.cleanups.length > 0, "the flush effect should register a cleanup");+ abandoned.cleanups.forEach((cleanup) => cleanup());+ assert.deepEqual(flushedWrites, [+ { authMode: null, email: "[email protected]", fullName: "", ssoDiscovery: null },+ ]);});diff --git a/test/components/byokResumeDraft.test.js b/test/components/byokResumeDraft.test.jsnew file mode 100644index 000000000..dbfba82a7--- /dev/null+++ b/test/components/byokResumeDraft.test.js@@ -0,0 +1,105 @@+const assert = require("node:assert/strict");+const test = require("node:test");+const React = require("react");+const { createRoot } = require("react-dom/client");+const {+ createRendererServer,+ installBrowserGlobals,+ installHookDom,+} = require("../lib/rendererTestHarness");++// The onboarding session is plain-text localStorage, while every one of these is a+// safeStorage secret. Named literally so a leak shows up as the value, not just as+// an unexpected key.+const SECRETS = {+ openaiApiKey: "sk-leaked-openai-key",+ cortiClientId: "leaked-corti-client-id",+ cortiClientSecret: "leaked-corti-client-secret",+ customTranscriptionApiKey: "leaked-custom-transcription-key",+ chatAgentCustomApiKey: "leaked-chat-agent-key",+};++const ALLOWED_DRAFT_KEYS = ["baseUrl", "customModel", "selectedModel", "selectedProvider"];++async function collectByokDrafts(t, { stepId, selfHostedRequested, resumeState }) {+ installBrowserGlobals(t, {+ window: { electronAPI: { getPlatform: () => "linux" } },+ });+ const container = installHookDom(t);+ const vite = await createRendererServer(t, {+ cachePrefix: "openwhispr-byok-resume-draft-",+ noExternal: ["react-i18next"],+ mockModules: {+ "react-i18next": `+ const t = (key) => key;+ export function useTranslation() { return { t }; }+ export const initReactI18next = { type: "3rdParty", init() {} };+ `,+ "/ProviderConnectionTest": `export default function ProviderConnectionTest() { return null; }`,+ "/OnboardingShell": `export function BrandMark() { return null; }`,+ "/ui/ProviderIcon": `export function ProviderIcon() { return null; }`,+ },+ });+ const { useSettingsStore } = await vite.ssrLoadModule("/stores/settingsStore.ts");+ useSettingsStore.setState(SECRETS);+ const { ByokProviderStep } = await vite.ssrLoadModule(+ "/components/onboarding/ProviderSetupStep.tsx"+ );++ const drafts = [];+ function Harness() {+ // Execute the real component and hooks with React lifecycle, while leaving+ // native controls unmounted: the persisted draft is the test boundary.+ ByokProviderStep({+ stepId,+ selfHostedRequested,+ resumeState,+ onSelfHostedChange() {},+ onConnectionChange() {},+ onProceed() {},+ onResumeStateChange: (draft) => drafts.push(draft),+ });+ return null;+ }+ const root = createRoot(container);+ await React.act(async () => {+ root.render(React.createElement(Harness));+ });+ // The typed fields are debounced, and unmounting flushes the pending write — the+ // same path the step takes when onboarding advances past it.+ await React.act(async () => root.unmount());+ return drafts;+}++// Each case has to actually load a credential or the value assertions guard+// nothing: the step only seeds the one its step and mode select. A hosted step+// with no resumed provider opens on none, leaving every credential state empty.+for (const [name, options] of [+ [+ "a hosted provider",+ {+ stepId: "byok-dictation",+ selfHostedRequested: false,+ resumeState: { selectedProvider: "openai", selectedModel: "", baseUrl: "", customModel: "" },+ },+ ],+ ["a self-hosted transcription endpoint", { stepId: "byok-dictation", selfHostedRequested: true }],+ ["a self-hosted assistant endpoint", { stepId: "byok-assistant", selfHostedRequested: true }],+]) {+ test(`the resume draft for ${name} carries no credential`, async (t) => {+ const drafts = await collectByokDrafts(t, options);++ assert.ok(drafts.length > 0, "the step persists a draft so the session can restore it");+ for (const draft of drafts) {+ assert.deepEqual(+ Object.keys(draft).sort(),+ ALLOWED_DRAFT_KEYS,+ "a draft may only carry the four fields the session schema declares"+ );+ const serialized = JSON.stringify(draft);+ for (const [field, secret] of Object.entries(SECRETS)) {+ assert.doesNotMatch(serialized, new RegExp(secret), `${field} reached the draft`);+ }+ }+ });+}diff --git a/test/components/compactAuthenticationFlow.test.js b/test/components/compactAuthenticationFlow.test.jsindex 8f9428bc7..94afd31c7 100644--- a/test/components/compactAuthenticationFlow.test.js+++ b/test/components/compactAuthenticationFlow.test.js@@ -65,7 +65,7 @@ test("returning-user authentication renders the complete compact onboarding surf});test("verification success completes auth and backing out signs out before returning", async (t) => {- globalThis.__compactAuthTestState = { pendingEmail: null, signOutCount: 0 };+ globalThis.__compactAuthTestState = { cursor: 0, slots: {}, signOutCount: 0 };t.after(() => {delete globalThis.__compactAuthTestState;});@@ -75,9 +75,16 @@ test("verification success completes auth and backing out signs out before returnoExternal: ["react"],mockModules: {react: `- export function useState() {+ export function useState(initialValue) {const state = globalThis.__compactAuthTestState;- return [state.pendingEmail, (value) => { state.pendingEmail = value; }];+ const index = state.cursor++;+ if (!(index in state.slots)) {+ state.slots[index] =+ typeof initialValue === "function" ? initialValue() : initialValue;+ }+ return [state.slots[index], (value) => {+ state.slots[index] = typeof value === "function" ? value(state.slots[index]) : value;+ }];}`,"/jsx-dev-runtime": `@@ -107,24 +114,143 @@ test("verification success completes auth and backing out signs out before retur},onContinueWithoutAccount: noop,};+ const render = () => {+ globalThis.__compactAuthTestState.cursor = 0;+ return CompactAuthenticationFlow(props);+ };- const authStep = CompactAuthenticationFlow(props);+ const authStep = render();assert.equal(authStep.type.name, "AuthenticationStep");assert.equal(authStep.props.onAuthComplete, props.onAuthComplete);assert.equal(authStep.props.onContinueWithoutAccount, props.onContinueWithoutAccount);authStep.props.onNeedsVerification("[email protected]");- const verificationStep = CompactAuthenticationFlow(props);+ const verificationStep = render();assert.equal(verificationStep.type.name, "EmailVerificationStep");assert.equal(verificationStep.props.email, "[email protected]");verificationStep.props.onBack();await Promise.resolve();assert.equal(globalThis.__compactAuthTestState.signOutCount, 1);- assert.equal(CompactAuthenticationFlow(props).type.name, "AuthenticationStep");+ assert.equal(render().type.name, "AuthenticationStep");authStep.props.onNeedsVerification("[email protected]");- CompactAuthenticationFlow(props).props.onVerified();+ render().props.onVerified();assert.equal(authCompleteCount, 1);- assert.equal(CompactAuthenticationFlow(props).type.name, "AuthenticationStep");+ assert.equal(render().type.name, "AuthenticationStep");+});++test("a restored verification screen offers its recovery actions immediately", async (t) => {+ const vite = await createRendererServer(t, {+ cachePrefix: "openwhispr-email-verification-resumed-",+ noExternal: ["react-i18next"],+ mockModules: {+ "react-i18next": `+ export function useTranslation() {+ return { t(key) { return key; } };+ }+ `,+ "/config/constants": `export const OPENWHISPR_API_URL = "";`,+ "/lib/auth": `export const authClient = { getSession: async () => ({}) };`,+ "/onboarding/OnboardingShell": `+ export function CompactOnboardingFrame({ children }) { return children; }+ `,+ },+ });+ const { default: EmailVerificationStep } = await vite.ssrLoadModule(+ "/components/EmailVerificationStep.tsx"+ );+ const render = (props) =>+ renderToStaticMarkup(+ React.createElement(EmailVerificationStep, {+ email: "[email protected]",+ onVerified: noop,+ onBack: noop,+ ...props,+ })+ );++ // Signing up sends the mail this mount is waiting on, so the resend stays rate+ // limited and the row is held back while it is guaranteed to be useless.+ const justSent = render();+ assert.doesNotMatch(justSent, /emailVerification\.backToSignIn/);++ // A relaunch sends nothing. Holding the row back there strands the user with no+ // resend, no way back to sign-in and no shell footer until the timer expires.+ const restored = render({ resumed: true });+ assert.match(restored, /emailVerification\.backToSignIn/);+ assert.match(restored, /emailVerification\.resendButton/);+});++test("only an address restored from a saved session opens verification as resumed", async (t) => {+ globalThis.__compactAuthResumeState = { cursor: 0, values: {}, drafts: [] };+ t.after(() => {+ delete globalThis.__compactAuthResumeState;+ });++ const vite = await createRendererServer(t, {+ cachePrefix: "openwhispr-compact-authentication-resume-",+ noExternal: ["react"],+ mockModules: {+ react: `+ export function useState(initialValue) {+ const harness = globalThis.__compactAuthResumeState;+ const index = harness.cursor++;+ if (!(index in harness.values)) {+ harness.values[index] =+ typeof initialValue === "function" ? initialValue() : initialValue;+ }+ return [harness.values[index], (nextValue) => {+ harness.values[index] =+ typeof nextValue === "function" ? nextValue(harness.values[index]) : nextValue;+ }];+ }+ `,+ "/jsx-dev-runtime": `+ export const Fragment = Symbol.for("react.fragment");+ export function jsxDEV(type, props, key) { return { type, props, key }; }+ `,+ "/AuthenticationStep": `export default function AuthenticationStep() { return null; }`,+ "/EmailVerificationStep": `export default function EmailVerificationStep() { return null; }`,+ "/lib/auth": `export async function signOut() {}`,+ },+ });+ const { CompactAuthenticationFlow } = await vite.ssrLoadModule(+ "/components/CompactAuthenticationFlow.tsx"+ );+ const harness = globalThis.__compactAuthResumeState;+ const renderFlow = (props) => {+ harness.cursor = 0;+ return CompactAuthenticationFlow({+ onAuthComplete: noop,+ onContinueWithoutAccount: noop,+ onResumeStateChange: (patch) => harness.drafts.push(patch),+ ...props,+ });+ };++ const restored = renderFlow({ resumeState: { pendingVerificationEmail: "[email protected]" } });+ assert.equal(restored.type.name, "EmailVerificationStep");+ assert.equal(restored.props.email, "[email protected]");+ assert.equal(restored.props.resumed, true);++ // Backing out and signing up again does send a fresh mail, so the cooldown has+ // to come back. Continues from the restored state above on purpose: rebuilding+ // the harness here would re-seed the flag and prove nothing.+ restored.props.onBack();+ await new Promise((resolve) => setImmediate(resolve));+ const afterBack = renderFlow({ resumeState: { pendingVerificationEmail: "[email protected]" } });+ assert.equal(afterBack.type.name, "AuthenticationStep");+ // The button says "Back to sign in", and the draft still holds the sign-up mode+ // that opened verification — leaving it there reopens the create-account form for+ // the address just registered, which only fails with USER_ALREADY_EXISTS.+ assert.deepEqual(harness.drafts, [{ pendingVerificationEmail: null, authMode: "sign-in" }]);++ afterBack.props.onNeedsVerification("[email protected]");+ const resent = renderFlow({ resumeState: { pendingVerificationEmail: "[email protected]" } });+ assert.equal(resent.type.name, "EmailVerificationStep");+ assert.equal(resent.props.email, "[email protected]");+ assert.equal(resent.props.resumed, false);+ // The address has to reach the session, or the next launch cannot restore it.+ assert.deepEqual(harness.drafts.at(-1), { pendingVerificationEmail: "[email protected]" });});diff --git a/test/components/hotkeyCapturePolicy.test.js b/test/components/hotkeyCapturePolicy.test.jsnew file mode 100644index 000000000..0886245b9--- /dev/null+++ b/test/components/hotkeyCapturePolicy.test.js@@ -0,0 +1,34 @@+const assert = require("node:assert/strict");+const test = require("node:test");++const load = () => import("../../src/components/ui/hotkeyCapturePolicy.ts");++test("right-side modifiers are captured on a quick release", async () => {+ const { shouldAcceptModifierOnlyCapture } = await load();++ assert.equal(shouldAcceptModifierOnlyCapture("RightOption", 0), true);+ assert.equal(shouldAcceptModifierOnlyCapture("RightControl", 50), true);+});++test("other modifier-only shortcuts retain the hold threshold", async () => {+ const { MODIFIER_ONLY_HOLD_THRESHOLD_MS, shouldAcceptModifierOnlyCapture } = await load();++ assert.equal(+ shouldAcceptModifierOnlyCapture("Control+Alt", MODIFIER_ONLY_HOLD_THRESHOLD_MS - 1),+ false+ );+ assert.equal(+ shouldAcceptModifierOnlyCapture("Control+Alt", MODIFIER_ONLY_HOLD_THRESHOLD_MS),+ true+ );+});++test("capture focus is restored only when no control owns page focus", async () => {+ const { shouldRestoreCaptureFocus } = await load();+ const body = {};+ const button = {};++ assert.equal(shouldRestoreCaptureFocus(null, body), true);+ assert.equal(shouldRestoreCaptureFocus(body, body), true);+ assert.equal(shouldRestoreCaptureFocus(button, body), false);+});diff --git a/test/components/localModelSetupStep.test.js b/test/components/localModelSetupStep.test.jsindex f85f8532b..50571a520 100644--- a/test/components/localModelSetupStep.test.js+++ b/test/components/localModelSetupStep.test.js@@ -31,7 +31,13 @@ function textContent(node) {async function createSetupHarness(t,- { assistant = false, provider = assistant ? "qwen" : "whisper", installed = {} } = {}+ {+ assistant = false,+ provider = assistant ? "qwen" : "whisper",+ installed = {},+ selectedModel = "",+ resumeState,+ } = {}) {let unmount = async () => {};t.after(() => unmount());@@ -106,10 +112,10 @@ async function createSetupHarness(const { useSettingsStore } = await vite.ssrLoadModule("/stores/settingsStore.ts");useSettingsStore.setState({localTranscriptionProvider: provider === "nvidia" ? "nvidia" : "whisper",- whisperModel: "",- parakeetModel: "",+ whisperModel: !assistant && provider === "whisper" ? selectedModel : "",+ parakeetModel: !assistant && provider === "nvidia" ? selectedModel : "",chatAgentProvider: assistant ? provider : "qwen",- chatAgentModel: "",+ chatAgentModel: assistant ? selectedModel : "",chatAgentMode: "local",});const { LocalModelSetupStep } = await vite.ssrLoadModule(@@ -124,6 +130,7 @@ async function createSetupHarness(let trayTree;let ready = false;let proceeded = false;+ const resumeDrafts = [];const props = {stepId: assistant ? "local-assistant" : "local-dictation",onReadinessChange: (value) => {@@ -133,12 +140,14 @@ async function createSetupHarness(proceeded = true;},onSkip() {},+ resumeState,+ onResumeStateChange: (draft) => resumeDrafts.push(draft),};function Harness() {// Execute the real component and hooks with React lifecycle, while leaving// native controls unmounted: their returned handlers are the test boundary.tree = LocalModelSetupStep(props);- trayTree = BackgroundModelDownloadTray();+ trayTree = BackgroundModelDownloadTray({ placement: "onboarding" });return null;}const root = createRoot(container);@@ -227,8 +236,14 @@ async function createSetupHarness(assert.equal(button.props.disabled, false, "Proceed is enabled");await React.act(async () => button.props.onClick());},+ skip: async () => {+ const button = actionButton("common.skip");+ assert.ok(button && !button.props.disabled, "Skip is enabled");+ await React.act(async () => button.props.onClick());+ },proceeded: () => proceeded,ready: () => ready,+ resumeDrafts: () => resumeDrafts,canProceed: () => !actionButton("onboarding.rehaul.provider.proceed").props.disabled,canSkip: () => {const button = actionButton("common.skip");@@ -368,3 +383,39 @@ test("browsing another dictation provider preserves the active pending backgrounassert.equal(setup.store.getState().localTranscriptionProvider, "whisper");assert.equal(setup.store.getState().whisperModel, "base");});++test("a resumed local-model draft overrides the previously saved model", async (t) => {+ const setup = await createSetupHarness(t, {+ assistant: true,+ installed: { llm: [FIRST_LLM, SECOND_LLM] },+ selectedModel: FIRST_LLM,+ resumeState: { provider: "qwen", modelId: SECOND_LLM },+ });++ assert.match(textContent(setup.row(SECOND_LLM)), /onboarding\.rehaul\.local\.selected/);+ assert.match(textContent(setup.row(FIRST_LLM)), /onboarding\.rehaul\.local\.use/);+ assert.equal(setup.ready(), true);+ assert.equal(setup.canProceed(), true);+});++test("Skip marks a pending model for background activation", async (t) => {+ const setup = await createSetupHarness(t, { assistant: true });+ await setup.click(FIRST_LLM, "onboarding.rehaul.local.download");+ assert.equal(setup.canSkip(), true);+ await setup.skip();+ assert.equal(localStorage.getItem("localSetupPending"), "true");+});++test("choosing a local model records it in the resume draft", async (t) => {+ const setup = await createSetupHarness(t, {+ assistant: true,+ installed: { llm: [FIRST_LLM, SECOND_LLM] },+ selectedModel: FIRST_LLM,+ });++ await setup.click(SECOND_LLM, "onboarding.rehaul.local.use");++ // Without this the pick is only in component state, so relaunching mid-setup+ // silently reverts to whatever was saved before onboarding started.+ assert.deepEqual(setup.resumeDrafts().at(-1), { provider: "qwen", modelId: SECOND_LLM });+});diff --git a/test/components/onboardingCompatibility.test.js b/test/components/onboardingCompatibility.test.jsindex bf34f176b..46d59f3d5 100644--- a/test/components/onboardingCompatibility.test.js+++ b/test/components/onboardingCompatibility.test.js@@ -27,11 +27,18 @@ async function createOnboardingRenderer(t, platform = "linux") {"onboarding-permission-microphone.webp": `export default "microphone.webp";`,"onboarding-permission-accessibility.webp": `export default "accessibility.webp";`,"onboarding-permission-system-audio.webp": `export default "system-audio.webp";`,- "onboarding-permission-screen-context.webp": `export default "screen-context.webp";`,"/utils/platform": `export function getPlatform() { return "${platform}"; }export function getCachedPlatform() { return "${platform}"; }`,+ "/stores/settingsStore": `+ export function useSettingsStore() { return {}; }+ useSettingsStore.getState = () => ({});+ `,+ "/ui/ProviderIcon": `+ import React from "react";+ export function ProviderIcon() { return React.createElement("span"); }+ `,},});}@@ -55,6 +62,16 @@ function permissions(overrides = {}) {};}+// The action row carries mt-auto, so anything rendered after it rides down on+// that auto margin and lands under the buttons — below the fold on the compact+// frame. Contextual guidance has to precede it in the DOM, and so in tab order.+function assertGuidancePrecedesActions(markup, guidance) {+ assert.ok(+ markup.indexOf(guidance) < markup.indexOf("common.continue"),+ `${guidance} should render before the action row`+ );+}+const systemAudio = {granted: false,mode: "portal",@@ -112,6 +129,7 @@ test("a denied microphone exposes the existing Linux settings recovery", async (assert.match(markup, /Microphone blocked by the OS/);assert.match(markup, />hooks.permissions.warning.soundLabel<\/button>/);+ assertGuidancePrecedesActions(markup, "Microphone blocked by the OS");});test("Linux onboarding shows paste-tool installation and recheck guidance", async (t) => {@@ -141,6 +159,48 @@ test("Linux onboarding shows paste-tool installation and recheck guidance", asynassert.match(markup, /sudo apt install xdotool/);assert.match(markup, />pasteToolsInfo.recheck<\/button>/);+ assertGuidancePrecedesActions(markup, "sudo apt install xdotool");+});++test("permissions replaces Back with Logout, keeps Continue at the bottom, and gates it on microphone access", async (t) => {+ const vite = await createOnboardingRenderer(t, "darwin");+ const { default: CompactPermissionsStep } = await vite.ssrLoadModule(+ "/components/onboarding/CompactPermissionsStep.tsx"+ );++ const render = (micPermissionGranted, onLogout) =>+ renderToStaticMarkup(+ React.createElement(CompactPermissionsStep, {+ permissions: permissions({ micPermissionGranted }),+ systemAudio,+ screenContext,+ onLogout,+ onContinue: noop,+ })+ );++ const blocked = render(false, asyncNoop);+ assert.doesNotMatch(blocked, />common\.back<\/button>/);+ assert.ok(+ blocked.indexOf("common.logout") < blocked.indexOf("common.continue"),+ "Logout takes the place Back had, ahead of Continue"+ );+ // Continue is part of the step now rather than an overlay above it, so it+ // follows the permission rows in the DOM, and so in tab order.+ assert.ok(+ blocked.indexOf("onboarding.permissions.microphoneTitle") < blocked.indexOf("common.continue"),+ "Continue should render after the permission rows"+ );+ assert.match(blocked, /<button[^>]*\bdisabled=""[^>]*>common\.continue<\/button>/);++ const ready = render(true, asyncNoop);+ assert.match(ready, /<button[^>]*>common\.continue<\/button>/);+ assert.doesNotMatch(ready, /\bdisabled=""[^>]*>common\.continue/);++ // Guests reach this step without ever signing in, so they get no Logout.+ const guest = render(true);+ assert.doesNotMatch(guest, /common\.logout/);+ assert.match(guest, /common\.continue/);});test("macOS onboarding offers optional Screen Context setup", async (t) => {@@ -159,7 +219,13 @@ test("macOS onboarding offers optional Screen Context setup", async (t) => {);assert.match(markup, /dictationAgent\.screenContext\.title/);- assert.match(markup, /screen-context\.webp/);+ assert.match(markup, /lucide-laptop/);+ assert.doesNotMatch(markup, /onboarding\.permissions\.recommended/);+ assert.equal(+ markup.match(/onboarding\.permissions\.optional/g)?.length,+ 2,+ "System Audio and Screen Context should be labelled Optional on macOS"+ );assert.doesNotMatch(markup, /dictationAgent\.screenContext\.relaunchHint/);});@@ -185,6 +251,7 @@ test("macOS onboarding shows the Screen Context relaunch guidance when needed",assert.match(markup, /dictationAgent\.screenContext\.relaunchHint/);assert.match(markup, />onboarding\.rehaul\.permissions\.enabled<\/button>/);+ assertGuidancePrecedesActions(markup, "dictationAgent.screenContext.relaunchHint");});test("macOS onboarding omits Screen Context when the flow does not offer it", async (t) => {@@ -224,7 +291,12 @@ test("Windows onboarding offers Screen Context as a permissionless opt-in", asyn);assert.match(markup, /dictationAgent\.screenContext\.title/);- assert.match(markup, /screen-context\.webp/);+ assert.match(markup, /lucide-laptop/);+ assert.equal(+ markup.match(/onboarding\.permissions\.optional/g)?.length,+ 1,+ "Screen Context should be labelled Optional on Windows"+ );assert.match(markup, />onboarding\.rehaul\.permissions\.enabled<\/button>/);assert.doesNotMatch(markup, /dictationAgent\.screenContext\.relaunchHint/);});@@ -246,3 +318,17 @@ test("Linux onboarding does not show Screen Context", async (t) => {assert.doesNotMatch(markup, /dictationAgent\.screenContext\.title/);});++test("provider setup stages mark dictation complete before Assistant", async (t) => {+ const vite = await createOnboardingRenderer(t);+ const { SetupStageStepper } = await vite.ssrLoadModule(+ "/components/onboarding/ProviderSetupStep.tsx"+ );++ for (const stepId of ["byok-assistant", "local-assistant"]) {+ const markup = renderToStaticMarkup(React.createElement(SetupStageStepper, { stepId }));++ assert.match(markup, /lucide-circle-check/);+ assert.doesNotMatch(markup, /lucide-audio-lines/);+ }+});diff --git a/test/components/onboardingFlow.test.js b/test/components/onboardingFlow.test.jsindex 0da96c5c1..ad860db6f 100644--- a/test/components/onboardingFlow.test.js+++ b/test/components/onboardingFlow.test.js@@ -93,6 +93,30 @@ test("a confirmed enterprise workspace ends the account route at notes", async (assert.equal(route.includes("setup-choice"), false);});+test("notes starts with Skip and switches to Continue after a calendar connects", async () => {+ const { getNotesFooterAction } = await load();++ assert.equal(+ getNotesFooterAction({ workspaceResolutionPending: false, hasConnectedCalendar: false }),+ "skip"+ );+ assert.equal(+ getNotesFooterAction({ workspaceResolutionPending: false, hasConnectedCalendar: true }),+ "continue"+ );+ // Naming this state rather than returning null: the footer has to keep showing a+ // Continue while workspaces resolve, disabled and loading. Reading it as "no+ // action" left the step with nothing but Back and no explanation.+ assert.equal(+ getNotesFooterAction({ workspaceResolutionPending: true, hasConnectedCalendar: true }),+ "loading"+ );+ assert.equal(+ getNotesFooterAction({ workspaceResolutionPending: true, hasConnectedCalendar: false }),+ "loading"+ );+});+test("enterprise workspace entitlement requires a current paid entitlement", async () => {const { isEnterpriseWorkspaceEntitled } = await load();assert.equal(isEnterpriseWorkspaceEntitled({ plan: "enterprise", status: "active" }), true);@@ -143,13 +167,61 @@ test("versioned sessions reject malformed or old data", async () => {const legacyV2 = { ...session };delete legacyV2.selfHostedRequested;+ delete legacyV2.resume;assert.equal(parseOnboardingSession(JSON.stringify(legacyV2)).selfHostedRequested, false);+ assert.deepEqual(+ parseOnboardingSession(JSON.stringify(legacyV2)).resume,+ createOnboardingSession().resume+ );assert.equal(parseOnboardingSession(JSON.stringify({ ...session, selfHostedRequested: "yes" })),null);});+test("v2 sessions retain safe within-step state without accepting secrets", async () => {+ const { createOnboardingSession, parseOnboardingSession } = await load();+ const session = createOnboardingSession();+ session.currentStepId = "byok-dictation";+ session.resume.dictationHotkeyConfirmed = true;+ session.resume.dictationDemoCompleted = true;+ session.resume.auth = {+ ...session.resume.auth,+ authMode: "sign-up",+ email: "[email protected]",+ fullName: "Person Example",+ };+ session.resume.byok["byok-dictation"] = {+ selectedProvider: "openai",+ selectedModel: "gpt-4o-mini-transcribe",+ baseUrl: "https://self-hosted.example.com",+ customModel: "whisper-local",+ };+ session.resume.localModels["local-assistant"] = {+ provider: "qwen",+ modelId: "qwen-9b",+ };++ const serialized = JSON.stringify(session);+ assert.doesNotMatch(serialized, /password|apiKey|cortiClientId|clientSecret/);+ assert.deepEqual(parseOnboardingSession(serialized), session);++ // Corti's client id is one of the safeStorage-encrypted secrets, so a draft+ // written by an older build has to be dropped rather than read back.+ const legacyDraft = JSON.parse(serialized);+ legacyDraft.resume.byok["byok-dictation"].cortiClientId = "client-id";+ assert.deepEqual(parseOnboardingSession(JSON.stringify(legacyDraft)), session);++ const malformedDraft = JSON.parse(serialized);+ malformedDraft.resume.auth.authMode = "unknown";+ malformedDraft.resume.byok["byok-dictation"].selectedProvider = 42;+ malformedDraft.resume.localModels["local-assistant"].modelId = false;+ const parsed = parseOnboardingSession(JSON.stringify(malformedDraft));+ assert.equal(parsed.resume.auth.authMode, null);+ assert.equal(parsed.resume.byok["byok-dictation"].selectedProvider, "");+ assert.equal(parsed.resume.localModels["local-assistant"].modelId, "");+});+test("an explicit restart clears every persisted route choice and returns to auth", async () => {const { resetOnboardingProgress } = await load();const values = new Map([@@ -157,6 +229,8 @@ test("an explicit restart clears every persisted route choice and returns to aut["onboardingCompleted", "true"],["authenticationSkipped", "true"],["skipAuth", "true"],+ ["localSetupPending", "true"],+ ["pendingLocalModelSelectionsV1", '{"assistant":{"provider":"qwen","modelId":"qwen-9b"}}'],]);const storage = {setItem: (key, value) => values.set(key, value),@@ -170,6 +244,8 @@ test("an explicit restart clears every persisted route choice and returns to autassert.equal(values.has("onboardingCompleted"), false);assert.equal(values.has("authenticationSkipped"), false);assert.equal(values.has("skipAuth"), false);+ assert.equal(values.has("localSetupPending"), false);+ assert.equal(values.has("pendingLocalModelSelectionsV1"), false);});test("legacy numeric steps migrate conservatively", async () => {@@ -350,3 +426,50 @@ test("the tray suppression predicate matches only an active required-models sessfalse);});++test("a session written before the resume flags infers its hotkey confirmations", async () => {+ const { createOnboardingSession, parseOnboardingSession } = await load();+ const preResumeSession = (currentStepId) => {+ const { resume, ...session } = { ...createOnboardingSession(), currentStepId };+ void resume;+ return JSON.stringify({ ...session, authPath: "account" });+ };++ // The shipped build persists this shape. Read back as "never confirmed", a+ // macOS session resuming past the hotkey step lets finalizeOnboarding replace+ // the chord the user confirmed on that build, with no screen ever showing it.+ const past = parseOnboardingSession(preResumeSession("notes"));+ assert.equal(past.resume.dictationHotkeyConfirmed, true);+ assert.equal(past.resume.assistantHotkeyConfirmed, true);++ // Not yet reached is genuinely unconfirmed: the step still has to be shown, and+ // onboarding stays free to open it on the platform's onboarding chord.+ const before = parseOnboardingSession(preResumeSession("permissions"));+ assert.equal(before.resume.dictationHotkeyConfirmed, false);+ assert.equal(before.resume.assistantHotkeyConfirmed, false);++ // Standing on the step is not having finished it.+ const on = parseOnboardingSession(preResumeSession("dictation-hotkey"));+ assert.equal(on.resume.dictationHotkeyConfirmed, false);+ assert.equal(on.resume.assistantHotkeyConfirmed, false);++ // Nothing else is inferred — a demo the user never ran must still gate Continue.+ assert.equal(past.resume.dictationDemoCompleted, false);+ assert.equal(past.resume.assistantDemoCompleted, false);+});++test("only a signed-in account holder is offered a logout during onboarding", async () => {+ const { shouldOfferOnboardingLogout } = await load();++ assert.equal(shouldOfferOnboardingLogout({ isSignedIn: true, authPath: "account" }), true);++ // Guests have no account to leave.+ assert.equal(shouldOfferOnboardingLogout({ isSignedIn: false, authPath: "guest" }), false);+ assert.equal(shouldOfferOnboardingLogout({ isSignedIn: true, authPath: "guest" }), false);++ // The legacy migration labels any pre-v2 session past the auth step "account"+ // without anyone signing in, and Log out wipes the session, localSetupPending and+ // the pending model selections — unconfirmed, for someone with nothing to log out of.+ assert.equal(shouldOfferOnboardingLogout({ isSignedIn: false, authPath: "account" }), false);+ assert.equal(shouldOfferOnboardingLogout({ isSignedIn: false, authPath: null }), false);+});diff --git a/test/components/onboardingHotkeyPresentation.test.js b/test/components/onboardingHotkeyPresentation.test.jsindex 6d117c679..d4f624292 100644--- a/test/components/onboardingHotkeyPresentation.test.js+++ b/test/components/onboardingHotkeyPresentation.test.js@@ -6,7 +6,9 @@ const load = () => import("../../src/components/onboarding/hotkeyPresentation.tstest("Globe/Fn renders as one reusable physical key", async () => {const { getHotkeyKeycaps } = await load();- assert.deepEqual(getHotkeyKeycaps("GLOBE"), [{ id: "Globe/Fn-0", label: "fn", symbol: "◎" }]);+ assert.deepEqual(getHotkeyKeycaps("GLOBE"), [+ { id: "Globe/Fn-0", label: "fn", symbol: "◎", icon: "globe" },+ ]);});test("compound shortcuts produce ordered keycaps and readable instructions", async () => {@@ -19,6 +21,83 @@ test("compound shortcuts produce ordered keycaps and readable instructions", asyassert.equal(formatHotkeyInstruction("Control+Shift+K"), "Ctrl + Shift + K");});+test("macOS recommends Right Option first, followed by Globe/Fn and Ctrl + R", async () => {+ const {+ DEFAULT_ASSISTANT_ONBOARDING_HOTKEY,+ formatRecommendedHotkey,+ getRecommendedDictationHotkeys,+ } = await load();++ assert.deepEqual(+ getRecommendedDictationHotkeys("darwin", "Command+K").map(formatRecommendedHotkey),+ ["Right Option", "Globe/Fn", "Ctrl + R"]+ );+ assert.deepEqual(getRecommendedDictationHotkeys("linux", "Control+Super"), ["Control+Super"]);+ assert.deepEqual(getRecommendedDictationHotkeys("win32", "Control+Shift+Space"), [+ "Control+Shift+Space",+ ]);+ assert.equal(DEFAULT_ASSISTANT_ONBOARDING_HOTKEY, "CommandOrControl+Shift+Space");+ assert.equal(formatRecommendedHotkey(DEFAULT_ASSISTANT_ONBOARDING_HOTKEY), "Cmd + Shift + Space");+});++test("the dictation step never opens on a chord that would overwrite the user's own", async () => {+ const { resolveOnboardingDictationHotkey } = await load();+ const onMac = (savedHotkey, confirmed) =>+ resolveOnboardingDictationHotkey({+ platform: "darwin",+ savedHotkey,+ platformDefault: "GLOBE",+ confirmed,+ });++ // Nothing of the user's to lose: main auto-registers and persists GLOBE before+ // onboarding runs, so an unconfirmed one is not a choice anybody made.+ assert.equal(onMac("", false), "RightOption");+ assert.equal(onMac("", true), "RightOption");+ assert.equal(onMac("GLOBE", false), "RightOption");++ // A chord the user accepted on the hotkey step survives, and so does any chord+ // that isn't the platform default. finalizeOnboarding re-registers whatever this+ // returns, so substituting here would erase it. parseOnboardingSession infers+ // `confirmed` for sessions written before the flag existed.+ assert.equal(onMac("Control+Shift+D", false), "Control+Shift+D");+ assert.equal(onMac("Control+Shift+D", true), "Control+Shift+D");+ assert.equal(onMac("GLOBE", true), "GLOBE");+});++test("the assistant step keeps a saved chord and otherwise offers the opt-in default", async () => {+ const { DEFAULT_ASSISTANT_ONBOARDING_HOTKEY, resolveOnboardingAssistantHotkey } = await load();++ // voiceAgentKey is opt-in with no platform default, so anything saved is the+ // user's own pick and nothing may substitute for it.+ assert.equal(resolveOnboardingAssistantHotkey("Alt+Space"), "Alt+Space");+ assert.equal(+ resolveOnboardingAssistantHotkey(DEFAULT_ASSISTANT_ONBOARDING_HOTKEY),+ DEFAULT_ASSISTANT_ONBOARDING_HOTKEY+ );+ assert.equal(resolveOnboardingAssistantHotkey(""), DEFAULT_ASSISTANT_ONBOARDING_HOTKEY);+});++test("only macOS substitutes an onboarding default for the platform one", async () => {+ const { resolveOnboardingDictationHotkey } = await load();++ for (const platform of ["win32", "linux"]) {+ for (const confirmed of [false, true]) {+ const resolve = (savedHotkey) =>+ resolveOnboardingDictationHotkey({+ platform,+ savedHotkey,+ platformDefault: "Control+Super",+ confirmed,+ });+ assert.equal(resolve(""), "Control+Super");+ assert.equal(resolve("Control+Super"), "Control+Super");+ assert.equal(resolve("F8"), "F8");+ assert.equal(resolve("Control+Shift+D"), "Control+Shift+D");+ }+ }+});+test("a side-specific modifier keeps its glyph and says which side in the label", async () => {const { getHotkeyKeycaps } = await load();diff --git a/test/components/shortcutSetupStep.test.js b/test/components/shortcutSetupStep.test.jsnew file mode 100644index 000000000..08db7af58--- /dev/null+++ b/test/components/shortcutSetupStep.test.js@@ -0,0 +1,279 @@+const assert = require("node:assert/strict");+const test = require("node:test");+const { createRendererServer } = require("../lib/rendererTestHarness");++function findElement(node, predicate) {+ if (Array.isArray(node)) {+ for (const child of node) {+ const match = findElement(child, predicate);+ if (match) return match;+ }+ return null;+ }+ if (!node || typeof node !== "object") return null;+ if (predicate(node)) return node;+ return findElement(node.props?.children, predicate);+}++function textContent(node) {+ if (Array.isArray(node)) return node.map(textContent).join("");+ if (typeof node === "string") return node;+ if (!node || typeof node !== "object") return "";+ return textContent(node.props?.children);+}++async function createShortcutHarness(t, overrides = {}) {+ globalThis.__shortcutSetupHarness = {+ cursor: 0,+ values: {},+ confirmed: [],+ changed: [],+ cleared: 0,+ };+ t.after(() => {+ delete globalThis.__shortcutSetupHarness;+ });++ const vite = await createRendererServer(t, {+ cachePrefix: "openwhispr-shortcut-setup-step-",+ noExternal: ["react", "react-i18next", "lucide-react"],+ mockModules: {+ react: `+ export function useState(initialValue) {+ const harness = globalThis.__shortcutSetupHarness;+ const index = harness.cursor++;+ if (!(index in harness.values)) {+ harness.values[index] = typeof initialValue === "function" ? initialValue() : initialValue;+ }+ return [harness.values[index], (nextValue) => {+ harness.values[index] = typeof nextValue === "function"+ ? nextValue(harness.values[index])+ : nextValue;+ }];+ }+ `,+ "/jsx-dev-runtime": `+ export const Fragment = Symbol.for("react.fragment");+ export function jsxDEV(type, props, key) { return { type, props, key }; }+ `,+ "react-i18next": `+ export function useTranslation() {+ return { t(key, options) { return options?.hotkey ? key + ":" + options.hotkey : key; } };+ }+ `,+ "lucide-react": `+ export function Globe() { return null; }+ export function Loader2() { return null; }+ `,+ "/ui/HotkeyInput": `export function HotkeyInput() { return null; }`,+ "/utils/hotkeys": `export function formatHotkeyLabel(value) { return value; }`,+ "/hotkeyPresentation": `+ export function formatHotkeyInstruction(value) { return value.split("+").join(" + "); }+ export function formatRecommendedHotkey(value) {+ return value === "GLOBE" || value === "Fn"+ ? "Globe/Fn"+ : value.replace("RightOption", "Right Option").replace(/^Control/, "Ctrl").split("+").join(" + ");+ }+ export function getHotkeyKeycaps(value) {+ return value.split("+").filter(Boolean).map((part, index) => ({+ id: part + "-" + index,+ label: part.toLowerCase(),+ symbol: part.slice(0, 1),+ }));+ }+ `,+ },+ });+ const { default: ShortcutSetupStep } = await vite.ssrLoadModule(+ "/components/onboarding/ShortcutSetupStep.tsx"+ );+ const harness = globalThis.__shortcutSetupHarness;+ const props = {+ value: "RightOption",+ initiallyConfirmed: false,+ recommended: ["RightOption", "GLOBE", "Control+R"],+ captureLabel: "Capture",+ recommendedLabel: "Recommended",+ chooseAnotherLabel: "Choose another shortcut",+ dense: true,+ onConfirm: async (value) => {+ harness.confirmed.push(value);+ return null;+ },+ onChange: (value) => harness.changed.push(value),+ onClearSelection: () => {+ harness.cleared += 1;+ },+ ...overrides,+ };+ const render = (renderOverrides = {}) => {+ harness.cursor = 0;+ return ShortcutSetupStep({ ...props, ...renderOverrides });+ };+ // The step adjusts its seeded chord during render, which makes React re-render+ // synchronously before it paints; this harness has to run the component again to+ // observe that. The third pass pins that the adjustment settles instead of+ // re-triggering itself.+ const renderSettled = (renderOverrides = {}) => {+ render(renderOverrides);+ const settled = render(renderOverrides);+ assert.equal(+ textContent(render(renderOverrides)),+ textContent(settled),+ "the seeded chord should settle after one adjustment"+ );+ return settled;+ };++ return {+ harness,+ render,+ renderSettled,+ input: (tree) => findElement(tree, (node) => node.type?.name === "HotkeyInput"),+ chord: (tree) => findElement(tree, (node) => node.type?.name === "HotkeyChord"),+ };+}++test("shortcut selection requires the same chord twice and keeps confirmation keyboard-driven", async (t) => {+ const { harness, render, renderSettled, input, chord } = await createShortcutHarness(t);++ // The step opens with the recommended chord already in the box, so it asks for a+ // first press; "press it again" only applies once a chord has actually been captured.+ const initialTree = render();+ assert.match(textContent(initialTree), /Capture/);+ assert.doesNotMatch(textContent(initialTree), /confirmAgain/);+ assert.ok(+ findElement(+ initialTree,+ (node) => node.type === "button" && textContent(node) === "Choose another shortcut"+ ),+ "an unconfirmed shortcut should still expose the reset action"+ );+ // The box only offers one of the recommendations, so the rest have to stay on+ // screen — otherwise the alternatives are reachable only by first clearing the+ // chord the step just pre-filled.+ assert.match(textContent(initialTree), /RecommendedGlobe\/FnCtrl \+ R/);+ assert.doesNotMatch(+ textContent(initialTree),+ /Right Option/,+ "the chord already in the box should not be repeated as a suggestion"+ );+ // Main resolves the shortcut it can actually register after this step is already+ // open, so a late correction has to reach the box — without reading as a capture.+ const correctedTree = renderSettled({ value: "F8" });+ assert.equal(chord(correctedTree).props.value, "F8");+ assert.equal(input(correctedTree).props.value, "F8");+ assert.match(textContent(correctedTree), /Capture/);+ assert.doesNotMatch(textContent(correctedTree), /confirmAgain/);++ // It keeps following, so the box can never lag behind main.+ const restoredTree = renderSettled();+ assert.equal(chord(restoredTree).props.value, "RightOption");+ assert.doesNotMatch(textContent(restoredTree), /confirmAgain/);++ input(restoredTree).props.onChange("RightOption");+ await new Promise((resolve) => setImmediate(resolve));+ assert.deepEqual(harness.confirmed, ["RightOption"]);+ assert.deepEqual(harness.changed, ["RightOption"]);+ assert.equal(harness.cleared, 0, "confirming the offered chord discards nothing");++ const confirmedTree = render();+ const chooseAnother = findElement(+ confirmedTree,+ (node) => node.type === "button" && textContent(node) === "Choose another shortcut"+ );+ assert.ok(chooseAnother);+ chooseAnother.props.onClick();+ // Resetting has to reach the caller, or the chord it recorded from the confirmed+ // press stays registered behind an empty box.+ assert.equal(harness.cleared, 1);+ harness.confirmed.length = 0;+ harness.changed.length = 0;++ const emptyTree = render();+ assert.match(textContent(emptyTree), /RecommendedRight OptionGlobe\/FnCtrl \+ R/);++ input(emptyTree).props.onChange("Control+Alt");+ assert.deepEqual(harness.confirmed, []);+ assert.deepEqual(harness.changed, []);+ assert.equal(harness.cleared, 2, "a fresh capture supersedes whatever the caller held");++ const candidateTree = render();+ assert.match(+ textContent(candidateTree),+ /onboarding\.rehaul\.hotkey\.confirmAgain:Control \+ Alt/+ );+ assert.equal(+ findElement(+ candidateTree,+ (node) => node.type === "button" && /confirm/i.test(textContent(node))+ ),+ null+ );++ // A captured chord is the user's own, so nothing the caller reports afterwards+ // may replace it — including the empty value onClearSelection drives it to.+ for (const value of ["", "Meta+J"]) {+ const heldTree = renderSettled({ value });+ assert.equal(chord(heldTree).props.value, "Control+Alt");+ assert.match(textContent(heldTree), /onboarding\.rehaul\.hotkey\.confirmAgain:Control \+ Alt/);+ assert.doesNotMatch(textContent(heldTree), /Recommended/);+ }++ input(candidateTree).props.onChange("Control+Alt");+ await new Promise((resolve) => setImmediate(resolve));+ assert.deepEqual(harness.confirmed, ["Control+Alt"]);+ assert.deepEqual(harness.changed, ["Control+Alt"]);+});++test("a shortcut confirmed in an earlier session reopens confirmed", async (t) => {+ const { harness, render, input } = await createShortcutHarness(t, {+ value: "Control+Alt",+ initiallyConfirmed: true,+ });++ // Resuming onto this step must not ask for the chord again, and must not offer+ // alternatives to a choice the user already made.+ const resumedTree = render();+ assert.match(textContent(resumedTree), /Control \+ Alt/);+ assert.doesNotMatch(textContent(resumedTree), /Capture/);+ assert.doesNotMatch(textContent(resumedTree), /confirmAgain/);+ assert.doesNotMatch(textContent(resumedTree), /Recommended/);++ // Pressing it again is the user starting over, not re-confirming: the caller has+ // to drop the chord it holds before a new one can replace it.+ input(resumedTree).props.onChange("Control+Alt");+ await new Promise((resolve) => setImmediate(resolve));+ assert.deepEqual(harness.confirmed, []);+ assert.deepEqual(harness.changed, []);+ assert.equal(harness.cleared, 1);++ const recapturedTree = render();+ assert.match(+ textContent(recapturedTree),+ /onboarding\.rehaul\.hotkey\.confirmAgain:Control \+ Alt/+ );+ input(recapturedTree).props.onChange("Control+Alt");+ await new Promise((resolve) => setImmediate(resolve));+ assert.deepEqual(harness.confirmed, ["Control+Alt"]);+ assert.deepEqual(harness.changed, ["Control+Alt"]);+});++test("the recommendation row offers only chords the box is not already showing", async (t) => {+ const { renderSettled } = await createShortcutHarness(t);++ // GLOBE and Fn are distinct accelerators that print as the same key, so comparing+ // the raw values would offer "Globe/Fn" underneath a box already showing it.+ const onFn = renderSettled({ value: "Fn" });+ assert.match(textContent(onFn), /RecommendedRight OptionCtrl \+ R/);+ assert.doesNotMatch(textContent(onFn), /Globe\/Fn/);++ // A step whose only recommendation is the chord it pre-filled has nothing to add.+ // The assistant step passes a single chord rather than a list, so this is its+ // ordinary first-entry state.+ const assistantLike = renderSettled({+ value: "CommandOrControl+Shift+Space",+ recommended: "CommandOrControl+Shift+Space",+ });+ assert.doesNotMatch(textContent(assistantLike), /Recommended/);+});