The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(onboarding): cut the local path to three steps and stop it lying
[email protected]1f3a352fe665
diff --git a/app/src/components/settings/panels/AIPanel.tsx b/app/src/components/settings/panels/AIPanel.tsxindex dad0c63501..b43540a77c 100644--- a/app/src/components/settings/panels/AIPanel.tsx+++ b/app/src/components/settings/panels/AIPanel.tsx@@ -11,7 +11,7 @@** This file is a thin composition — every section lives in `./ai/*`.*/-import { useCallback, useRef, useState } from 'react';+import { useCallback, useEffect, useRef, useState } from 'react';import { useT } from '../../../lib/i18n/I18nContext';import {@@ -62,6 +62,16 @@ interface AIPanelProps {onTabChange?: (tab: AIPanelTab) => void;/** Suppress PanelPage's internal tab chrome for a host-rendered chip row. */hideTabChrome?: boolean;+ /**+ * Reports whether the panel holds unsaved edits.+ *+ * The onboarding wizard needs this: the panel keeps its own `SaveBar`, so a+ * host with its own Continue button offers two competing ways to commit, and+ * Continue used to navigate away and drop the edits silently. The wizard+ * subscribes and disables Continue while dirty. Undefined for Settings,+ * which has no second commit control.+ */+ onDirtyChange?: (dirty: boolean) => void;/** Host-owned "Add provider" dialog state (the host renders the button in* its header). Undefined lets the providers section keep its own button. */addProviderOpen?: boolean;@@ -75,10 +85,17 @@ const AIPanel = ({hideTabChrome = false,addProviderOpen,onAddProviderOpenChange,+ onDirtyChange,}: AIPanelProps = {}) => {const { t } = useT();const { navigateBack } = useSettingsNavigation();const { saved, draft, isDirty, save, persist, discard, loading, error, reload } = useAISettings();++ // Let a host with its own commit control know there are unsaved edits. See+ // the prop's note: without this the wizard's Continue silently discarded them.+ useEffect(() => {+ onDirtyChange?.(isDirty);+ }, [isDirty, onDirtyChange]);// #1574 §4b: advisory re-embed modal, driven by the backend status RPC.const ollama = useOllamaStatus();const installed = useInstalledModels(ollama.snapshot);diff --git a/app/src/components/settings/panels/SearchPanel.tsx b/app/src/components/settings/panels/SearchPanel.tsxindex 67865b3bf1..d40ad9883c 100644--- a/app/src/components/settings/panels/SearchPanel.tsx+++ b/app/src/components/settings/panels/SearchPanel.tsx@@ -46,13 +46,30 @@ const errorMessage = (err: unknown) => (err instanceof Error ? err.message : Str* `embedded` renders without the page title (the onboarding wizard owns its* own heading); the switch and tabs then sit at the top of the body.*/-const SearchPanel = ({ embedded = false }: { embedded?: boolean }) => {+const SearchPanel = ({+ embedded = false,+ hideTabChrome = false,+}: {+ embedded?: boolean;+ /**+ * Drop the providers/routing/websites chip tabs and show providers only.+ *+ * The onboarding wizard sets this: a three-step wizard with its own tabbed+ * sub-navigation inside one step reads as two nesting levels of the same+ * idea, and the routing and websites tabs are refinements nobody needs+ * before their first message. Both stay reachable from Settings. Defaults+ * false so Settings is unchanged.+ */+ hideTabChrome?: boolean;+}) => {const { t } = useT();const { snapshot } = useCoreState();const isLocalSession = isLocalSessionToken(snapshot.sessionToken);const enabledId = useId();- const [tab, setTab] = useState<SearchPanelTab>('providers');+ const [selectedTab, setTab] = useState<SearchPanelTab>('providers');+ // With the chip row hidden there is no way back from another tab, so pin it.+ const tab: SearchPanelTab = hideTabChrome ? 'providers' : selectedTab;const [settings, setSettings] = useState<SearchSettings | null>(null);const [status, setStatus] = useState<Status>({ kind: 'loading' });const saving = status.kind === 'saving';@@ -117,8 +134,32 @@ const SearchPanel = ({ embedded = false }: { embedded?: boolean }) => {{ id: 'websites' as const, label: t('settings.search.tabWebsites') },];+ // One honest answer to "will search actually work?". `effective_roles` lists+ // the usable providers per role in serving order, so an empty list for every+ // role means no tool will be offered to the agent. Derived from the settings+ // the panel already holds — `SearchProviderInfo.usable` is dead, nothing+ // reads it, and there is no RPC that runs a probe query.+ const searchReady = Boolean(+ settings?.enabled &&+ Object.values(settings.effective_roles ?? {}).some(providers => providers.length > 0)+ );+const body = (<div className="flex w-full flex-col gap-4" data-testid="search-settings-panel">+ {hideTabChrome && settings && settings.enabled ? (+ <Alert+ variant={searchReady ? 'success' : 'warning'}+ density="compact"+ role={undefined}+ data-testid="search-readiness">+ <AlertDescription>+ {searchReady+ ? t('onboarding.custom.search.ready')+ : t('onboarding.custom.search.notReady')}+ </AlertDescription>+ </Alert>+ ) : null}+{managedUnavailable && (<Alert variant="info"><AlertDescription>{t('settings.search.localManagedUnavailable')}</AlertDescription>@@ -164,14 +205,16 @@ const SearchPanel = ({ embedded = false }: { embedded?: boolean }) => {return (<div className="flex w-full flex-col gap-4"><div className="flex flex-wrap items-center justify-between gap-3">- <ChipTabs- className="flex flex-wrap gap-1.5"- ariaLabel={t('settings.search.title')}- testIdPrefix="search-tab"- items={tabs}- value={tab}- onChange={setTab}- />+ {hideTabChrome ? null : (+ <ChipTabs+ className="flex flex-wrap gap-1.5"+ ariaLabel={t('settings.search.title')}+ testIdPrefix="search-tab"+ items={tabs}+ value={tab}+ onChange={setTab}+ />+ )}{enabledSwitch}</div>{body}diff --git a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx b/app/src/components/settings/panels/__tests__/AIPanel.test.tsxindex a01530f330..8f996f6017 100644--- a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx+++ b/app/src/components/settings/panels/__tests__/AIPanel.test.tsx@@ -1,7 +1,8 @@import { fireEvent, screen, waitFor, within } from '@testing-library/react';-import { beforeEach, describe, expect, it, vi } from 'vitest';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { listConnections as listComposioConnections } from '../../../../lib/composio/composioApi';+import { getCoreStateSnapshot, setCoreStateSnapshot } from '../../../../lib/coreState/store';import { I18nProvider } from '../../../../lib/i18n/I18nContext';import {clearCloudProviderKey,@@ -22,6 +23,7 @@ import {import { creditsApi } from '../../../../services/api/creditsApi';import { callCoreRpc } from '../../../../services/coreRpcClient';import { renderWithProviders } from '../../../../test/test-utils';+import { createLocalSessionToken } from '../../../../utils/localSession';import { connectOpenRouterViaOAuth } from '../../../../utils/openrouterOAuth';import { openUrl } from '../../../../utils/openUrl';import { isTauri } from '../../../../utils/tauriCommands/common';@@ -241,9 +243,23 @@ const baseConnections = [{ id: 'pending-cal', toolkit: 'googlecalendar', status: 'PENDING' },];+// AIPanel tests mount no CoreStateProvider, so the session hooks read the+// module-level snapshot store. Seed it with a real (non-local) session so the+// managed OpenHuman row — which only exists for real sessions — is available.+const originalCoreState = getCoreStateSnapshot();+function seedSessionToken(sessionToken: string | null) {+ setCoreStateSnapshot({+ ...originalCoreState,+ snapshot: { ...originalCoreState.snapshot, sessionToken },+ });+}+describe('AIPanel', () => {+ afterEach(() => setCoreStateSnapshot(originalCoreState));+beforeEach(() => {vi.clearAllMocks();+ seedSessionToken('header.payload.signature');vi.mocked(isTauri).mockReturnValue(false);vi.mocked(loadAISettings).mockResolvedValue(baseSettings);vi.mocked(loadLocalProviderSnapshot).mockResolvedValue(baseLocalSnapshot);@@ -319,6 +335,14 @@ describe('AIPanel', () => {).toBeInTheDocument();});+ it('omits the managed OpenHuman row for a local ("Continue Locally") session', async () => {+ seedSessionToken(createLocalSessionToken());+ renderWithProviders(<AIPanel />);+ await waitFor(() => expect(screen.getAllByText(/^LLM Providers$/).length).toBeGreaterThan(0));+ expect(screen.queryByTestId('provider-row-openhuman')).not.toBeInTheDocument();+ expect(screen.queryByText(/^Always on$/i)).not.toBeInTheDocument();+ });+it('shows the per-workload routing tables directly, with no mode selector', async () => {renderWithProviders(<AIPanel />);fireEvent.click(await screen.findByRole('tab', { name: /^Routing$/i }));diff --git a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx b/app/src/components/settings/panels/ai/ProviderAuthSection.tsxindex dd437eaf05..d34b77f85e 100644--- a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx+++ b/app/src/components/settings/panels/ai/ProviderAuthSection.tsx@@ -19,6 +19,7 @@import { Plus } from 'lucide-react';import { useState } from 'react';+import { useManagedInferenceAvailable } from '../../../../hooks/useLocalSession';import { useT } from '../../../../lib/i18n/I18nContext';import type { ProviderAuthError } from '../../../../services/api/aiSettingsApi';import Alert, { AlertDescription } from '../../../ui/Alert';@@ -141,6 +142,7 @@ export const ProviderAuthSection = ({onAddOpenChange?: (open: boolean) => void;}) => {const { t } = useT();+ const managedAvailable = useManagedInferenceAvailable();const [localAddOpen, setLocalAddOpen] = useState(false);const hostControlsAdd = controlledAddOpen !== undefined;const addOpen = controlledAddOpen ?? localAddOpen;@@ -277,22 +279,32 @@ export const ProviderAuthSection = ({{loading && <CenteredLoadingState label={t('common.loading')} />}{/* ─── Connected ────────────────────────────────────────────────────- Managed leads and is always present. #3760: it renders a badge, not a- disabled toggle — a locked switch reads as switchable-but-broken and- invites a fight the user cannot win. */}+ Managed leads WHEN IT EXISTS. It used to render unconditionally, so a+ self-hosting user — signed in with "Continue Locally", no TinyHumans+ account behind the session — was told OpenHuman "chooses a model for+ each task" and shown an "Always on" badge for a service they do not+ have. That is the first thing the inference step shows them, and it+ is false. The row now follows the same rule the search and embeddings+ panels already apply.++ #3760: it renders a badge, not a disabled toggle — a locked switch+ reads as switchable-but-broken and invites a fight the user cannot+ win. */}<ProviderGrouptitle={t('settings.ai.providers.groupConnected')}description={t('settings.ai.providers.connectedDesc')}carddata-testid="provider-group-connected">- <ProviderListRow- slug="openhuman"- label={t('settings.ai.routing.managed')}- tone={BUILTIN_PROVIDER_META.openhuman?.tone ?? ''}- detail={t('settings.ai.providers.managedDetail')}- control={<Badge variant="success">{t('settings.ai.routing.managedAlwaysOn')}</Badge>}- data-testid="provider-row-openhuman"- />+ {managedAvailable && (+ <ProviderListRow+ slug="openhuman"+ label={t('settings.ai.routing.managed')}+ tone={BUILTIN_PROVIDER_META.openhuman?.tone ?? ''}+ detail={t('settings.ai.providers.managedDetail')}+ control={<Badge variant="success">{t('settings.ai.routing.managedAlwaysOn')}</Badge>}+ data-testid="provider-row-openhuman"+ />+ )}{connectedCloud.map(slug => {const existing = bySlug(slug)!;diff --git a/app/src/components/settings/panels/ai/__tests__/ProviderAuthSection.test.tsx b/app/src/components/settings/panels/ai/__tests__/ProviderAuthSection.test.tsxnew file mode 100644index 0000000000..c039cb6e37--- /dev/null+++ b/app/src/components/settings/panels/ai/__tests__/ProviderAuthSection.test.tsx@@ -0,0 +1,62 @@+import { configureStore } from '@reduxjs/toolkit';+import { render, screen } from '@testing-library/react';+import { Provider } from 'react-redux';+import { describe, expect, it, vi } from 'vitest';++import { I18nProvider } from '../../../../../lib/i18n/I18nContext';+import type { Locale } from '../../../../../lib/i18n/types';+import { CoreStateContext } from '../../../../../providers/coreStateContext';+import localeReducer from '../../../../../store/localeSlice';+import { createLocalSessionToken } from '../../../../../utils/localSession';+import { EMPTY_SETTINGS } from '../aiPanelTypes';+import { ProviderAuthSection } from '../ProviderAuthSection';++function renderSection(sessionToken: string | null) {+ const store = configureStore({+ reducer: { locale: localeReducer },+ preloadedState: { locale: { current: 'en' as Locale } },+ });+ return render(+ <Provider store={store}>+ <I18nProvider>+ <CoreStateContext.Provider value={{ snapshot: { sessionToken } } as never}>+ <ProviderAuthSection+ draft={EMPTY_SETTINGS}+ persist={vi.fn().mockResolvedValue(undefined)}+ loading={false}+ error=""+ busyAction={null}+ providerAuthErrors={[]}+ providerSaveNotice={null}+ onDismissProviderSaveNotice={vi.fn()}+ onProviderRemoved={vi.fn()}+ codexAuthError={null}+ onConnectCodex={vi.fn()}+ onConnectProvider={vi.fn().mockResolvedValue(undefined)}+ onOpenKeyDialog={vi.fn()}+ onAddCustomProvider={vi.fn()}+ onEditCustomProvider={vi.fn()}+ />+ </CoreStateContext.Provider>+ </I18nProvider>+ </Provider>+ );+}++describe('ProviderAuthSection managed row', () => {+ it('shows the managed OpenHuman row for a normal session', () => {+ renderSection('header.payload.signature');+ expect(screen.getByTestId('provider-row-openhuman')).toBeInTheDocument();+ });++ it('hides the managed row for a local ("Continue Locally") session', () => {+ renderSection(createLocalSessionToken());+ expect(screen.getByTestId('provider-group-connected')).toBeInTheDocument();+ expect(screen.queryByTestId('provider-row-openhuman')).not.toBeInTheDocument();+ });++ it('hides the managed row when signed out', () => {+ renderSection(null);+ expect(screen.queryByTestId('provider-row-openhuman')).not.toBeInTheDocument();+ });+});diff --git a/app/src/hooks/useLocalSession.test.tsx b/app/src/hooks/useLocalSession.test.tsxnew file mode 100644index 0000000000..1706ab738f--- /dev/null+++ b/app/src/hooks/useLocalSession.test.tsx@@ -0,0 +1,69 @@+import { renderHook } from '@testing-library/react';+import type { ReactNode } from 'react';+import { afterEach, describe, expect, it } from 'vitest';++import { getCoreStateSnapshot, setCoreStateSnapshot } from '../lib/coreState/store';+import { CoreStateContext } from '../providers/coreStateContext';+import { createLocalSessionToken } from '../utils/localSession';+import { useIsLocalSession, useManagedInferenceAvailable } from './useLocalSession';++const REMOTE_TOKEN = 'header.payload.signature';++function withContext(sessionToken: string | null) {+ const value = { snapshot: { sessionToken } } as never;+ return ({ children }: { children: ReactNode }) => (+ <CoreStateContext.Provider value={value}>{children}</CoreStateContext.Provider>+ );+}++function seedStore(sessionToken: string | null) {+ const current = getCoreStateSnapshot();+ setCoreStateSnapshot({ ...current, snapshot: { ...current.snapshot, sessionToken } });+}++describe('useLocalSession hooks with a CoreStateProvider', () => {+ it('treats a local token as a local session with no managed inference', () => {+ const wrapper = withContext(createLocalSessionToken());+ expect(renderHook(() => useIsLocalSession(), { wrapper }).result.current).toBe(true);+ expect(renderHook(() => useManagedInferenceAvailable(), { wrapper }).result.current).toBe(+ false+ );+ });++ it('treats a real session as non-local with managed inference available', () => {+ const wrapper = withContext(REMOTE_TOKEN);+ expect(renderHook(() => useIsLocalSession(), { wrapper }).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable(), { wrapper }).result.current).toBe(true);+ });++ it('signed out is neither local nor managed-capable', () => {+ const wrapper = withContext(null);+ expect(renderHook(() => useIsLocalSession(), { wrapper }).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable(), { wrapper }).result.current).toBe(+ false+ );+ });+});++describe('useLocalSession hooks without a CoreStateProvider', () => {+ const original = getCoreStateSnapshot();+ afterEach(() => setCoreStateSnapshot(original));++ it('does not throw and reads a local token from the snapshot store', () => {+ seedStore(createLocalSessionToken());+ expect(renderHook(() => useIsLocalSession()).result.current).toBe(true);+ expect(renderHook(() => useManagedInferenceAvailable()).result.current).toBe(false);+ });++ it('reads a real token from the snapshot store', () => {+ seedStore(REMOTE_TOKEN);+ expect(renderHook(() => useIsLocalSession()).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable()).result.current).toBe(true);+ });++ it('reports no managed inference when the store holds no session', () => {+ seedStore(null);+ expect(renderHook(() => useIsLocalSession()).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable()).result.current).toBe(false);+ });+});diff --git a/app/src/hooks/useLocalSession.ts b/app/src/hooks/useLocalSession.tsnew file mode 100644index 0000000000..c73a8006a8--- /dev/null+++ b/app/src/hooks/useLocalSession.ts@@ -0,0 +1,50 @@+import { useContext } from 'react';++import { getCoreStateSnapshot } from '../lib/coreState/store';+import { CoreStateContext } from '../providers/coreStateContext';+import { isLocalSessionToken } from '../utils/localSession';++/**+ * Session-shape helpers for surfaces that must tell a signed-in TinyHumans+ * user apart from a "Continue Locally" one.+ *+ * `isLocalSessionToken(snapshot.sessionToken)` is repeated across a dozen+ * components; these hooks give the two questions actually being asked a name,+ * and give the onboarding wizard one implementation instead of the two it had+ * (one driven by `useEffect`, one by a ref plus a setState during render).+ *+ * They read `CoreStateContext` directly rather than through `useCoreState()`,+ * which throws when no provider is mounted. Settings panels are rendered in+ * unit tests without one, so a throwing read would turn a visibility question+ * into a crash. When the context is absent the hooks fall back to the+ * module-level snapshot store, which is the same state the provider commits+ * to — it just does not re-render on change. That is acceptable here: a+ * session cannot change shape underneath a mounted panel, because an identity+ * flip restarts the app (`handleIdentityFlip` → `restartApp`).+ */+function readSessionToken(context: ReturnType<typeof useSessionContext>): string | null {+ return context ? context.snapshot.sessionToken : getCoreStateSnapshot().snapshot.sessionToken;+}++function useSessionContext() {+ return useContext(CoreStateContext);+}++/** True when the session is the offline "Continue Locally" one. */+export function useIsLocalSession(): boolean {+ const context = useSessionContext();+ return isLocalSessionToken(readSessionToken(context));+}++/**+ * True when OpenHuman-managed services (inference, embeddings, managed search+ * routes) are actually available — that is, when the session is a real+ * TinyHumans session. A local session has no account behind it and therefore+ * no managed anything, and a surface that claims otherwise is lying to the+ * user.+ */+export function useManagedInferenceAvailable(): boolean {+ const context = useSessionContext();+ const token = readSessionToken(context);+ return Boolean(token) && !isLocalSessionToken(token);+}diff --git a/app/src/lib/i18n/ar.ts b/app/src/lib/i18n/ar.tsindex 3a1c314f89..c93ff6f97a 100644--- a/app/src/lib/i18n/ar.ts+++ b/app/src/lib/i18n/ar.ts@@ -741,6 +741,9 @@ const messages: TranslationMap = {'يعمل البحث على الويب فورًا: Exa وGemini مضمّنان مع TinyHumans، دون الحاجة إلى مفتاح API.','onboarding.custom.search.configureDesc':'Exa وGemini مضمّنان. أضف مزوّدي بحث آخرين بمفتاح API الخاص بك من الإعدادات › الأدوات.',+ 'onboarding.custom.search.skipForNow': 'تخطَّ الآن',+ 'onboarding.custom.search.ready': 'البحث على الويب جاهز.',+ 'onboarding.custom.search.notReady': 'أضف مزوّدًا أدناه ليتمكن OpenHuman من البحث على الويب.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'كيف يُولِّد OpenHuman تضمينات المتجهات للبحث الدلالي في الذاكرة.',@@ -4230,6 +4233,9 @@ const messages: TranslationMap = {'راجع ملكية الخزينة، وشغّل فحوصات الصحة، واضبط عناصر التحكم في الذاكرة الآن.','onboarding.custom.vault.localDisabledReason':'يتطلب الإعداد المُدار تسجيل الدخول إلى OpenHuman وغير متاح في الوضع المحلي.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'يتطلب الإعداد المُدار حساب OpenHuman. في الجلسة المحلية تقوم بإعداد كل خدمة بنفسك.',+ 'onboarding.custom.unsavedChanges': 'احفظ تغييراتك قبل المتابعة.','onboarding.custom.vault.exitError': 'تعذّر إتمام الإعداد. يُرجى المحاولة مجددًا.','skills.create.whenToUse': 'متى يُستخدم','skills.create.whenToUsePlaceholder': 'مثال: عندما يطلب المستخدم تنظيم صندوق الوارد',diff --git a/app/src/lib/i18n/bn.ts b/app/src/lib/i18n/bn.tsindex 2e8f494f6d..09b1b20262 100644--- a/app/src/lib/i18n/bn.ts+++ b/app/src/lib/i18n/bn.ts@@ -757,6 +757,10 @@ const messages: TranslationMap = {'ওয়েব সার্চ সঙ্গে সঙ্গে কাজ করে: Exa ও Gemini, TinyHumans-এ অন্তর্ভুক্ত, কোনো API কী লাগে না।','onboarding.custom.search.configureDesc':'Exa ও Gemini অন্তর্ভুক্ত। সেটিংস › টুলস-এ নিজের API কী দিয়ে আরও সার্চ প্রদানকারী যোগ করুন।',+ 'onboarding.custom.search.skipForNow': 'আপাতত এড়িয়ে যান',+ 'onboarding.custom.search.ready': 'ওয়েব সার্চ প্রস্তুত।',+ 'onboarding.custom.search.notReady':+ 'নিচে একটি প্রদানকারী যোগ করুন, যাতে OpenHuman ওয়েবে সার্চ করতে পারে।','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'OpenHuman কীভাবে সিমান্টিক মেমোরি অনুসন্ধানের জন্য ভেক্টর এম্বেডিং তৈরি করে।',@@ -4312,6 +4316,9 @@ const messages: TranslationMap = {'ভল্টের মালিকানা পর্যালোচনা করুন, স্বাস্থ্য পরীক্ষা চালান এবং এখনই মেমোরি নিয়ন্ত্রণ সামঞ্জস্য করুন।','onboarding.custom.vault.localDisabledReason':'পরিচালিত সেটআপের জন্য OpenHuman সাইন-ইন প্রয়োজন এবং লোকাল মোডে উপলব্ধ নয়।',+ 'onboarding.custom.localDefaultDisabledReason':+ 'পরিচালিত সেটআপের জন্য একটি OpenHuman অ্যাকাউন্ট প্রয়োজন। লোকাল সেশনে আপনাকে প্রতিটি সার্ভিস নিজে কনফিগার করতে হবে।',+ 'onboarding.custom.unsavedChanges': 'চালিয়ে যাওয়ার আগে আপনার পরিবর্তনগুলো সংরক্ষণ করুন।','onboarding.custom.vault.exitError': 'অনবোর্ডিং শেষ করা যায়নি। আবার চেষ্টা করুন।','skills.create.whenToUse': 'কখন ব্যবহার করবেন','skills.create.whenToUsePlaceholder': 'যেমন, যখন ব্যবহারকারী তাদের ইনবক্স গোছাতে বলেন',diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.tsindex 2949e7eb73..95dc512e33 100644--- a/app/src/lib/i18n/de.ts+++ b/app/src/lib/i18n/de.ts@@ -788,6 +788,10 @@ const messages: TranslationMap = {'Die Websuche funktioniert sofort: Exa und Gemini sind bei TinyHumans inbegriffen, kein API-Schlüssel nötig.','onboarding.custom.search.configureDesc':'Exa und Gemini sind inbegriffen. Weitere Suchanbieter fügen Sie mit eigenem API-Schlüssel unter Einstellungen › Werkzeuge hinzu.',+ 'onboarding.custom.search.skipForNow': 'Vorerst überspringen',+ 'onboarding.custom.search.ready': 'Die Websuche ist bereit.',+ 'onboarding.custom.search.notReady':+ 'Fügen Sie unten einen Anbieter hinzu, damit OpenHuman im Web suchen kann.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Wie OpenHuman Vektor-Embeddings für die semantische Gedächtnissuche erstellt.',@@ -4421,6 +4425,9 @@ const messages: TranslationMap = {'Vault-Eigentümerschaft prüfen, Integritätsprüfungen durchführen und Speicherkontrollen jetzt anpassen.','onboarding.custom.vault.localDisabledReason':'Die verwaltete Einrichtung erfordert eine OpenHuman-Anmeldung und ist im lokalen Modus nicht verfügbar.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Die verwaltete Einrichtung erfordert ein OpenHuman-Konto. In einer lokalen Sitzung konfigurieren Sie jeden Dienst selbst.',+ 'onboarding.custom.unsavedChanges': 'Speichern Sie Ihre Änderungen, bevor Sie fortfahren.','onboarding.custom.vault.exitError':'Onboarding konnte nicht abgeschlossen werden. Bitte versuchen Sie es erneut.',diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.tsindex d349643a07..fd0db0a675 100644--- a/app/src/lib/i18n/en.ts+++ b/app/src/lib/i18n/en.ts@@ -788,6 +788,9 @@ const en: TranslationMap = {'Web search works out of the box: Exa and Gemini are included with TinyHumans, no API key needed.','onboarding.custom.search.configureDesc':'Exa and Gemini are included. Add more search providers with your own API key in Settings › Tools.',+ 'onboarding.custom.search.skipForNow': 'Skip for now',+ 'onboarding.custom.search.ready': 'Web search is ready.',+ 'onboarding.custom.search.notReady': 'Add a provider below so OpenHuman can search the web.',// Onboarding: Custom > Embeddings'onboarding.custom.embeddings.title': 'Embeddings',@@ -808,6 +811,9 @@ const en: TranslationMap = {'Review vault ownership, run health checks, and tune memory controls now.','onboarding.custom.vault.localDisabledReason':'Managed setup requires OpenHuman sign-in and is unavailable in local mode.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Managed setup needs an OpenHuman account. In a local session you configure each service yourself.',+ 'onboarding.custom.unsavedChanges': 'Save your changes before continuing.','onboarding.custom.vault.exitError': 'Could not finish onboarding. Please try again.',// Onboarding: Custom > Memorydiff --git a/app/src/lib/i18n/es.ts b/app/src/lib/i18n/es.tsindex 5f426c5aba..5fd1222fb5 100644--- a/app/src/lib/i18n/es.ts+++ b/app/src/lib/i18n/es.ts@@ -780,6 +780,10 @@ const messages: TranslationMap = {'La búsqueda web funciona desde el principio: Exa y Gemini están incluidos con TinyHumans, sin clave de API.','onboarding.custom.search.configureDesc':'Exa y Gemini están incluidos. Añade más proveedores de búsqueda con tu propia clave de API en Ajustes › Herramientas.',+ 'onboarding.custom.search.skipForNow': 'Omitir por ahora',+ 'onboarding.custom.search.ready': 'La búsqueda web está lista.',+ 'onboarding.custom.search.notReady':+ 'Añade un proveedor abajo para que OpenHuman pueda buscar en la web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Cómo OpenHuman genera embeddings vectoriales para la búsqueda semántica en memoria.',@@ -4385,6 +4389,9 @@ const messages: TranslationMap = {'Revisa la propiedad de la bóveda, ejecuta comprobaciones de estado y ajusta los controles de memoria ahora.','onboarding.custom.vault.localDisabledReason':'La configuración administrada requiere inicio de sesión en OpenHuman y no está disponible en modo local.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'La configuración administrada requiere una cuenta de OpenHuman. En una sesión local configuras cada servicio tú mismo.',+ 'onboarding.custom.unsavedChanges': 'Guarda tus cambios antes de continuar.','onboarding.custom.vault.exitError':'No se pudo completar el proceso de incorporación. Por favor, inténtalo de nuevo.',diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.tsindex ef29af3097..99e7901eee 100644--- a/app/src/lib/i18n/fr.ts+++ b/app/src/lib/i18n/fr.ts@@ -787,6 +787,10 @@ const messages: TranslationMap = {'La recherche web fonctionne immédiatement : Exa et Gemini sont inclus avec TinyHumans, sans clé API.','onboarding.custom.search.configureDesc':"Exa et Gemini sont inclus. Ajoutez d'autres fournisseurs de recherche avec votre propre clé API dans Paramètres › Outils.",+ 'onboarding.custom.search.skipForNow': "Passer pour l'instant",+ 'onboarding.custom.search.ready': 'La recherche web est prête.',+ 'onboarding.custom.search.notReady':+ 'Ajoutez un fournisseur ci-dessous pour que OpenHuman puisse effectuer des recherches sur le web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Comment OpenHuman génère des embeddings vectoriels pour la recherche sémantique en mémoire.',@@ -4403,6 +4407,9 @@ const messages: TranslationMap = {'Vérifiez la propriété du coffre, exécutez des contrôles de santé et affinez les contrôles de mémoire maintenant.','onboarding.custom.vault.localDisabledReason':"La configuration gérée nécessite une connexion à OpenHuman et n'est pas disponible en mode local.",+ 'onboarding.custom.localDefaultDisabledReason':+ 'La configuration gérée nécessite un compte OpenHuman. Dans une session locale, vous configurez chaque service vous-même.',+ 'onboarding.custom.unsavedChanges': 'Enregistrez vos modifications avant de continuer.','onboarding.custom.vault.exitError': "Impossible de terminer l'intégration. Veuillez réessayer.",// Memory Datadiff --git a/app/src/lib/i18n/hi.ts b/app/src/lib/i18n/hi.tsindex 9634dd1e42..e12adf0083 100644--- a/app/src/lib/i18n/hi.ts+++ b/app/src/lib/i18n/hi.ts@@ -759,6 +759,9 @@ const messages: TranslationMap = {'वेब सर्च तुरंत काम करता है: Exa और Gemini, TinyHumans में शामिल हैं, कोई API कुंजी नहीं चाहिए।','onboarding.custom.search.configureDesc':'Exa और Gemini शामिल हैं। सेटिंग्स › टूल्स में अपनी API कुंजी से और सर्च प्रदाता जोड़ें।',+ 'onboarding.custom.search.skipForNow': 'अभी के लिए छोड़ें',+ 'onboarding.custom.search.ready': 'वेब सर्च तैयार है।',+ 'onboarding.custom.search.notReady': 'नीचे कोई प्रदाता जोड़ें ताकि OpenHuman वेब पर सर्च कर सके।','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'OpenHuman सिमेंटिक मेमोरी खोज के लिए वेक्टर एम्बेडिंग कैसे बनाता है।',@@ -4311,6 +4314,9 @@ const messages: TranslationMap = {'वॉल्ट स्वामित्व की समीक्षा करें, स्वास्थ्य जाँच चलाएँ और अभी मेमोरी नियंत्रण ठीक करें।','onboarding.custom.vault.localDisabledReason':'प्रबंधित सेटअप के लिए OpenHuman साइन-इन आवश्यक है और लोकल मोड में उपलब्ध नहीं है।',+ 'onboarding.custom.localDefaultDisabledReason':+ 'प्रबंधित सेटअप के लिए OpenHuman खाता आवश्यक है। लोकल सेशन में आपको हर सेवा खुद कॉन्फ़िगर करनी होती है।',+ 'onboarding.custom.unsavedChanges': 'आगे बढ़ने से पहले अपने बदलाव सहेजें।','onboarding.custom.vault.exitError': 'ऑनबोर्डिंग पूरी नहीं हो सकी। कृपया पुनः प्रयास करें।','skills.create.whenToUse': 'कब उपयोग करें','skills.create.whenToUsePlaceholder': 'उदा. जब उपयोगकर्ता अपना इनबॉक्स व्यवस्थित करने को कहे',diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.tsindex ad736b7ed9..51e6c581b2 100644--- a/app/src/lib/i18n/id.ts+++ b/app/src/lib/i18n/id.ts@@ -771,6 +771,10 @@ const messages: TranslationMap = {'Pencarian web langsung berfungsi: Exa dan Gemini sudah termasuk dalam TinyHumans, tanpa kunci API.','onboarding.custom.search.configureDesc':'Exa dan Gemini sudah termasuk. Tambahkan penyedia pencarian lain dengan kunci API milik Anda di Pengaturan › Alat.',+ 'onboarding.custom.search.skipForNow': 'Lewati untuk saat ini',+ 'onboarding.custom.search.ready': 'Pencarian web sudah siap.',+ 'onboarding.custom.search.notReady':+ 'Tambahkan penyedia di bawah agar OpenHuman dapat mencari di web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Cara OpenHuman menghasilkan embedding vektor untuk pencarian memori semantik.',@@ -4339,6 +4343,9 @@ const messages: TranslationMap = {'Tinjau kepemilikan vault, jalankan pemeriksaan kesehatan, dan sesuaikan kontrol memori sekarang.','onboarding.custom.vault.localDisabledReason':'Pengaturan terkelola memerlukan masuk OpenHuman dan tidak tersedia dalam mode lokal.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Pengaturan terkelola memerlukan akun OpenHuman. Dalam sesi lokal, Anda mengonfigurasi setiap layanan sendiri.',+ 'onboarding.custom.unsavedChanges': 'Simpan perubahan Anda sebelum melanjutkan.','onboarding.custom.vault.exitError': 'Tidak dapat menyelesaikan orientasi. Silakan coba lagi.','skills.create.whenToUse': 'Kapan digunakan','skills.create.whenToUsePlaceholder': 'mis. saat pengguna meminta untuk memilah kotak masuk',diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.tsindex 67f7673a83..6e47c380d0 100644--- a/app/src/lib/i18n/it.ts+++ b/app/src/lib/i18n/it.ts@@ -779,6 +779,10 @@ const messages: TranslationMap = {'La ricerca web funziona subito: Exa e Gemini sono inclusi con TinyHumans, senza chiave API.','onboarding.custom.search.configureDesc':'Exa e Gemini sono inclusi. Aggiungi altri fornitori di ricerca con la tua chiave API in Impostazioni › Strumenti.',+ 'onboarding.custom.search.skipForNow': 'Salta per ora',+ 'onboarding.custom.search.ready': 'La ricerca web è pronta.',+ 'onboarding.custom.search.notReady':+ 'Aggiungi un fornitore qui sotto così OpenHuman potrà cercare sul web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Come OpenHuman genera gli embedding vettoriali per la ricerca nella memoria semantica.',@@ -4378,6 +4382,9 @@ const messages: TranslationMap = {'Verifica la proprietà del vault, esegui controlli di integrità e ottimizza i controlli della memoria ora.','onboarding.custom.vault.localDisabledReason':'La configurazione gestita richiede il login a OpenHuman e non è disponibile in modalità locale.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'La configurazione gestita richiede un account OpenHuman. In una sessione locale configuri ogni servizio da solo.',+ 'onboarding.custom.unsavedChanges': 'Salva le modifiche prima di continuare.','onboarding.custom.vault.exitError': "Impossibile completare l'onboarding. Riprova.",// Memory Datadiff --git a/app/src/lib/i18n/ko.ts b/app/src/lib/i18n/ko.tsindex 57503e4740..d9adf378a7 100644--- a/app/src/lib/i18n/ko.ts+++ b/app/src/lib/i18n/ko.ts@@ -753,6 +753,9 @@ const messages: TranslationMap = {'웹 검색은 바로 작동합니다. Exa와 Gemini가 TinyHumans에 포함되어 있어 API 키가 필요 없습니다.','onboarding.custom.search.configureDesc':'Exa와 Gemini가 포함되어 있습니다. 설정 › 도구에서 본인 API 키로 검색 제공자를 더 추가하세요.',+ 'onboarding.custom.search.skipForNow': '나중에 하기',+ 'onboarding.custom.search.ready': '웹 검색이 준비되었습니다.',+ 'onboarding.custom.search.notReady': 'OpenHuman이 웹을 검색할 수 있도록 아래에 제공자를 추가하세요.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'OpenHuman이 시맨틱 메모리 검색을 위한 벡터 임베딩을 생성하는 방식입니다.',@@ -4275,6 +4278,9 @@ const messages: TranslationMap = {'볼트 소유권을 검토하고 상태 검사를 실행하며 메모리 컨트롤을 지금 조정하세요.','onboarding.custom.vault.localDisabledReason':'관리형 설정은 OpenHuman 로그인이 필요하며 로컬 모드에서는 사용할 수 없습니다.',+ 'onboarding.custom.localDefaultDisabledReason':+ '관리형 설정에는 OpenHuman 계정이 필요합니다. 로컬 세션에서는 각 서비스를 직접 설정해야 합니다.',+ 'onboarding.custom.unsavedChanges': '계속하기 전에 변경 사항을 저장하세요.','onboarding.custom.vault.exitError': '온보딩을 완료할 수 없습니다. 다시 시도해 주세요.','skills.create.whenToUse': '사용 시점','skills.create.whenToUsePlaceholder': '예: 사용자가 받은 편지함 정리를 요청할 때',diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.tsindex 755aed7004..45cc36cd72 100644--- a/app/src/lib/i18n/pl.ts+++ b/app/src/lib/i18n/pl.ts@@ -778,6 +778,10 @@ const messages: TranslationMap = {'Wyszukiwanie w sieci działa od razu: Exa i Gemini są wliczone w TinyHumans, bez klucza API.','onboarding.custom.search.configureDesc':'Exa i Gemini są wliczone. Dodaj kolejnych dostawców wyszukiwania z własnym kluczem API w Ustawienia › Narzędzia.',+ 'onboarding.custom.search.skipForNow': 'Pomiń na razie',+ 'onboarding.custom.search.ready': 'Wyszukiwanie w sieci jest gotowe.',+ 'onboarding.custom.search.notReady':+ 'Dodaj poniżej dostawcę, aby OpenHuman mógł wyszukiwać w sieci.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Jak OpenHuman generuje wektory embeddings na potrzeby wyszukiwania semantycznego.',@@ -4367,6 +4371,9 @@ const messages: TranslationMap = {'Sprawdź właściciela skarbca, uruchom kontrole stanu i dostosuj teraz ustawienia pamięci.','onboarding.custom.vault.localDisabledReason':'Konfiguracja zarządzana wymaga logowania do OpenHuman i jest niedostępna w trybie lokalnym.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Konfiguracja zarządzana wymaga konta OpenHuman. W sesji lokalnej każdą usługę konfigurujesz samodzielnie.',+ 'onboarding.custom.unsavedChanges': 'Zapisz zmiany, zanim przejdziesz dalej.','onboarding.custom.vault.exitError': 'Nie udało się zakończyć wdrożenia. Spróbuj ponownie.','skills.create.whenToUse': 'Kiedy używać','skills.create.whenToUsePlaceholder':diff --git a/app/src/lib/i18n/pt.ts b/app/src/lib/i18n/pt.tsindex 8946b81949..7178d99a9d 100644--- a/app/src/lib/i18n/pt.ts+++ b/app/src/lib/i18n/pt.ts@@ -778,6 +778,10 @@ const messages: TranslationMap = {'A pesquisa na web funciona de imediato: Exa e Gemini estão incluídos no TinyHumans, sem chave de API.','onboarding.custom.search.configureDesc':'Exa e Gemini estão incluídos. Adicione mais provedores de pesquisa com sua própria chave de API em Configurações › Ferramentas.',+ 'onboarding.custom.search.skipForNow': 'Pular por enquanto',+ 'onboarding.custom.search.ready': 'A pesquisa na web está pronta.',+ 'onboarding.custom.search.notReady':+ 'Adicione um provedor abaixo para que o OpenHuman possa pesquisar na web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Como o OpenHuman gera embeddings vetoriais para busca semântica na memória.',@@ -4367,6 +4371,9 @@ const messages: TranslationMap = {'Revise a propriedade do vault, execute verificações de integridade e ajuste os controles de memória agora.','onboarding.custom.vault.localDisabledReason':'A configuração gerenciada requer login no OpenHuman e não está disponível no modo local.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'A configuração gerenciada requer uma conta OpenHuman. Em uma sessão local, você configura cada serviço por conta própria.',+ 'onboarding.custom.unsavedChanges': 'Salve suas alterações antes de continuar.','onboarding.custom.vault.exitError':'Não foi possível concluir o processo de integração. Por favor, tente novamente.',diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.tsindex 011cf76b59..726cabd3ac 100644--- a/app/src/lib/i18n/ru.ts+++ b/app/src/lib/i18n/ru.ts@@ -770,6 +770,10 @@ const messages: TranslationMap = {'Веб-поиск работает сразу: Exa и Gemini включены в TinyHumans, API-ключ не нужен.','onboarding.custom.search.configureDesc':'Exa и Gemini уже включены. Добавьте других поисковых провайдеров со своим API-ключом в Настройки › Инструменты.',+ 'onboarding.custom.search.skipForNow': 'Пропустить пока',+ 'onboarding.custom.search.ready': 'Веб-поиск готов.',+ 'onboarding.custom.search.notReady':+ 'Добавьте провайдера ниже, чтобы OpenHuman мог искать в интернете.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Как OpenHuman создаёт векторные эмбеддинги для семантического поиска в памяти.',@@ -4353,6 +4357,9 @@ const messages: TranslationMap = {'Проверьте владельца хранилища, выполните проверки состояния и настройте параметры памяти прямо сейчас.','onboarding.custom.vault.localDisabledReason':'Управляемая настройка требует входа в OpenHuman и недоступна в локальном режиме.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Управляемая настройка требует аккаунта OpenHuman. В локальной сессии вы настраиваете каждый сервис самостоятельно.',+ 'onboarding.custom.unsavedChanges': 'Сохраните изменения, прежде чем продолжить.','onboarding.custom.vault.exitError':'Не удалось завершить настройку. Пожалуйста, попробуйте ещё раз.','skills.create.whenToUse': 'Когда использовать',diff --git a/app/src/lib/i18n/zh-CN.ts b/app/src/lib/i18n/zh-CN.tsindex 5d7b03d8d5..bfb7dfd401 100644--- a/app/src/lib/i18n/zh-CN.ts+++ b/app/src/lib/i18n/zh-CN.ts@@ -697,6 +697,9 @@ const messages: TranslationMap = {'网页搜索开箱即用:Exa 和 Gemini 已包含在 TinyHumans 中,无需 API 密钥。','onboarding.custom.search.configureDesc':'已包含 Exa 和 Gemini。可在 设置 › 工具 中使用你自己的 API 密钥添加更多搜索提供商。',+ 'onboarding.custom.search.skipForNow': '暂时跳过',+ 'onboarding.custom.search.ready': '网络搜索已就绪。',+ 'onboarding.custom.search.notReady': '请在下方添加提供商,以便 OpenHuman 搜索网络。','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle': 'OpenHuman 生成向量嵌入以实现语义记忆搜索的方式。','onboarding.custom.embeddings.defaultDesc': 'OpenHuman 使用托管嵌入服务,无需 API 密钥。',@@ -4070,6 +4073,8 @@ const messages: TranslationMap = {'使用 OpenHuman 托管的记忆默认设置。保险库路径和同步健康状态仍可稍后查看。','onboarding.custom.vault.configureDesc': '立即查看保险库所有权、运行健康检查并调整记忆控制。','onboarding.custom.vault.localDisabledReason': '托管设置需要登录 OpenHuman,在本地模式下不可用。',+ 'onboarding.custom.localDefaultDisabledReason': '托管设置需要 OpenHuman 账户。在本地会话中,你需要自行配置每项服务。',+ 'onboarding.custom.unsavedChanges': '继续之前请先保存更改。','onboarding.custom.vault.exitError': '无法完成引导流程,请重试。',// Memory Datadiff --git a/app/src/pages/onboarding/Onboarding.tsx b/app/src/pages/onboarding/Onboarding.tsxindex 517585f6cf..2482be7d67 100644--- a/app/src/pages/onboarding/Onboarding.tsx+++ b/app/src/pages/onboarding/Onboarding.tsx@@ -1,11 +1,8 @@import { Navigate, Route, Routes } from 'react-router-dom';import OnboardingLayout from './OnboardingLayout';-import CustomEmbeddingsPage from './pages/CustomEmbeddingsPage';import CustomInferencePage from './pages/CustomInferencePage';-import CustomOAuthPage from './pages/CustomOAuthPage';import CustomSearchPage from './pages/CustomSearchPage';-import CustomVoicePage from './pages/CustomVoicePage';import RuntimeChoicePage from './pages/RuntimeChoicePage';import VaultSetupStep from './pages/VaultSetupStep';import WelcomePage from './pages/WelcomePage';@@ -15,15 +12,19 @@ import WelcomePage from './pages/WelcomePage';** welcome → runtime-choice* ├── cloud → /chat- * └── custom → /custom/inference → voice → oauth → search → embeddings → vault → /chat+ * └── custom → /custom/inference → search → vault → /chat** Each custom step asks Default (let OpenHuman manage it) vs Configure* (let me pick). Default is a one-click pick; Configure renders inline* controls (or a deep-link callout to Settings, for domains not yet- * embedded). Gmail/Composio (`/onboarding/skills`) and Composio-driven- * context gathering (`/onboarding/context`) are gone from the default- * flow; their step + page files remain on disk in case we want to revive- * them later.+ * embedded). A local session skips the choice entirely and always configures.+ *+ * Voice, OAuth and embeddings are retired: six steps before a first message+ * was a forced tour of Settings, and all three stay reachable from Settings.+ * Their page files are kept unrouted so reviving a step is a route entry+ * rather than a rewrite. (An older note here claimed the same for the+ * Gmail/Composio and context steps, but those files are gone — the claim was+ * stale, so treat keeping these as a choice to confirm, not a convention.)*/const Onboarding = () => {return (@@ -33,10 +34,7 @@ const Onboarding = () => {<Route path="welcome" element={<WelcomePage />} /><Route path="runtime-choice" element={<RuntimeChoicePage />} /><Route path="custom/inference" element={<CustomInferencePage />} />- <Route path="custom/voice" element={<CustomVoicePage />} />- <Route path="custom/oauth" element={<CustomOAuthPage />} /><Route path="custom/search" element={<CustomSearchPage />} />- <Route path="custom/embeddings" element={<CustomEmbeddingsPage />} /><Route path="custom/vault" element={<VaultSetupStep />} /><Route path="*" element={<Navigate to="welcome" replace />} /></Route>diff --git a/app/src/pages/onboarding/OnboardingLayout.tsx b/app/src/pages/onboarding/OnboardingLayout.tsxindex 1c45fdc48d..a00b427e43 100644--- a/app/src/pages/onboarding/OnboardingLayout.tsx+++ b/app/src/pages/onboarding/OnboardingLayout.tsx@@ -1,9 +1,10 @@-import { useCallback, useMemo, useState } from 'react';+import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { Outlet, useNavigate } from 'react-router-dom';import { setWalkthroughPending } from '../../components/walkthrough/AppWalkthrough';import { useCoreState } from '../../providers/CoreStateProvider';import { trackEvent } from '../../services/analytics';+import { userScopedStorage } from '../../store/userScopedStorage';import { getDefaultEnabledTools, getEnabledRustToolNames } from '../../utils/toolDefinitions';import BetaBanner from './components/BetaBanner';import { OnboardingContext, type OnboardingDraft } from './OnboardingContext';@@ -13,11 +14,46 @@ import { OnboardingContext, type OnboardingDraft } from './OnboardingContext';* completion side-effects (persist `onboarding_completed`, notify backend,* navigate to /chat). Individual steps render through `<Outlet />`.*/+/** Where the in-progress draft is parked between reloads. */+const DRAFT_STORAGE_KEY = 'onboarding_draft';+const OnboardingLayout = () => {const navigate = useNavigate();const { setOnboardingCompletedFlag, setOnboardingTasks, snapshot } = useCoreState();const [draft, setDraftState] = useState<OnboardingDraft>({ connectedSources: [] });+ // The draft used to live only in React state, so a reload mid-wizard lost+ // every choice and the gate sent the user back to step one. It is per-user+ // state, so it goes through `userScopedStorage` rather than raw localStorage.+ const draftLoaded = useRef(false);++ useEffect(() => {+ let cancelled = false;+ void userScopedStorage+ .getItem(DRAFT_STORAGE_KEY)+ .then(raw => {+ if (cancelled || !raw) return;+ const parsed = JSON.parse(raw) as OnboardingDraft;+ if (parsed && Array.isArray(parsed.connectedSources)) {+ setDraftState(parsed);+ }+ })+ .catch(e => console.debug('[onboarding:layout] no resumable draft', e))+ .finally(() => {+ if (!cancelled) draftLoaded.current = true;+ });+ return () => {+ cancelled = true;+ };+ }, []);++ // Only persist after the restore has settled, so an empty initial state+ // cannot overwrite a saved draft before it is read back.+ useEffect(() => {+ if (!draftLoaded.current) return;+ void userScopedStorage.setItem(DRAFT_STORAGE_KEY, JSON.stringify(draft));+ }, [draft]);+const setDraft = useCallback((updater: (prev: OnboardingDraft) => OnboardingDraft) => setDraftState(updater),[]@@ -57,6 +93,8 @@ const OnboardingLayout = () => {try {await setOnboardingCompletedFlag(true);} catch (e) {+ // Rethrown so the calling step can offer a retry. The draft stays in+ // storage, so a retry — or a reload — resumes instead of starting over.console.error('[onboarding] Failed to persist onboarding_completed', e);throw e;}@@ -73,6 +111,10 @@ const OnboardingLayout = () => {console.warn('[onboarding:layout] could not set walkthrough pending flag; continuing', e);}+ // The run is finished; drop the resumable draft so a later visit to+ // onboarding does not inherit stale choices.+ await userScopedStorage.removeItem(DRAFT_STORAGE_KEY);+navigate('/chat', { replace: true });}, [draft.connectedSources, navigate, setOnboardingCompletedFlag, setOnboardingTasks, snapshot]);diff --git a/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsx b/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsxindex ed30d303de..ff8b6d3180 100644--- a/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsx+++ b/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsx@@ -15,8 +15,13 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import socketReducer from '../../../store/socketSlice';import threadReducer from '../../../store/threadSlice';+import { primeActiveUserId } from '../../../store/userScopedStorage';import { useOnboardingContext } from '../OnboardingContext';+// The layout parks its draft in userScopedStorage, whose reads and writes wait+// on the boot-time prime that main.tsx performs in the real app.+primeActiveUserId('test-user');+// ── Module-level mocks ─────────────────────────────────────────────────────// [#1123] Mock setWalkthroughPending to allow per-test override (e.g. throw),@@ -174,6 +179,17 @@ describe('OnboardingLayout — Joyride walkthrough integration (#1123)', () => {expect(mockCreateNewThreadArg).not.toHaveBeenCalled();});+ it('clears the persisted onboarding draft on completion', async () => {+ localStorage.setItem('test-user:onboarding_draft', JSON.stringify({ connectedSources: [] }));+ await setupLayout();++ await act(async () => {+ fireEvent.click(screen.getByTestId('complete-btn'));+ });++ expect(localStorage.getItem('test-user:onboarding_draft')).toBeNull();+ });+it('calls setOnboardingCompletedFlag(true) during completeAndExit', async () => {const { mockSetOnboardingCompletedFlag } = await setupLayout();diff --git a/app/src/pages/onboarding/components/BetaBanner.tsx b/app/src/pages/onboarding/components/BetaBanner.tsxindex c728d5cd5a..25a165b58b 100644--- a/app/src/pages/onboarding/components/BetaBanner.tsx+++ b/app/src/pages/onboarding/components/BetaBanner.tsx@@ -1,5 +1,6 @@import { useState } from 'react';+import { Alert, AlertDescription, Button, CloseIcon } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';import { DISCORD_INVITE_URL } from '../../../utils/links';@@ -27,40 +28,27 @@ const BetaBanner = () => {};return (- <div className="mb-4 flex items-start gap-3 rounded-xl border border-amber-200 dark:border-amber-500/30 bg-amber-50 dark:bg-amber-500/10 px-4 py-3">- {/* Message */}- <p className="flex-1 text-xs leading-relaxed text-content-secondary">+ <Alert variant="warning" role={undefined} className="mb-4 items-start">+ <AlertDescription className="flex-1 text-xs">{t('misc.beta')}{' '}<ahref={DISCORD_INVITE_URL}target="_blank"rel="noopener noreferrer"- className="font-medium text-amber-800 dark:text-amber-300 underline underline-offset-2 hover:text-amber-900 dark:hover:text-amber-200">+ className="font-medium underline underline-offset-2 hover:opacity-80">{t('misc.betaFeedback')}</a>- </p>-- {/* Dismiss */}- <button- type="button"+ </AlertDescription>+ <Button+ variant="tertiary"+ size="xs"+ iconOnlyaria-label={t('common.dismiss')}onClick={handleDismiss}- className="mt-0.5 shrink-0 text-content-faint hover:text-content-secondary dark:text-content-secondary transition-colors">- <svg- className="h-3.5 w-3.5"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- aria-hidden="true">- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth={2}- d="M6 18L18 6M6 6l12 12"- />- </svg>- </button>- </div>+ className="shrink-0">+ <CloseIcon className="h-3.5 w-3.5" aria-hidden="true" />+ </Button>+ </Alert>);};diff --git a/app/src/pages/onboarding/components/OnboardingNextButton.tsx b/app/src/pages/onboarding/components/OnboardingNextButton.tsxindex 2999152f6a..f3e333ef06 100644--- a/app/src/pages/onboarding/components/OnboardingNextButton.tsx+++ b/app/src/pages/onboarding/components/OnboardingNextButton.tsx@@ -1,3 +1,4 @@+import { Button } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';interface OnboardingNextButtonProps {@@ -19,17 +20,18 @@ const OnboardingNextButton = ({const effectiveLabel = label ?? t('common.continue');const effectiveLoadingLabel = loadingLabel ?? effectiveLabel;return (- <button- type="button"+ <Button+ variant="primary"+ size="lg"data-testid="onboarding-next-button"aria-label={effectiveLabel}aria-live="polite"aria-busy={loading}onClick={onClick}disabled={disabled || loading}- className="w-full py-2.5 bg-primary-500 hover:bg-primary-600 active:bg-primary-700 text-content-inverted text-sm font-medium rounded-xl transition-colors disabled:opacity-50 disabled:cursor-not-allowed focus:outline-hidden focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-neutral-900">+ className="w-full">{loading ? effectiveLoadingLabel : effectiveLabel}- </button>+ </Button>);};diff --git a/app/src/pages/onboarding/components/WizardStepper.tsx b/app/src/pages/onboarding/components/WizardStepper.tsxindex a4ed388e0e..754d1d6bdd 100644--- a/app/src/pages/onboarding/components/WizardStepper.tsx+++ b/app/src/pages/onboarding/components/WizardStepper.tsx@@ -1,3 +1,4 @@+import { CheckIcon } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';interface WizardStepperProps {@@ -53,24 +54,7 @@ const WizardStepper = ({ labels, activeIndex }: WizardStepperProps) => {/><divclassName={`flex h-6 w-6 flex-none items-center justify-center rounded-full border-2 text-[10px] font-semibold ${dotClasses}`}>- {completed ? (- <svg- viewBox="0 0 12 12"- className="h-3 w-3"- fill="none"- aria-hidden- xmlns="http://www.w3.org/2000/svg">- <path- d="M2 6.5L5 9.5L10 3.5"- stroke="currentColor"- strokeWidth="1.75"- strokeLinecap="round"- strokeLinejoin="round"- />- </svg>- ) : (- idx + 1- )}+ {completed ? <CheckIcon className="h-3 w-3" aria-hidden /> : idx + 1}</div>{/* Right connector */}<divdiff --git a/app/src/pages/onboarding/customWizardSteps.ts b/app/src/pages/onboarding/customWizardSteps.tsindex bff7fc5dea..23b0850f2e 100644--- a/app/src/pages/onboarding/customWizardSteps.ts+++ b/app/src/pages/onboarding/customWizardSteps.ts@@ -1,16 +1,14 @@import type { CustomStepKey } from './OnboardingContext';/** Ordered list of custom-wizard steps. Index drives the step counter UI and- * the back/continue navigation. */-export const CUSTOM_WIZARD_STEPS: CustomStepKey[] = [- 'inference',- 'voice',- 'oauth',- 'search',- 'embeddings',- 'vault',- // 'memory',-];+ * the back/continue navigation.+ *+ * Cut from six steps to three. Voice, OAuth and embeddings were a forced+ * linear tour of Settings standing between a self-hosting user and their+ * first message; all three remain configurable from Settings, and their step+ * page files stay on disk (same convention as the retired Gmail/Composio+ * steps — see the comment in `Onboarding.tsx`). */+export const CUSTOM_WIZARD_STEPS: CustomStepKey[] = ['inference', 'search', 'vault'];export const CUSTOM_WIZARD_ROUTES: Record<CustomStepKey, string> = {inference: '/onboarding/custom/inference',@@ -21,3 +19,24 @@ export const CUSTOM_WIZARD_ROUTES: Record<CustomStepKey, string> = {memory: '/onboarding/custom/memory',vault: '/onboarding/custom/vault',};++/**+ * The stepper label for each step key.+ *+ * This map exists so the stepper cannot disagree with `CUSTOM_WIZARD_STEPS`+ * about which label belongs to which step. It replaces a hand-ordered label+ * array that was sliced to the step count: when the wizard was cut to three+ * steps that slice silently rendered "Inference / Voice / OAuth" — the first+ * three labels of the old six-step order — instead of the three steps+ * actually on screen. Keying labels off the step itself removes the ordering+ * as something anyone has to keep in sync.+ */+export const STEP_LABEL_KEYS: Record<CustomStepKey, string> = {+ inference: 'onboarding.custom.stepperInference',+ voice: 'onboarding.custom.stepperVoice',+ oauth: 'onboarding.custom.stepperOAuth',+ search: 'onboarding.custom.stepperSearch',+ embeddings: 'onboarding.custom.stepperEmbeddings',+ memory: 'onboarding.custom.stepperMemory',+ vault: 'onboarding.custom.stepperVault',+};diff --git a/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsx b/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsxindex 27335484b5..90b3a6eb96 100644--- a/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsx+++ b/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsx@@ -1,3 +1,12 @@+/**+ * Retired onboarding step — kept on disk, not routed.+ *+ * The custom wizard was cut to inference → search → vault; voice, OAuth and+ * embeddings are all still configurable from Settings, so the step was the+ * only thing removed. The file stays so reviving the step is a route entry+ * rather than a rewrite. Note `pnpm knip` lists this as an unused file;+ * knip is not a CI gate, and deleting it is a reviewer's call.+ */import EmbeddingsPanel from '../../../components/settings/panels/EmbeddingsPanel';import CustomWizardConfigPage from './CustomWizardConfigPage';diff --git a/app/src/pages/onboarding/pages/CustomInferencePage.test.tsx b/app/src/pages/onboarding/pages/CustomInferencePage.test.tsxindex cea4639fe7..6f32536e3d 100644--- a/app/src/pages/onboarding/pages/CustomInferencePage.test.tsx+++ b/app/src/pages/onboarding/pages/CustomInferencePage.test.tsx@@ -6,6 +6,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import { I18nProvider } from '../../../lib/i18n/I18nContext';import type { Locale } from '../../../lib/i18n/types';+import { CoreStateContext } from '../../../providers/coreStateContext';import localeReducer from '../../../store/localeSlice';import CustomInferencePage from './CustomInferencePage';@@ -19,7 +20,12 @@ vi.mock('react-router-dom', async importOriginal => {});vi.mock('../../../components/settings/panels/AIPanel', () => ({- default: () => <div data-testid="ai-panel">AI Panel</div>,+ default: ({ onDirtyChange }: { onDirtyChange?: (dirty: boolean) => void }) => (+ <div data-testid="ai-panel">+ <button onClick={() => onDirtyChange?.(true)}>make-dirty</button>+ <button onClick={() => onDirtyChange?.(false)}>make-clean</button>+ </div>+ ),}));vi.mock('../../../providers/CoreStateProvider', () => ({@@ -46,9 +52,12 @@ function renderPage() {return render(<Provider store={store}><MemoryRouter>- <I18nProvider>- <CustomInferencePage />- </I18nProvider>+ <CoreStateContext.Provider+ value={{ snapshot: { sessionToken: 'header.payload.local' } } as never}>+ <I18nProvider>+ <CustomInferencePage />+ </I18nProvider>+ </CoreStateContext.Provider></MemoryRouter></Provider>);@@ -107,4 +116,25 @@ describe('CustomInferencePage', () => {await Promise.resolve();expect(navigateMock).not.toHaveBeenCalled();});++ it('blocks Continue and shows the hint while the AI panel reports unsaved edits', () => {+ renderPage();++ const next = screen.getByTestId('onboarding-next-button');+ expect(next).toBeEnabled();+ expect(screen.queryByTestId('onboarding-continue-hint')).not.toBeInTheDocument();++ fireEvent.click(screen.getByText('make-dirty'));+ expect(next).toBeDisabled();+ expect(screen.getByTestId('onboarding-continue-hint')).toHaveTextContent(+ 'Save your changes before continuing.'+ );++ fireEvent.click(next);+ expect(navigateMock).not.toHaveBeenCalled();++ fireEvent.click(screen.getByText('make-clean'));+ expect(next).toBeEnabled();+ expect(screen.queryByTestId('onboarding-continue-hint')).not.toBeInTheDocument();+ });});diff --git a/app/src/pages/onboarding/pages/CustomInferencePage.tsx b/app/src/pages/onboarding/pages/CustomInferencePage.tsxindex 35ec944108..14e1148016 100644--- a/app/src/pages/onboarding/pages/CustomInferencePage.tsx+++ b/app/src/pages/onboarding/pages/CustomInferencePage.tsx@@ -1,12 +1,33 @@+import { useState } from 'react';+import AIPanel from '../../../components/settings/panels/AIPanel';+import { useT } from '../../../lib/i18n/I18nContext';import CustomWizardConfigPage from './CustomWizardConfigPage';-const CustomInferencePage = () => (- <CustomWizardConfigPage- stepKey="inference"- backRoute="/"- configureContent={<AIPanel embedded />}- />-);+/**+ * Step 1 — pick a model provider.+ *+ * `hideTabChrome` collapses the panel to its providers view. Without it the+ * wizard inherited the full Settings surface: provider/routing chip tabs, and+ * a full-height scroll region inside a card that has no fixed height.+ *+ * The panel keeps its own `SaveBar`, so the step tracks the panel's dirty+ * state and blocks Continue while edits are pending. Continue used to navigate+ * away and drop them with no warning.+ */+const CustomInferencePage = () => {+ const { t } = useT();+ const [dirty, setDirty] = useState(false);++ return (+ <CustomWizardConfigPage+ stepKey="inference"+ backRoute="/"+ continueDisabled={dirty}+ continueHint={dirty ? t('onboarding.custom.unsavedChanges') : undefined}+ configureContent={<AIPanel embedded hideTabChrome onDirtyChange={setDirty} />}+ />+ );+};export default CustomInferencePage;diff --git a/app/src/pages/onboarding/pages/CustomOAuthPage.tsx b/app/src/pages/onboarding/pages/CustomOAuthPage.tsxindex 8c2e24600b..30f8505da7 100644--- a/app/src/pages/onboarding/pages/CustomOAuthPage.tsx+++ b/app/src/pages/onboarding/pages/CustomOAuthPage.tsx@@ -1,3 +1,12 @@+/**+ * Retired onboarding step — kept on disk, not routed.+ *+ * The custom wizard was cut to inference → search → vault; voice, OAuth and+ * embeddings are all still configurable from Settings, so the step was the+ * only thing removed. The file stays so reviving the step is a route entry+ * rather than a rewrite. Note `pnpm knip` lists this as an unused file;+ * knip is not a CI gate, and deleting it is a reviewer's call.+ */import ComposioPanel from '../../../components/settings/panels/ComposioPanel';import CustomWizardConfigPage from './CustomWizardConfigPage';diff --git a/app/src/pages/onboarding/pages/CustomSearchPage.test.tsx b/app/src/pages/onboarding/pages/CustomSearchPage.test.tsxindex 0b786654b8..b4b7cdec8e 100644--- a/app/src/pages/onboarding/pages/CustomSearchPage.test.tsx+++ b/app/src/pages/onboarding/pages/CustomSearchPage.test.tsx@@ -1,11 +1,12 @@import { configureStore } from '@reduxjs/toolkit';-import { render, screen } from '@testing-library/react';+import { fireEvent, render, screen } from '@testing-library/react';import { Provider } from 'react-redux';import { MemoryRouter } from 'react-router-dom';import { beforeEach, describe, expect, it, vi } from 'vitest';import { I18nProvider } from '../../../lib/i18n/I18nContext';import type { Locale } from '../../../lib/i18n/types';+import { CoreStateContext } from '../../../providers/coreStateContext';import localeReducer from '../../../store/localeSlice';import CustomSearchPage from './CustomSearchPage';@@ -42,9 +43,12 @@ function renderPage() {return render(<Provider store={store}><MemoryRouter>- <I18nProvider>- <CustomSearchPage />- </I18nProvider>+ <CoreStateContext.Provider+ value={{ snapshot: { sessionToken: 'header.payload.local' } } as never}>+ <I18nProvider>+ <CustomSearchPage />+ </I18nProvider>+ </CoreStateContext.Provider></MemoryRouter></Provider>);@@ -63,4 +67,12 @@ describe('CustomSearchPage', () => {expect(screen.queryByTestId('onboarding-custom-search-step-default')).not.toBeInTheDocument();expect(screen.queryByTestId('onboarding-custom-search-step-configure')).not.toBeInTheDocument();});++ it('skip navigates to the vault step without requiring a key', () => {+ renderPage();++ fireEvent.click(screen.getByTestId('onboarding-search-skip'));++ expect(navigateMock).toHaveBeenCalledWith('/onboarding/custom/vault');+ });});diff --git a/app/src/pages/onboarding/pages/CustomSearchPage.tsx b/app/src/pages/onboarding/pages/CustomSearchPage.tsxindex c27ef7c22d..8f99d0bc6d 100644--- a/app/src/pages/onboarding/pages/CustomSearchPage.tsx+++ b/app/src/pages/onboarding/pages/CustomSearchPage.tsx@@ -1,8 +1,47 @@+import { useNavigate } from 'react-router-dom';+import SearchPanel from '../../../components/settings/panels/SearchPanel';+import { Button } from '../../../components/ui';+import { useT } from '../../../lib/i18n/I18nContext';+import { trackEvent } from '../../../services/analytics';+import { CUSTOM_WIZARD_ROUTES, CUSTOM_WIZARD_STEPS } from '../customWizardSteps';import CustomWizardConfigPage from './CustomWizardConfigPage';-const CustomSearchPage = () => (- <CustomWizardConfigPage stepKey="search" configureContent={<SearchPanel embedded />} />-);+const STEP_KEY = 'search' as const;++/**+ * Step 2 — web search.+ *+ * The only genuinely optional step of the three: without a key the agent still+ * works, it just cannot read the web. Forcing a key here is how people abandon+ * setup, so the step offers an explicit skip rather than a dead Continue.+ */+const CustomSearchPage = () => {+ const { t } = useT();+ const navigate = useNavigate();+ const stepIndex = CUSTOM_WIZARD_STEPS.indexOf(STEP_KEY);++ const handleSkip = () => {+ trackEvent('onboarding_step_complete', { step_name: `custom_${STEP_KEY}`, choice: 'skipped' });+ navigate(CUSTOM_WIZARD_ROUTES[CUSTOM_WIZARD_STEPS[stepIndex + 1]]);+ };++ return (+ <CustomWizardConfigPage+ stepKey={STEP_KEY}+ configureContent={<SearchPanel embedded hideTabChrome />}+ secondaryAction={+ <Button+ variant="tertiary"+ size="sm"+ onClick={handleSkip}+ analyticsId="onboarding-search-skip"+ data-testid="onboarding-search-skip">+ {t('onboarding.custom.search.skipForNow')}+ </Button>+ }+ />+ );+};export default CustomSearchPage;diff --git a/app/src/pages/onboarding/pages/CustomVoicePage.tsx b/app/src/pages/onboarding/pages/CustomVoicePage.tsxindex 199fe7da17..90a0c16b61 100644--- a/app/src/pages/onboarding/pages/CustomVoicePage.tsx+++ b/app/src/pages/onboarding/pages/CustomVoicePage.tsx@@ -1,3 +1,12 @@+/**+ * Retired onboarding step — kept on disk, not routed.+ *+ * The custom wizard was cut to inference → search → vault; voice, OAuth and+ * embeddings are all still configurable from Settings, so the step was the+ * only thing removed. The file stays so reviving the step is a route entry+ * rather than a rewrite. Note `pnpm knip` lists this as an unused file;+ * knip is not a CI gate, and deleting it is a reviewer's call.+ */import VoicePanel from '../../../components/settings/panels/VoicePanel';import CustomWizardConfigPage from './CustomWizardConfigPage';diff --git a/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsx b/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsxindex fc704360cf..4a14d6decc 100644--- a/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsx+++ b/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsx@@ -2,10 +2,10 @@ import createDebug from 'debug';import { type ReactNode, useEffect, useState } from 'react';import { useNavigate } from 'react-router-dom';+import { useIsLocalSession } from '../../../hooks/useLocalSession';import { useT } from '../../../lib/i18n/I18nContext';import { useCoreState } from '../../../providers/CoreStateProvider';import { trackEvent } from '../../../services/analytics';-import { isLocalSessionToken } from '../../../utils/localSession';import { CUSTOM_WIZARD_ROUTES, CUSTOM_WIZARD_STEPS } from '../customWizardSteps';import {type CustomStepChoice,@@ -18,25 +18,31 @@ const log = createDebug('app:onboarding:custom');const describeError = (err: unknown): string => (err instanceof Error ? err.message : String(err));-const LOCAL_DEFAULT_DISABLED_REASON =- 'Managed setup requires OpenHuman sign-in and is unavailable in local mode.';-interface CustomWizardConfigPageProps {stepKey: CustomStepKey;configureContent: ReactNode;backRoute?: string;+ /** Block Continue while the embedded panel holds unsaved edits. */+ continueDisabled?: boolean;+ /** Shown under the footer to explain why Continue is blocked. */+ continueHint?: string;+ /** Rendered under the footer — the search step's "Skip for now". */+ secondaryAction?: ReactNode;}export default function CustomWizardConfigPage({stepKey,configureContent,backRoute,+ continueDisabled,+ continueHint,+ secondaryAction,}: CustomWizardConfigPageProps) {const { t } = useT();const navigate = useNavigate();- const { snapshot, clearSession } = useCoreState();+ const { clearSession } = useCoreState();const { draft, setDraft, completeAndExit } = useOnboardingContext();- const isLocalSession = isLocalSessionToken(snapshot.sessionToken);+ const isLocalSession = useIsLocalSession();const stepIndex = CUSTOM_WIZARD_STEPS.indexOf(stepKey);const [choice, setChoice] = useState<CustomStepChoice | null>(draft.customChoices?.[stepKey] ?? (isLocalSession ? 'configure' : null)@@ -88,10 +94,15 @@ export default function CustomWizardConfigPage({configureDescription={t(`${namespace}.configureDesc`)}configureContent={configureContent}defaultDisabled={isLocalSession}- defaultDisabledReason={isLocalSession ? LOCAL_DEFAULT_DISABLED_REASON : undefined}+ defaultDisabledReason={+ isLocalSession ? t('onboarding.custom.localDefaultDisabledReason') : undefined+ }hideChoiceCards={isLocalSession}choice={choice}onChoiceChange={persistChoice}+ continueDisabled={continueDisabled}+ continueHint={continueHint}+ secondaryAction={secondaryAction}onBack={() => void handleBack()}onContinue={async () => {trackEvent('onboarding_step_complete', {diff --git a/app/src/pages/onboarding/pages/RuntimeChoicePage.tsx b/app/src/pages/onboarding/pages/RuntimeChoicePage.tsxindex be457e3381..21f9750ff3 100644--- a/app/src/pages/onboarding/pages/RuntimeChoicePage.tsx+++ b/app/src/pages/onboarding/pages/RuntimeChoicePage.tsx@@ -1,6 +1,7 @@import { useEffect, useState } from 'react';import { useNavigate } from 'react-router-dom';+import { Alert, AlertDescription } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';import { useCoreState } from '../../../providers/CoreStateProvider';import { trackEvent } from '../../../services/analytics';@@ -49,11 +50,12 @@ const RuntimeChoicePage = () => {}}/>{exitError ? (- <div- className="mt-3 rounded-xl border border-coral-200 dark:border-coral-500/30 bg-coral-50 dark:bg-coral-500/10 px-4 py-3 text-sm text-coral-700 dark:text-coral-300"+ <Alert+ variant="destructive"+ className="mt-3"data-testid="onboarding-runtime-choice-exit-error">- {t('onboarding.runtimeChoice.exitError')}- </div>+ <AlertDescription>{t('onboarding.runtimeChoice.exitError')}</AlertDescription>+ </Alert>) : null}</>);diff --git a/app/src/pages/onboarding/pages/VaultSetupStep.test.tsx b/app/src/pages/onboarding/pages/VaultSetupStep.test.tsxindex d76f7ce050..2085009708 100644--- a/app/src/pages/onboarding/pages/VaultSetupStep.test.tsx+++ b/app/src/pages/onboarding/pages/VaultSetupStep.test.tsx@@ -6,6 +6,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import { I18nProvider } from '../../../lib/i18n/I18nContext';import type { Locale } from '../../../lib/i18n/types';+import { CoreStateContext } from '../../../providers/coreStateContext';import localeReducer from '../../../store/localeSlice';import VaultSetupStep from './VaultSetupStep';@@ -45,9 +46,11 @@ function renderPage() {return render(<Provider store={store}><MemoryRouter>- <I18nProvider>- <VaultSetupStep />- </I18nProvider>+ <CoreStateContext.Provider value={{ snapshot: { sessionToken } } as never}>+ <I18nProvider>+ <VaultSetupStep />+ </I18nProvider>+ </CoreStateContext.Provider></MemoryRouter></Provider>);diff --git a/app/src/pages/onboarding/pages/VaultSetupStep.tsx b/app/src/pages/onboarding/pages/VaultSetupStep.tsxindex 7ae8b0eb0b..2e5f35b203 100644--- a/app/src/pages/onboarding/pages/VaultSetupStep.tsx+++ b/app/src/pages/onboarding/pages/VaultSetupStep.tsx@@ -1,11 +1,11 @@-import { useCallback, useMemo, useRef, useState } from 'react';+import { useCallback, useEffect, useMemo, useState } from 'react';import { useNavigate } from 'react-router-dom';import MemoryEngineSetup from '../../../components/memory/MemoryEngineSetup';+import { Alert, AlertDescription } from '../../../components/ui';+import { useIsLocalSession } from '../../../hooks/useLocalSession';import { useT } from '../../../lib/i18n/I18nContext';-import { useCoreState } from '../../../providers/CoreStateProvider';import { trackEvent } from '../../../services/analytics';-import { isLocalSessionToken } from '../../../utils/localSession';import { CUSTOM_WIZARD_ROUTES, CUSTOM_WIZARD_STEPS } from '../customWizardSteps';import { type CustomStepChoice, useOnboardingContext } from '../OnboardingContext';import CustomWizardStep from '../steps/CustomWizardStep';@@ -15,26 +15,26 @@ const STEP_KEY = 'vault' as const;export default function VaultSetupStep() {const { t } = useT();const navigate = useNavigate();- const { snapshot } = useCoreState();const { draft, setDraft, completeAndExit } = useOnboardingContext();const stepIndex = CUSTOM_WIZARD_STEPS.indexOf(STEP_KEY);- const isLocalSession = isLocalSessionToken(snapshot.sessionToken);+ const isLocalSession = useIsLocalSession();- const appliedLocalRef = useRef(false);const initialChoice = isLocalSession ? 'configure' : (draft.customChoices?.[STEP_KEY] ?? null);const [choice, setChoice] = useState<CustomStepChoice | null>(initialChoice);const [exitError, setExitError] = useState<string | null>(null);- if (isLocalSession && !appliedLocalRef.current) {- appliedLocalRef.current = true;- if (choice !== 'configure') {- setChoice('configure');- }+ // A local session has no managed option to choose between, so the step is+ // pinned to `configure`. This runs as an effect, matching every other step+ // (`CustomWizardConfigPage`); it used to be a ref-guarded setState during+ // render, which is the same intent written a second, riskier way.+ useEffect(() => {+ if (!isLocalSession) return;+ setChoice('configure');setDraft(prev => ({...prev,customChoices: { ...prev.customChoices, [STEP_KEY]: 'configure' },}));- }+ }, [isLocalSession, setDraft]);const persistChoice = useCallback((next: CustomStepChoice) => {@@ -82,11 +82,9 @@ export default function VaultSetupStep() {continueLabel={t('onboarding.custom.finish')}/>{exitError ? (- <div- className="mt-3 rounded-xl border border-coral-200 dark:border-coral-500/30 bg-coral-50 dark:bg-coral-500/10 px-4 py-3 text-sm text-coral-700 dark:text-coral-300"- data-testid="onboarding-vault-exit-error">- {t('onboarding.custom.vault.exitError')}- </div>+ <Alert variant="destructive" className="mt-3" data-testid="onboarding-vault-exit-error">+ <AlertDescription>{t('onboarding.custom.vault.exitError')}</AlertDescription>+ </Alert>) : null}</>);diff --git a/app/src/pages/onboarding/steps/CustomWizardStep.tsx b/app/src/pages/onboarding/steps/CustomWizardStep.tsxindex 3903eb49c8..deed396aef 100644--- a/app/src/pages/onboarding/steps/CustomWizardStep.tsx+++ b/app/src/pages/onboarding/steps/CustomWizardStep.tsx@@ -1,52 +1,12 @@import { type ReactNode, useState } from 'react';-import Button from '../../../components/ui/Button';+import { Button, Card, Tile, TileGrid } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';import OnboardingNextButton from '../components/OnboardingNextButton';import WizardStepper from '../components/WizardStepper';+import { CUSTOM_WIZARD_STEPS, STEP_LABEL_KEYS } from '../customWizardSteps';import type { CustomStepChoice } from '../OnboardingContext';-interface ChoiceCardProps {- selected: boolean;- onClick: () => void;- accent: 'sage' | 'primary';- title: string;- description: string;- testId: string;- disabled?: boolean;-}--const ChoiceCard = ({- selected,- onClick,- accent,- title,- description,- testId,- disabled = false,-}: ChoiceCardProps) => {- const selectedClasses =- accent === 'sage'- ? 'border-sage-500! bg-sage-50 dark:bg-sage-500/10 shadow-xs'- : 'border-primary-500! bg-primary-50 dark:bg-primary-500/15 shadow-xs';- return (- <button- type="button"- onClick={onClick}- disabled={disabled}- aria-pressed={selected}- data-testid={testId}- className={`flex h-full w-full flex-col rounded-2xl border-2 p-5 text-left transition-colors focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-60 ${- selected- ? selectedClasses- : 'border-line! bg-surface hover:border-line-strong! dark:hover:border-line-strong! hover:bg-surface-hover'- }`}>- <h3 className="text-base font-semibold text-content">{title}</h3>- <p className="mt-1 text-xs text-content-secondary leading-relaxed">{description}</p>- </button>- );-};-interface CustomWizardStepProps {stepIndex: number;stepCount: number;@@ -71,6 +31,10 @@ interface CustomWizardStepProps {defaultDisabled?: boolean;defaultDisabledReason?: string;hideChoiceCards?: boolean;+ /** Explains a blocked Continue (e.g. the panel has unsaved edits). */+ continueHint?: string;+ /** Rendered beneath the footer — the search step's "Skip for now". */+ secondaryAction?: ReactNode;}const CustomWizardStep = ({@@ -93,6 +57,8 @@ const CustomWizardStep = ({defaultDisabled = false,defaultDisabledReason,hideChoiceCards = false,+ continueHint,+ secondaryAction,}: CustomWizardStepProps) => {const { t } = useT();const [isContinuing, setIsContinuing] = useState(false);@@ -107,46 +73,77 @@ const CustomWizardStep = ({}};- const stepperLabels = [- t('onboarding.custom.stepperInference'),- t('onboarding.custom.stepperVoice'),- t('onboarding.custom.stepperOAuth'),- t('onboarding.custom.stepperSearch'),- t('onboarding.custom.stepperEmbeddings'),- t('onboarding.custom.stepperVault'),- t('onboarding.custom.stepperMemory'),- ].slice(0, stepCount);+ // Derived from the step list itself rather than a parallel hand-ordered+ // array, which could be — and was — sliced into labels belonging to steps+ // that are no longer rendered. See STEP_LABEL_KEYS.+ const stepperLabels = CUSTOM_WIZARD_STEPS.map(key => t(STEP_LABEL_KEYS[key]));++ const rootTestId = testId ?? 'onboarding-custom-wizard-step';+ const choiceGroupName = `${rootTestId}-choice`;+ const defaultRadioId = `${rootTestId}-choice-default`;+ const configureRadioId = `${rootTestId}-choice-configure`;return (- <div- data-testid={testId ?? 'onboarding-custom-wizard-step'}- className="rounded-2xl bg-surface p-10 shadow-soft animate-fade-up">+ <Card+ padded+ divided={false}+ data-testid={rootTestId}+ className="animate-fade-up p-6 shadow-soft sm:p-8"><WizardStepper labels={stepperLabels} activeIndex={stepIndex} />- <h1 className="mt-8 text-2xl font-title text-content leading-tight">{title}</h1>+ <p+ className="mt-8 text-[11px] font-medium uppercase tracking-wide text-content-faint"+ data-testid="onboarding-step-counter">+ {t('onboarding.custom.stepCounter')+ .replace('{n}', String(stepIndex + 1))+ .replace('{total}', String(stepCount))}+ </p>+ <h1 className="mt-1 text-2xl font-title text-content leading-tight">{title}</h1><p className="mt-2 text-sm text-content-muted leading-relaxed">{subtitle}</p>{!hideChoiceCards ? (<>- <div className="mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 sm:items-stretch">- <ChoiceCard- testId={`${testId ?? 'onboarding-custom-wizard-step'}-default`}- accent="sage"- selected={choice === 'default'}- onClick={() => onChoiceChange('default')}- disabled={defaultDisabled}+ {/* `Tile` carries the selected/muted states the two hand-rolled+ choice buttons used to reimplement with `border-2` and `!`+ important overrides. */}+ <TileGrid columns={2} className="mt-6">+ <Tile+ data-testid={`${rootTestId}-default`}+ htmlFor={defaultRadioId}title={t('onboarding.custom.defaultTitle')}description={defaultDescription || t('onboarding.custom.defaultSubtitle')}+ selected={choice === 'default'}+ muted={defaultDisabled}+ control={+ <input+ id={defaultRadioId}+ type="radio"+ name={choiceGroupName}+ className="mt-0.5 size-4 accent-primary-500"+ checked={choice === 'default'}+ disabled={defaultDisabled}+ onChange={() => onChoiceChange('default')}+ />+ }/>- <ChoiceCard- testId={`${testId ?? 'onboarding-custom-wizard-step'}-configure`}- accent="primary"- selected={choice === 'configure'}- onClick={() => onChoiceChange('configure')}+ <Tile+ data-testid={`${rootTestId}-configure`}+ htmlFor={configureRadioId}title={t('onboarding.custom.configureTitle')}description={configureDescription || t('onboarding.custom.configureSubtitle')}+ selected={choice === 'configure'}+ control={+ <input+ id={configureRadioId}+ type="radio"+ name={choiceGroupName}+ className="mt-0.5 size-4 accent-primary-500"+ checked={choice === 'configure'}+ onChange={() => onChoiceChange('configure')}+ />+ }/>- </div>+ </TileGrid>{defaultDisabled && defaultDisabledReason ? (<p className="mt-3 text-xs text-content-muted leading-relaxed">@@ -156,17 +153,21 @@ const CustomWizardStep = ({</>) : null}+ {/* No wrapper card here: the embedded panels are themselves `Card`s, and+ nesting one in another produced a card-in-a-card. */}{(choice === 'configure' || hideChoiceCards) && configureContent ? (- <div className="mt-6 rounded-2xl border border-line bg-surface-muted p-5">- {configureContent}- </div>+ <div className="mt-6">{configureContent}</div>) : null}- <div className="mt-8 flex items-center gap-3">- <Button variant="secondary" onClick={onBack}>+ {/* Back and Continue carry equal width. Continue used to sit in a+ `flex-1` wrapper beside an intrinsically-sized Back, so the primary+ action ran the width of the card while Back shrank to its label —+ a hierarchy nobody chose. */}+ <div className="mt-8 flex items-stretch gap-3">+ <Button variant="secondary" onClick={onBack} className="flex-1 basis-0">{t('onboarding.custom.back')}</Button>- <div className="flex-1">+ <div className="flex-1 basis-0"><OnboardingNextButtonlabel={continueLabel ?? t('onboarding.custom.continue')}onClick={() => void handleContinue()}@@ -176,7 +177,17 @@ const CustomWizardStep = ({/></div></div>- </div>++ {continueHint ? (+ <p+ className="mt-3 text-center text-xs text-amber-700 dark:text-amber-300"+ data-testid="onboarding-continue-hint">+ {continueHint}+ </p>+ ) : null}++ {secondaryAction ? <div className="mt-3 flex justify-center">{secondaryAction}</div> : null}+ </Card>);};diff --git a/app/src/pages/onboarding/steps/WelcomeStep.tsx b/app/src/pages/onboarding/steps/WelcomeStep.tsxindex 0d7bf7b0e0..73260de5f0 100644--- a/app/src/pages/onboarding/steps/WelcomeStep.tsx+++ b/app/src/pages/onboarding/steps/WelcomeStep.tsx@@ -1,3 +1,4 @@+import { Card } from '../../../components/ui';import WhatLeavesLink from '../../../features/privacy/WhatLeavesLink';import { useT } from '../../../lib/i18n/I18nContext';import OnboardingNextButton from '../components/OnboardingNextButton';@@ -9,9 +10,11 @@ interface WelcomeStepProps {const WelcomeStep = ({ onNext }: WelcomeStepProps) => {const { t } = useT();return (- <div+ <Card+ padded+ divided={false}data-testid="onboarding-welcome-step"- className="rounded-2xl bg-surface p-10 shadow-soft animate-fade-up">+ className="animate-fade-up p-6 shadow-soft sm:p-8"><div className="flex flex-col items-center text-center"><img src="/logo.png" alt="OpenHuman" className="w-20 h-20 rounded-2xl mb-5" /><h1 className="text-3xl font-title text-content mb-3 leading-tight">@@ -27,7 +30,7 @@ const WelcomeStep = ({ onNext }: WelcomeStepProps) => {<div className="mt-4 flex justify-center"><WhatLeavesLink /></div>- </div>+ </Card>);};diff --git a/app/src/pages/onboarding/steps/__tests__/CustomWizardStep.test.tsx b/app/src/pages/onboarding/steps/__tests__/CustomWizardStep.test.tsxnew file mode 100644index 0000000000..bde93cae30--- /dev/null+++ b/app/src/pages/onboarding/steps/__tests__/CustomWizardStep.test.tsx@@ -0,0 +1,62 @@+import { configureStore } from '@reduxjs/toolkit';+import { render, screen, within } from '@testing-library/react';+import { Provider } from 'react-redux';+import { describe, expect, it, vi } from 'vitest';++import { I18nProvider } from '../../../../lib/i18n/I18nContext';+import type { Locale } from '../../../../lib/i18n/types';+import localeReducer from '../../../../store/localeSlice';+import { CUSTOM_WIZARD_STEPS } from '../../customWizardSteps';+import CustomWizardStep from '../CustomWizardStep';++function renderStep(stepIndex: number) {+ const store = configureStore({+ reducer: { locale: localeReducer },+ preloadedState: { locale: { current: 'en' as Locale } },+ });+ return render(+ <Provider store={store}>+ <I18nProvider>+ <CustomWizardStep+ stepIndex={stepIndex}+ stepCount={CUSTOM_WIZARD_STEPS.length}+ title="Title"+ subtitle="Subtitle"+ defaultDescription="d"+ configureDescription="c"+ choice="configure"+ onChoiceChange={vi.fn()}+ onBack={vi.fn()}+ onContinue={vi.fn()}+ />+ </I18nProvider>+ </Provider>+ );+}++describe('CustomWizardStep stepper', () => {+ it('labels the three steps Inference, Search and Vault in order', () => {+ renderStep(0);++ const items = within(screen.getByTestId('onboarding-wizard-stepper')).getAllByRole('listitem');+ // Regression guard: a hand-ordered label array sliced to the step count+ // rendered "Inference / Voice / OAuth" here.+ expect(items.map(li => li.textContent?.replace(/^\d+/, '').trim())).toEqual([+ 'Inference',+ 'Search',+ 'Vault',+ ]);+ expect(screen.queryByText('Voice')).not.toBeInTheDocument();+ expect(screen.queryByText('OAuth')).not.toBeInTheDocument();+ });++ it('marks the active step and shows the n-of-total counter', () => {+ renderStep(1);++ const items = within(screen.getByTestId('onboarding-wizard-stepper')).getAllByRole('listitem');+ expect(items[1]).toHaveAttribute('aria-current', 'step');+ expect(items[0]).not.toHaveAttribute('aria-current');+ expect(screen.getByTestId('onboarding-step-counter')).toHaveTextContent('2');+ expect(screen.getByTestId('onboarding-step-counter')).toHaveTextContent('3');+ });+});diff --git a/app/test/e2e/specs/onboarding-modes.spec.ts b/app/test/e2e/specs/onboarding-modes.spec.tsindex f6e230cacd..39c79a51af 100644--- a/app/test/e2e/specs/onboarding-modes.spec.ts+++ b/app/test/e2e/specs/onboarding-modes.spec.ts@@ -9,23 +9,23 @@** - Phase B — Advanced/Custom path (Default on every wizard step):* reset onboarding flag → Welcome → Runtime choice (Custom) →- * Inference (Default) → Voice (Default) → OAuth (Default) →- * Search (Default) → Embeddings (Default) → Finish.- * Asserts all five custom wizard step containers render with the- * expected `data-testid`s (i.e. *all settings are reachable*).+ * Inference (Default) → Search (Default) → Vault (Finish).+ * The custom wizard is exactly three steps; Voice, OAuth and Embeddings+ * are no longer part of it (they stay configurable from Settings).+ * Asserts each of the three step containers renders with the expected+ * `data-testid`, that the stepper shows Inference / Search / Vault and+ * that the retired steps are never mounted.*- * - Phase C — Advanced/Custom path with Configure on the Voice step:- * pick Configure, the embedded VoicePanel renders. Flip the STT- * provider selector and assert `config.toml` updates- * `local_ai.stt_provider` within a few seconds (i.e. advanced voice- * provider settings apply immediately to persisted config).+ * - Phase C — Advanced/Custom path using "Skip for now" on the optional+ * Search step: Inference (Default) → Search (skip, no key configured) →+ * Vault (Finish), and `onboarding_completed = true` lands in config.toml.** Auth is the bypass deep-link path. The mock API server runs on the same* port the dist bundle was built against (see `app/scripts/e2e-run-session.sh`).* No real network is touched.*/import { waitForAppReady, waitForAuthBootstrap } from '../helpers/app-helpers';-import { readBool, readConfigToml, readSectionString, topLevelValue } from '../helpers/config-toml';+import { readBool, readConfigToml, topLevelValue } from '../helpers/config-toml';import { callOpenhumanRpc } from '../helpers/core-rpc';import { triggerAuthDeepLinkBypass } from '../helpers/deep-link-helpers';import { waitForWebView, waitForWindowVisible } from '../helpers/element-helpers';@@ -171,6 +171,16 @@ async function waitForCustomSelection(timeout = 5_000): Promise<boolean> {return false;}+/** Rendered stepper labels of the custom wizard, in DOM order. */+async function stepperLabels(): Promise<string[]> {+ return browser.execute(() => {+ const items = document.querySelectorAll('[data-testid="onboarding-wizard-stepper"] > li');+ return Array.from(items).map(li =>+ (li.querySelector('span:last-child')?.textContent ?? '').trim()+ );+ });+}+async function advanceFromWelcomeToCustomInference(phase: string): Promise<void> {const reachedChoiceOrInference = await browser.waitUntil(@@ -333,43 +343,29 @@ describe('Onboarding modes — Simple (Cloud) vs Advanced (Custom)', function ()// Phase B — Advanced (Custom), Default on every step// ───────────────────────────────────────────────────────────────────────- it('advanced/custom path: walks all wizard steps with Default choice', async function () {+ it('advanced/custom path: walks the three wizard steps with Default choice', async function () {// resetOnboardingFlagAndReload includes waitForWindowVisible(25_000), needs extra budget.this.timeout(90_000);await resetOnboardingFlagAndReload();await advanceFromWelcomeToCustomInference('Phase B');- // Step 2 — Custom Inference (Default).+ // Step 1 of 3 — Custom Inference (Default). The stepper must list exactly+ // the three live steps, in order.+ expect(await testIdExists('onboarding-custom-inference-step', 10_000)).toBe(true);+ expect(await stepperLabels()).toEqual(['Inference', 'Search', 'Vault']);expect(await clickTestId('onboarding-custom-inference-step-default')).toBe(true);await pause(400);await clickOnboardingNext();- // Step 3 — Custom Voice (Default).- expect(await testIdExists('onboarding-custom-voice-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-voice-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 4 — Custom OAuth (Default).- expect(await testIdExists('onboarding-custom-oauth-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-oauth-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 5 — Custom Search (Default).+ // Step 2 of 3 — Custom Search (Default).expect(await testIdExists('onboarding-custom-search-step', 10_000)).toBe(true);+ expect(await stepperLabels()).toEqual(['Inference', 'Search', 'Vault']);expect(await clickTestId('onboarding-custom-search-step-default')).toBe(true);await pause(400);await clickOnboardingNext();- // Step 6 — Custom Embeddings (Default).- expect(await testIdExists('onboarding-custom-embeddings-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-embeddings-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 7 — Custom Vault. Final step → Finish. VaultSetupStep hides the+ // Step 3 of 3 — Custom Vault. Final step → Finish. VaultSetupStep hides the// choice cards and auto-selects "configure" only for LOCAL sessions// (`defaultDisabled={isLocalSession}`); the E2E logs in via the cloud-auth// deep link, so the session is non-local — the choice cards ARE shown with@@ -383,6 +379,11 @@ describe('Onboarding modes — Simple (Cloud) vs Advanced (Custom)', function ()await pause(400);await clickOnboardingNext();+ // The retired steps must never have been part of the flow.+ expect(await testIdExists('onboarding-custom-voice-step', 500)).toBe(false);+ expect(await testIdExists('onboarding-custom-oauth-step', 500)).toBe(false);+ expect(await testIdExists('onboarding-custom-embeddings-step', 500)).toBe(false);+const landed = await waitForHome(20_000);if (!landed) stepLog(`current hash after custom finish: ${await currentHash()}`);expect(landed).toBe(true);@@ -399,10 +400,10 @@ describe('Onboarding modes — Simple (Cloud) vs Advanced (Custom)', function ()});// ───────────────────────────────────────────────────────────────────────- // Phase C — Advanced (Custom), Configure on Voice mutates config.toml+ // Phase C — Advanced (Custom), skip the optional Search step// ───────────────────────────────────────────────────────────────────────- it('advanced/custom path: Configure on Voice updates local_ai.stt_provider in config.toml', async function () {+ it('advanced/custom path: Skip for now on Search advances to Vault and completes onboarding', async function () {// resetOnboardingFlagAndReload includes waitForWindowVisible(25_000), needs extra budget.this.timeout(90_000);await resetOnboardingFlagAndReload();@@ -414,98 +415,12 @@ describe('Onboarding modes — Simple (Cloud) vs Advanced (Custom)', function ()await pause(400);await clickOnboardingNext();- // Voice step → Configure → embedded VoicePanel renders. The auto-start- // checkbox + Save button only render when local STT assets (Whisper) are- // installed (`disabled = !sttReady` gates that block). In the CI- // container we don't ship those assets, so we drive the always-visible- // provider selectors instead — flipping the STT provider fires- // `voice_set_providers`, which writes `config.local_ai.stt_provider`- // to `config.toml` via `config.save()`.- expect(await testIdExists('onboarding-custom-voice-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-voice-step-configure')).toBe(true);- expect(await testIdExists('voice-providers-section', 10_000)).toBe(true);- expect(await testIdExists('stt-provider-select', 10_000)).toBe(true);-- const before = readSectionString(readConfigToml(), 'local_ai', 'stt_provider');-- // Flip to a genuinely SELECTABLE provider. Local STT providers- // (whisper/piper) render as `<option disabled>` in the CI container (no- // local assets), so a synthetic change to them reverts and never persists —- // asserting `stt_provider === 'whisper'` can never pass here. Pick an- // enabled option whose value differs from the current selection and read- // back the value the control actually committed to.- const want = await browser.execute(() => {- const el = document.querySelector<HTMLSelectElement>('[data-testid="stt-provider-select"]');- if (!el) return null;- const current = el.value;- const candidate = Array.from(el.options).find(- o => !o.disabled && o.value && o.value !== current- );- if (!candidate) return null;- const setter = Object.getOwnPropertyDescriptor(- window.HTMLSelectElement.prototype,- 'value'- )?.set;- if (setter) setter.call(el, candidate.value);- else el.value = candidate.value;- el.dispatchEvent(new Event('change', { bubbles: true }));- // A disabled option would revert; an enabled one sticks.- return el.value === candidate.value ? candidate.value : null;- });-- if (!want) {- stepLog(- 'No alternate selectable STT provider in this environment — skipping the provider-flip persistence assertion'- );- return;- }- stepLog(`stt_provider before=${before ?? '<unset>'} → want=${want}`);-- // Voice Routing was decoupled into staged edit + explicit Save: the select's- // onChange only stages `sttProvider` (VoicePanel `onSttProviderChange`);- // persistence to config.toml happens on the always-rendered Save button- // (`save-voice-routing`, enabled once there are routing changes). Click it so- // the staged provider actually writes through.- expect(await clickTestId('save-voice-routing')).toBe(true);-- // Poll config.toml for the new value.- let onDisk: string | null = null;- const deadline = Date.now() + 10_000;- while (Date.now() < deadline) {- onDisk = readSectionString(readConfigToml(), 'local_ai', 'stt_provider');- if (onDisk === want) break;- await pause(500);- }- if (onDisk !== want) {- stepLog(- `local_ai.stt_provider expected=${want} got=${onDisk ?? '<unset>'}; config.toml:\n` +- readConfigToml()- );- }- expect(onDisk).toBe(want);-- // Continue out of the wizard so the spec leaves the app on /home.- await clickOnboardingNext();- expect(await testIdExists('onboarding-custom-oauth-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-oauth-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 5 — Custom Search (Default).+ // Search is the one genuinely optional step: the skip control moves on+ // without a key configured, straight to the Vault step.expect(await testIdExists('onboarding-custom-search-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-search-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 6 — Custom Embeddings (Default).- expect(await testIdExists('onboarding-custom-embeddings-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-embeddings-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();+ expect(await testIdExists('onboarding-search-skip', 5_000)).toBe(true);+ expect(await clickTestId('onboarding-search-skip')).toBe(true);- // Step 7 — Custom Vault. Final step → Finish. Choice cards are hidden/auto-- // configured only for LOCAL sessions; the E2E's cloud-auth session shows the- // cards with an enabled default that must be picked before Finish enables.expect(await testIdExists('onboarding-custom-vault-step', 10_000)).toBe(true);if (await testIdExists('onboarding-custom-vault-step-default', 2_000)) {await clickTestId('onboarding-custom-vault-step-default');@@ -514,5 +429,14 @@ describe('Onboarding modes — Simple (Cloud) vs Advanced (Custom)', function ()await clickOnboardingNext();expect(await waitForHome(20_000)).toBe(true);++ let value: boolean | null = null;+ const deadline = Date.now() + 8_000;+ while (Date.now() < deadline) {+ value = readBool(topLevelValue(readConfigToml(), 'onboarding_completed'));+ if (value === true) break;+ await pause(400);+ }+ expect(value).toBe(true);});});diff --git a/app/test/playwright/specs/onboarding-config-functional.spec.ts b/app/test/playwright/specs/onboarding-config-functional.spec.tsindex fc206572d7..0b43c12075 100644--- a/app/test/playwright/specs/onboarding-config-functional.spec.ts+++ b/app/test/playwright/specs/onboarding-config-functional.spec.ts@@ -18,7 +18,7 @@ async function resetOnboarding(userId: string): Promise<void> {}async function chooseConfigure(page: Page): Promise<void> {- const configure = page.getByRole('button', { name: /Configure/ }).first();+ const configure = page.getByRole('radio', { name: /Configure/ }).first();if (await configure.isVisible().catch(() => false)) {await configure.click();}@@ -44,30 +44,17 @@ test.describe('Onboarding custom configuration flow', () => {await chooseConfigure(page);await page.getByTestId('onboarding-next-button').click();- await expect(page.getByTestId('onboarding-custom-voice-step')).toBeVisible();+ await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible();await chooseConfigure(page);await page.getByRole('button', { name: /Back/ }).click();await expect(page.getByTestId('onboarding-custom-inference-step')).toBeVisible();await page.getByTestId('onboarding-next-button').click();- for (const id of [- 'onboarding-custom-voice-step',- 'onboarding-custom-oauth-step',- 'onboarding-custom-search-step',- 'onboarding-custom-embeddings-step',- ]) {- await expect(page.getByTestId(id)).toBeVisible({ timeout: 20_000 });- const configure = page.getByRole('button', { name: /Configure/ });- if (- await configure- .first()- .isVisible()- .catch(() => false)- ) {- await configure.first().click();- }- await page.getByTestId('onboarding-next-button').click();- }+ await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible({+ timeout: 20_000,+ });+ // Search is optional: skipping goes straight to the final step.+ await page.getByTestId('onboarding-search-skip').click();await expect(page.getByTestId('onboarding-custom-vault-step')).toBeVisible({ timeout: 20_000 });await chooseConfigure(page);diff --git a/app/test/playwright/specs/onboarding-modes.spec.ts b/app/test/playwright/specs/onboarding-modes.spec.tsindex 8eb04deab4..2d4a35aeae 100644--- a/app/test/playwright/specs/onboarding-modes.spec.ts+++ b/app/test/playwright/specs/onboarding-modes.spec.ts@@ -93,7 +93,7 @@ test.describe('Onboarding modes', () => {await expectOnboardingCompleted();});- test('advanced custom path walks every custom wizard step and finishes on home', async ({+ test('advanced custom path walks the three custom wizard steps and finishes on home', async ({page,}) => {await bootIntoOnboarding(page, 'pw-onboarding-custom');@@ -111,26 +111,17 @@ test.describe('Onboarding modes', () => {expect(await clickTestId(page, 'onboarding-custom-inference-step-default')).toBe(true);expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);- await expect(page.getByTestId('onboarding-custom-voice-step')).toBeVisible();- expect(await clickTestId(page, 'onboarding-custom-voice-step-default')).toBe(true);- expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);-- await expect(page.getByTestId('onboarding-custom-oauth-step')).toBeVisible();- expect(await clickTestId(page, 'onboarding-custom-oauth-step-default')).toBe(true);- expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);-await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible();expect(await clickTestId(page, 'onboarding-custom-search-step-default')).toBe(true);expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);- const embeddingsVisible = await page- .getByTestId('onboarding-custom-embeddings-step')- .isVisible()- .catch(() => false);- if (embeddingsVisible) {- expect(await clickTestId(page, 'onboarding-custom-embeddings-step-default')).toBe(true);- expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);+ await expect(page.getByTestId('onboarding-custom-vault-step')).toBeVisible();+ // Voice, OAuth and embeddings are no longer wizard steps.+ for (const retired of ['voice', 'oauth', 'embeddings']) {+ await expect(page.getByTestId(`onboarding-custom-${retired}-step`)).toHaveCount(0);}+ expect(await clickTestId(page, 'onboarding-custom-vault-step-default')).toBe(true);+ expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);await ensureHomeOrForceComplete(page);await expectOnboardingCompleted();