🙌 OpenHands: AI-Driven Development
Polish onboarding modal flow and final-step UX (#1095)
FraterCCCLXIII098f8893bad9
diff --git a/__tests__/components/onboarding/onboarding-modal.test.tsx b/__tests__/components/onboarding/onboarding-modal.test.tsxindex 49b9a43c54..e0a4cff877 100644--- a/__tests__/components/onboarding/onboarding-modal.test.tsx+++ b/__tests__/components/onboarding/onboarding-modal.test.tsx@@ -98,13 +98,8 @@ vi.mock("#/hooks/query/use-acp-auth-status", () => ({}),}));-async function completeBackendStep(user: ReturnType<typeof userEvent.setup>) {- await waitFor(- () =>- expect(screen.getByTestId("onboarding-backend-next")).not.toBeDisabled(),- { timeout: 3000 },- );- await user.click(screen.getByTestId("onboarding-backend-next"));+async function completeAgentStep(user: ReturnType<typeof userEvent.setup>) {+ await user.click(screen.getByTestId("onboarding-agent-next"));await waitFor(() =>expect(screen.getByTestId("onboarding-modal")).toHaveAttribute(@@ -115,8 +110,13 @@ async function completeBackendStep(user: ReturnType<typeof userEvent.setup>) {);}-async function completeAgentStep(user: ReturnType<typeof userEvent.setup>) {- await user.click(screen.getByTestId("onboarding-agent-next"));+async function completeBackendStep(user: ReturnType<typeof userEvent.setup>) {+ await waitFor(+ () =>+ expect(screen.getByTestId("onboarding-backend-next")).not.toBeDisabled(),+ { timeout: 3000 },+ );+ await user.click(screen.getByTestId("onboarding-backend-next"));await waitFor(() =>expect(screen.getByTestId("onboarding-modal")).toHaveAttribute(@@ -182,7 +182,7 @@ afterEach(() => {});describe("OnboardingModal", () => {- it("starts on the backend setup step with each slide offset by its index", () => {+ it("starts on the choose-agent step with each slide offset by its index", () => {renderModal();expect(screen.getByTestId("onboarding-modal")).toHaveAttribute(@@ -190,7 +190,7 @@ describe("OnboardingModal", () => {"0",);expect(- screen.getByTestId("onboarding-step-check-backend"),+ screen.getByTestId("onboarding-step-choose-agent"),).toBeInTheDocument();expect(screen.getByTestId("onboarding-slide-0")).toHaveAttribute(@@ -223,7 +223,7 @@ describe("OnboardingModal", () => {screen.getByTestId("onboarding-backend-api-key"),"session-key",);- await user.click(screen.getByTestId("onboarding-backend-submit"));+ await user.click(screen.getByTestId("onboarding-backend-next"));expect(await screen.findByTestId("onboarding-backend-error"),@@ -246,19 +246,41 @@ describe("OnboardingModal", () => {);});+ it("collapses backend configuration fields once connected until Show configuration is toggled", async () => {+ renderModal();+ const user = userEvent.setup();++ await completeAgentStep(user);+ await waitFor(() =>+ expect(screen.getByTestId("onboarding-backend-connected")).toBeVisible(),+ );++ expect(+ screen.getByTestId("onboarding-backend-configuration-fields"),+ ).toHaveClass("hidden");+ expect(+ screen.getByTestId("onboarding-backend-show-configuration"),+ ).toBeInTheDocument();++ await user.click(screen.getByTestId("onboarding-backend-show-configuration"));+ expect(+ screen.getByTestId("onboarding-backend-configuration-fields"),+ ).not.toHaveClass("hidden");+ });+it("advances each step via the per-step Next button and reframes slide offsets", async () => {renderModal();const user = userEvent.setup();- // Step 0 → 1. Once the backend health probe resolves, step 0's Next is enabled.- await completeBackendStep(user);+ // Step 0 → 1. ChooseAgentStep does an async save before advancing.+ await completeAgentStep(user);expect(screen.getByTestId("onboarding-slide-1")).toHaveAttribute("data-active","true",);- // Step 1 → 2. ChooseAgentStep does an async save before advancing.- await completeAgentStep(user);+ // Step 1 → 2. Once the backend health probe resolves, step 1's Next is enabled.+ await completeBackendStep(user);expect(screen.getByTestId("onboarding-slide-2")).toHaveAttribute("data-active","true",@@ -322,8 +344,8 @@ describe("OnboardingModal", () => {// Arrange: render the modal and walk through to the LLM step.renderModal();const user = userEvent.setup();- await completeBackendStep(user);await completeAgentStep(user);+ await completeBackendStep(user);// Wait for the LLM slide to become the active one before querying// by role — otherwise the heading is `aria-hidden` from inside a// not-yet-active slide and getByRole filters it out.@@ -359,9 +381,9 @@ describe("OnboardingModal", () => {// Pick Gemini CLI: its key/base-URL come from the SDK registry like the// other providers, so the slide shows the GEMINI_API_KEY field.- await completeBackendStep(user);await user.click(screen.getByTestId("onboarding-agent-option-gemini-cli"));await completeAgentStep(user);+ await completeBackendStep(user);// Lands on slide 2 (the ACP step) — not jumped past to Say Hello.await waitFor(@@ -400,9 +422,9 @@ describe("OnboardingModal", () => {const user = userEvent.setup();// Pick Claude Code → Check Backend.- await completeBackendStep(user);await user.click(screen.getByTestId("onboarding-agent-option-claude-code"));await completeAgentStep(user);+ await completeBackendStep(user);// Slide 2 is the ACP credentials step (not skipped), so the flow keeps// all 4 progress segments and slide 2 — not Say Hello — is now active.@@ -460,9 +482,9 @@ describe("OnboardingModal", () => {renderModal();const user = userEvent.setup();- await completeBackendStep(user);await user.click(screen.getByTestId("onboarding-agent-option-codex"));await completeAgentStep(user);+ await completeBackendStep(user);await waitFor(() =>expect(screen.getByTestId("onboarding-modal")).toHaveAttribute(@@ -490,8 +512,8 @@ describe("OnboardingModal", () => {renderModal();const user = userEvent.setup();- await completeBackendStep(user);await completeAgentStep(user);+ await completeBackendStep(user);await user.click(screen.getByTestId("onboarding-llm-next"));const helloInput = screen.getByTestId(@@ -509,8 +531,8 @@ describe("OnboardingModal", () => {renderModal(onClose);const user = userEvent.setup();- await completeBackendStep(user);await completeAgentStep(user);+ await completeBackendStep(user);await waitFor(() =>expect(screen.getByTestId("onboarding-slide-2")).toHaveAttribute("data-active",diff --git a/__tests__/components/onboarding/onboarding-preview.test.ts b/__tests__/components/onboarding/onboarding-preview.test.tsnew file mode 100644index 0000000000..9401b5f275--- /dev/null+++ b/__tests__/components/onboarding/onboarding-preview.test.ts@@ -0,0 +1,27 @@+import { describe, expect, it } from "vitest";+import {+ ONBOARDING_PREVIEW_STEP_QUERY_PARAM,+ isOnboardingPreviewActive,+ readOnboardingPreviewStep,+} from "#/components/features/onboarding/onboarding-preview";++describe("onboarding-preview", () => {+ it("reads a valid preview step from the query string", () => {+ expect(+ readOnboardingPreviewStep(`?${ONBOARDING_PREVIEW_STEP_QUERY_PARAM}=3`),+ ).toBe(3);+ });++ it("rejects out-of-range preview steps", () => {+ expect(+ readOnboardingPreviewStep(`?${ONBOARDING_PREVIEW_STEP_QUERY_PARAM}=9`),+ ).toBeNull();+ });++ it("detects when preview mode is active", () => {+ expect(+ isOnboardingPreviewActive(`?${ONBOARDING_PREVIEW_STEP_QUERY_PARAM}=2`),+ ).toBe(true);+ expect(isOnboardingPreviewActive("?foo=bar")).toBe(false);+ });+});diff --git a/__tests__/components/shared/modals/modal-backdrop.test.tsx b/__tests__/components/shared/modals/modal-backdrop.test.tsxindex a3fd819589..e251922187 100644--- a/__tests__/components/shared/modals/modal-backdrop.test.tsx+++ b/__tests__/components/shared/modals/modal-backdrop.test.tsx@@ -66,4 +66,20 @@ describe("ModalBackdrop", () => {expect(callsAfterContentClick).toBe(0);expect(onClose).toHaveBeenCalledTimes(1);});++ it("does not call onClose when the backdrop is clicked and closeOnBackdropClick is false", async () => {+ const user = userEvent.setup();+ const onClose = vi.fn();+ render(+ <ModalBackdrop onClose={onClose} closeOnBackdropClick={false}>+ <button type="button">inside content</button>+ </ModalBackdrop>,+ );++ const dialog = screen.getByRole("dialog");+ const backdrop = dialog.firstElementChild as HTMLElement;+ await user.click(backdrop);++ expect(onClose).not.toHaveBeenCalled();+ });});diff --git a/src/components/features/automations/recommended-automations-launcher.tsx b/src/components/features/automations/recommended-automations-launcher.tsxindex 9d457d5850..ed2841aa3c 100644--- a/src/components/features/automations/recommended-automations-launcher.tsx+++ b/src/components/features/automations/recommended-automations-launcher.tsx@@ -27,6 +27,8 @@ import { RecommendedAutomationsSection } from "./recommended-automations-sectioninterface RecommendedAutomationsLauncherProps {query?: string;onLaunched?: () => void;+ /** When true, only the automation card grid scrolls inside its section. */+ scrollableGrid?: boolean;}function getRequiredEntries(automation: RecommendedAutomation) {@@ -81,6 +83,7 @@ export function buildAutomationPrompt(export function RecommendedAutomationsLauncher({query,onLaunched,+ scrollableGrid = false,}: RecommendedAutomationsLauncherProps) {const activeBackend = useActiveBackend();const { navigate } = useNavigation();@@ -221,6 +224,7 @@ export function RecommendedAutomationsLauncher({installedServers={installedMcpServers}query={query}onSelect={handleSelectAutomation}+ scrollableGrid={scrollableGrid}/>{installEntry && (diff --git a/src/components/features/automations/recommended-automations-section.tsx b/src/components/features/automations/recommended-automations-section.tsxindex 66a730782a..f6e985dadf 100644--- a/src/components/features/automations/recommended-automations-section.tsx+++ b/src/components/features/automations/recommended-automations-section.tsx@@ -29,7 +29,6 @@ import {extensionModuleCardGridClassName,extensionModuleCardGridContainerClassName,extensionModuleCardPillClassName,- extensionModuleCardSurfaceClassName,} from "#/utils/extension-module-card-classes";import { StatusBadge } from "./status-badge";@@ -38,6 +37,8 @@ interface RecommendedAutomationsSectionProps {installedServers: MCPServerConfig[];query?: string;onSelect: (automation: RecommendedAutomation) => void;+ /** When true, title, description, and cards share one scroll area. */+ scrollableGrid?: boolean;}export function getAutomationsByPopularity(@@ -137,6 +138,7 @@ export function RecommendedAutomationsSection({installedServers,query = "",onSelect,+ scrollableGrid = false,}: RecommendedAutomationsSectionProps) {const { t } = useTranslation("openhands");@@ -151,19 +153,32 @@ export function RecommendedAutomationsSection({if (visibleAutomations.length === 0) return null;return (- <section data-testid="recommended-automations-section">- <div className="flex items-center">- <h2 className="text-base font-semibold text-foreground">- {t(I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_TITLE)}- </h2>- <StatusBadge count={visibleAutomations.length} />- </div>- <p className="mt-1 text-sm text-muted">- {t(I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_DESCRIPTION)}- </p>+ <section+ data-testid="recommended-automations-section"+ className={cn(scrollableGrid && "flex min-h-0 flex-1 flex-col")}+ >+ <div+ data-testid={+ scrollableGrid ? "recommended-automations-scroll-area" : undefined+ }+ className={cn(+ "mt-3",+ extensionModuleCardGridContainerClassName,+ scrollableGrid &&+ "min-h-0 flex-1 overflow-y-auto custom-scrollbar-always",+ )}+ >+ <div className="flex items-center">+ <h2 className="text-base font-semibold text-foreground">+ {t(I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_TITLE)}+ </h2>+ <StatusBadge count={visibleAutomations.length} />+ </div>+ <p className="mt-1 text-sm text-muted">+ {t(I18nKey.RECOMMENDED_AUTOMATIONS$SECTION_DESCRIPTION)}+ </p>- <div className={cn("mt-3", extensionModuleCardGridContainerClassName)}>- <div className={extensionModuleCardGridClassName}>+ <div className={cn("mt-3", extensionModuleCardGridClassName)}>{visibleAutomations.map((automation) => {const requiredEntries = getRequiredEntries(automation);const missingCount = requiredEntries.filter(@@ -177,8 +192,7 @@ export function RecommendedAutomationsSection({data-testid={`recommended-automation-card-${automation.id}`}onClick={() => onSelect(automation)}className={cn(- "flex min-w-0 overflow-hidden p-4 text-left",- extensionModuleCardSurfaceClassName,+ "flex min-w-0 overflow-hidden p-4 text-left rounded-xl bg-surface-raised",extensionModuleCardInteractiveClassName,)}>diff --git a/src/components/features/backends/backend-form-modal.tsx b/src/components/features/backends/backend-form-modal.tsxindex bd025915fc..1dc25c09ee 100644--- a/src/components/features/backends/backend-form-modal.tsx+++ b/src/components/features/backends/backend-form-modal.tsx@@ -294,6 +294,12 @@ export interface BackendFormProps {* keys for local backends; the auth-gate screen needs to enforce one.*/requireApiKey?: boolean;+ /**+ * When true, hides the name/host/API-key inputs (and related inline+ * errors) while keeping the action row visible — used by onboarding+ * after a successful connection probe.+ */+ hideConfigurationFields?: boolean;/*** Replace the default synchronous add/update-and-close submit with a* custom async handler. The form builds the payload, validates@@ -321,6 +327,7 @@ export function BackendForm({testIdRoot: explicitTestIdRoot,hostReadOnly,requireApiKey,+ hideConfigurationFields = false,onSubmitOverride,}: BackendFormProps) {const { t } = useTranslation("openhands");@@ -416,72 +423,80 @@ export function BackendForm({onSubmit={handleSubmit}className="flex flex-col gap-4">- <SettingsInput- testId={`${testIdRoot}-name`}- name={`${testIdRoot}-name`}- type="text"- label={t(I18nKey.BACKEND$NAME_LABEL)}- value={name}- onChange={(value) => {- setName(value);- setConnectionError(null);- }}- onBlur={() => setNameTouched(true)}- placeholder="Production"- className="w-full"- showRequiredTag- error={nameError}- />+ <div+ data-testid={`${testIdRoot}-configuration-fields`}+ className={cn(+ "flex flex-col gap-4",+ hideConfigurationFields && "hidden",+ )}+ >+ <SettingsInput+ testId={`${testIdRoot}-name`}+ name={`${testIdRoot}-name`}+ type="text"+ label={t(I18nKey.BACKEND$NAME_LABEL)}+ value={name}+ onChange={(value) => {+ setName(value);+ setConnectionError(null);+ }}+ onBlur={() => setNameTouched(true)}+ placeholder="Production"+ className="w-full"+ showRequiredTag+ error={nameError}+ />- <SettingsInput- testId={`${testIdRoot}-host`}- name={`${testIdRoot}-host`}- type="text"- label={t(I18nKey.BACKEND$HOST_LABEL)}- value={host}- onChange={- hostReadOnly- ? undefined- : (value) => {- setHost(value);- setConnectionError(null);- }- }- onBlur={() => setHostTouched(true)}- placeholder={DEFAULT_OPENHANDS_CLOUD_HOST}- className="w-full"- showRequiredTag- error={hostError}- isDisabled={hostReadOnly}- />+ <SettingsInput+ testId={`${testIdRoot}-host`}+ name={`${testIdRoot}-host`}+ type="text"+ label={t(I18nKey.BACKEND$HOST_LABEL)}+ value={host}+ onChange={+ hostReadOnly+ ? undefined+ : (value) => {+ setHost(value);+ setConnectionError(null);+ }+ }+ onBlur={() => setHostTouched(true)}+ placeholder={DEFAULT_OPENHANDS_CLOUD_HOST}+ className="w-full"+ showRequiredTag+ error={hostError}+ isDisabled={hostReadOnly}+ />- <SettingsInput- testId={`${testIdRoot}-api-key`}- name={`${testIdRoot}-api-key`}- type="password"- label={t(I18nKey.BACKEND$KEY_LABEL)}- value={apiKey}- onChange={(value) => {- setApiKey(value);- setConnectionError(null);- }}- placeholder=""- className="w-full"- />+ <SettingsInput+ testId={`${testIdRoot}-api-key`}+ name={`${testIdRoot}-api-key`}+ type="password"+ label={t(I18nKey.BACKEND$KEY_LABEL)}+ value={apiKey}+ onChange={(value) => {+ setApiKey(value);+ setConnectionError(null);+ }}+ placeholder=""+ className="w-full"+ />- {connectionError ? (- <div- role="alert"- data-testid={`${testIdRoot}-error`}- className="rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words"- >- {connectionError}- </div>- ) : null}+ {connectionError ? (+ <div+ role="alert"+ data-testid={`${testIdRoot}-error`}+ className="rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words"+ >+ {connectionError}+ </div>+ ) : null}- {mode === "edit" && backend && (- <BackendStatusBadge backend={backend} testIdRoot={testIdRoot} />- )}+ {mode === "edit" && backend && (+ <BackendStatusBadge backend={backend} testIdRoot={testIdRoot} />+ )}+ </div>{renderActions ? (renderActions({diff --git a/src/components/features/onboarding/index.ts b/src/components/features/onboarding/index.tsindex 57573b7b1a..f8906fe436 100644--- a/src/components/features/onboarding/index.ts+++ b/src/components/features/onboarding/index.ts@@ -5,3 +5,8 @@ export {useOnboardingCompletion,ONBOARDING_COMPLETED_STORAGE_KEY,} from "./use-onboarding-completion";+export {+ ONBOARDING_PREVIEW_STEP_QUERY_PARAM,+ isOnboardingPreviewActive,+ readOnboardingPreviewStep,+} from "./onboarding-preview";diff --git a/src/components/features/onboarding/onboarding-host.tsx b/src/components/features/onboarding/onboarding-host.tsxindex 468b7acdc0..355be02c1e 100644--- a/src/components/features/onboarding/onboarding-host.tsx+++ b/src/components/features/onboarding/onboarding-host.tsx@@ -1,5 +1,10 @@import React from "react";+import { useLocation } from "react-router";import { OnboardingModal } from "./onboarding-modal";+import {+ isOnboardingPreviewActive,+ readOnboardingPreviewStep,+} from "./onboarding-preview";import { useOnboardingCompletion } from "./use-onboarding-completion";/**@@ -8,12 +13,28 @@ import { useOnboardingCompletion } from "./use-onboarding-completion";* isn't set yet). Closing or completing the flow marks it done so the* modal won't re-appear on subsequent visits.*- * Renders nothing once onboarding has been completed.+ * With `?previewOnboardingStep=<0-3>` the modal opens on that slide for+ * design review without persisting completion (works on any route when+ * mounted from the root layout).*/export function OnboardingHost() {+ const location = useLocation();+ const previewStep = readOnboardingPreviewStep(location.search);+ const isPreview = isOnboardingPreviewActive(location.search);const { isCompleted, markCompleted } = useOnboardingCompletion();- if (isCompleted) return null;+ if (!isPreview && isCompleted) return null;- return <OnboardingModal onClose={markCompleted} />;+ const handleClose = () => {+ if (isPreview) return;+ markCompleted();+ };++ return (+ <OnboardingModal+ onClose={handleClose}+ initialStep={previewStep ?? 0}+ isPreview={isPreview}+ />+ );}diff --git a/src/components/features/onboarding/onboarding-modal.tsx b/src/components/features/onboarding/onboarding-modal.tsxindex bf5a5f8fc8..628d5001f2 100644--- a/src/components/features/onboarding/onboarding-modal.tsx+++ b/src/components/features/onboarding/onboarding-modal.tsx@@ -72,14 +72,18 @@ function Slide({ index, currentStep, children }: SlideProps) {interface OnboardingModalProps {/** Called when the user dismisses the modal (skip / X / launch). */onClose: () => void;+ /** Optional slide index for dev preview (`?previewOnboardingStep=`). */+ initialStep?: number;+ /** When true, skip/close does not persist onboarding completion. */+ isPreview?: boolean;}/*** Top-level onboarding modal for first-time users.** The flow is a fixed sequence of four steps:- * 0. Check backend- * 1. Choose agent+ * 0. Choose agent+ * 1. Check backend* 2. Set up LLM* 3. Say hello (creates a fresh conversation, then closes)*@@ -87,9 +91,15 @@ interface OnboardingModalProps {* the rail is translated horizontally by step index, so transitioning* between steps animates the new step in from the right.*/-export function OnboardingModal({ onClose }: OnboardingModalProps) {+export function OnboardingModal({+ onClose,+ initialStep = 0,+ isPreview = false,+}: OnboardingModalProps) {const { t } = useTranslation("openhands");- const [currentStep, setCurrentStep] = React.useState(0);+ const [currentStep, setCurrentStep] = React.useState(() =>+ Math.min(Math.max(initialStep, 0), TOTAL_STEPS - 1),+ );const [selectedAgentId, setSelectedAgentId] =React.useState<OnboardingAgentId>("openhands");@@ -116,6 +126,7 @@ export function OnboardingModal({ onClose }: OnboardingModalProps) {<sectiondata-testid="onboarding-modal"data-current-step={currentStep}+ data-preview={isPreview ? "true" : undefined}className={cn("flex flex-col gap-6 overflow-hidden rounded-2xl border border-white/10 bg-base-secondary shadow-2xl",modalWidthClassName("lg"),@@ -140,16 +151,15 @@ export function OnboardingModal({ onClose }: OnboardingModalProps) {className="relative overflow-clip"><Slide index={0} currentStep={currentStep}>- <CheckBackendStep onNext={goNext} />- </Slide>- <Slide index={1} currentStep={currentStep}><ChooseAgentStepselectedAgentId={selectedAgentId}onSelect={setSelectedAgentId}onNext={goNext}- onBack={goBack}/></Slide>+ <Slide index={1} currentStep={currentStep}>+ <CheckBackendStep onBack={goBack} onNext={goNext} />+ </Slide><Slide index={SETUP_SLIDE_INDEX} currentStep={currentStep}>{isOpenHands ? (<SetupLlmStep onBack={goBack} onNext={goNext} />@@ -163,20 +173,26 @@ export function OnboardingModal({ onClose }: OnboardingModalProps) {)}</Slide><Slide index={3} currentStep={currentStep}>- <SayHelloStep onBack={goBack} onLaunched={onClose} />+ <SayHelloStep+ onBack={goBack}+ onClose={onClose}+ onLaunched={onClose}+ /></Slide></div></div></section>- <button- type="button"- data-testid="onboarding-skip"- onClick={onClose}- className="rounded-md px-3 py-2 text-sm text-[var(--oh-muted)] transition-colors hover:bg-white/5 hover:text-white cursor-pointer"- >- {t(I18nKey.ONBOARDING$SKIP)}- </button>+ {currentStep < TOTAL_STEPS - 1 ? (+ <button+ type="button"+ data-testid="onboarding-skip"+ onClick={onClose}+ className="rounded-md px-3 py-2 text-sm text-[var(--oh-muted)] transition-colors hover:bg-white/5 hover:text-white cursor-pointer"+ >+ {t(I18nKey.ONBOARDING$SKIP)}+ </button>+ ) : null}</div></ModalBackdrop>);diff --git a/src/components/features/onboarding/onboarding-preview.ts b/src/components/features/onboarding/onboarding-preview.tsnew file mode 100644index 0000000000..0c98b1ea91--- /dev/null+++ b/src/components/features/onboarding/onboarding-preview.ts@@ -0,0 +1,25 @@+export const ONBOARDING_PREVIEW_STEP_QUERY_PARAM = "previewOnboardingStep";++const MAX_ONBOARDING_STEP = 3;++/** Reads `?previewOnboardingStep=<0-3>` for dev/design review of a single slide. */+export function readOnboardingPreviewStep(+ search = typeof window !== "undefined" ? window.location.search : "",+): number | null {+ const raw = new URLSearchParams(search).get(+ ONBOARDING_PREVIEW_STEP_QUERY_PARAM,+ );+ if (raw == null) return null;++ const step = Number.parseInt(raw, 10);+ if (!Number.isFinite(step) || step < 0 || step > MAX_ONBOARDING_STEP) {+ return null;+ }+ return step;+}++export function isOnboardingPreviewActive(+ search = typeof window !== "undefined" ? window.location.search : "",+): boolean {+ return readOnboardingPreviewStep(search) != null;+}diff --git a/src/components/features/onboarding/steps/check-backend-step.tsx b/src/components/features/onboarding/steps/check-backend-step.tsxindex 89be7f0838..c27c393423 100644--- a/src/components/features/onboarding/steps/check-backend-step.tsx+++ b/src/components/features/onboarding/steps/check-backend-step.tsx@@ -9,6 +9,7 @@ import { BrandButton } from "#/components/features/settings/brand-button";import { useActiveBackendContext } from "#/contexts/active-backend-context";import { useBackendsHealth } from "#/hooks/query/use-backends-health";import { I18nKey } from "#/i18n/declaration";+import ChevronDownSmallIcon from "#/icons/chevron-down-small.svg?react";import { cn } from "#/utils/utils";interface CheckBackendStepProps {@@ -101,6 +102,15 @@ export function CheckBackendStep({ onBack, onNext }: CheckBackendStepProps) {const isConnected = noBackendSelected? false: (healthByBackendId[backend.id]?.isConnected ?? null);+ const [configurationOpen, setConfigurationOpen] = React.useState(false);++ React.useEffect(() => {+ if (isConnected === true) {+ setConfigurationOpen(false);+ }+ }, [isConnected]);++ const hideConfigurationFields = isConnected === true && !configurationOpen;return (<div@@ -118,40 +128,63 @@ export function CheckBackendStep({ onBack, onNext }: CheckBackendStepProps) {<ConnectionBanner isConnected={isConnected} />+ {isConnected === true ? (+ <button+ type="button"+ onClick={() => setConfigurationOpen((open) => !open)}+ aria-expanded={configurationOpen}+ data-testid="onboarding-backend-show-configuration"+ className="flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2"+ >+ <span>+ {configurationOpen+ ? t(I18nKey.ONBOARDING$BACKEND_HIDE_CONFIGURATION)+ : t(I18nKey.ONBOARDING$BACKEND_SHOW_CONFIGURATION)}+ </span>+ <ChevronDownSmallIcon+ className={cn(+ "h-4 w-4 shrink-0 text-muted transition-transform",+ configurationOpen && "rotate-180",+ )}+ aria-hidden+ />+ </button>+ ) : null}+<BackendFormmode={noBackendSelected ? "add" : "edit"}backend={backendForForm}- onSubmitted={() => {}}+ onSubmitted={onNext}testIdRoot="onboarding-backend"requireApiKey- renderActions={({ canSubmit, testIdRoot }) => (- <div className="sticky bottom-0 flex items-center justify-end gap-2 mt-2 bg-base-secondary pt-4 pb-7">+ hideConfigurationFields={hideConfigurationFields}+ renderActions={({ canSubmit, isSubmitting }) => (+ <div+ className={cn(+ "sticky bottom-0 mt-2 flex items-center gap-2 bg-base-secondary pt-4 pb-7",+ onBack ? "justify-between" : "justify-end",+ )}+ >{onBack ? (<BrandButtontestId="onboarding-backend-back"type="button"variant="secondary"onClick={onBack}+ isDisabled={isSubmitting}>{t(I18nKey.ONBOARDING$BACK)}</BrandButton>) : null}- <BrandButton- testId={`${testIdRoot}-submit`}- type="submit"- variant="secondary"- isDisabled={!canSubmit}- >- {t(I18nKey.BACKEND$SAVE)}- </BrandButton><BrandButtontestId="onboarding-backend-next"- type="button"+ type="submit"variant="primary"- isDisabled={isConnected !== true}- onClick={onNext}+ isDisabled={!canSubmit || isSubmitting}>- {t(I18nKey.ONBOARDING$NEXT)}+ {isSubmitting+ ? t(I18nKey.SETTINGS$SAVING)+ : t(I18nKey.ONBOARDING$NEXT)}</BrandButton></div>)}diff --git a/src/components/features/onboarding/steps/choose-agent-step.tsx b/src/components/features/onboarding/steps/choose-agent-step.tsxindex f6316d0f96..fc2e1659c9 100644--- a/src/components/features/onboarding/steps/choose-agent-step.tsx+++ b/src/components/features/onboarding/steps/choose-agent-step.tsx@@ -192,7 +192,12 @@ export function ChooseAgentStep({})}</div>- <div className="sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7">+ <div+ className={cn(+ "sticky bottom-0 flex items-center gap-2 bg-base-secondary pt-4 pb-7",+ onBack ? "justify-between" : "justify-end",+ )}+ >{onBack ? (<BrandButtontestId="onboarding-agent-back"diff --git a/src/components/features/onboarding/steps/say-hello-step.tsx b/src/components/features/onboarding/steps/say-hello-step.tsxindex 7688cb54bd..6d0365d2c7 100644--- a/src/components/features/onboarding/steps/say-hello-step.tsx+++ b/src/components/features/onboarding/steps/say-hello-step.tsx@@ -1,6 +1,6 @@import React from "react";import { useTranslation } from "react-i18next";-import { Send } from "lucide-react";+import { ChatSendButton } from "#/components/features/chat/chat-send-button";import { RecommendedAutomationsLauncher } from "#/components/features/automations/recommended-automations-launcher";import { BrandButton } from "#/components/features/settings/brand-button";import { useNavigation } from "#/context/navigation-context";@@ -10,6 +10,8 @@ import { I18nKey } from "#/i18n/declaration";interface SayHelloStepProps {onBack: () => void;+ /** Dismisses onboarding without launching a conversation. */+ onClose: () => void;/** Called once the conversation has been created — used by the parent* modal to mark the onboarding as complete before unmounting. */onLaunched: () => void;@@ -20,7 +22,11 @@ interface SayHelloStepProps {* launches a brand-new conversation with no workspace and navigates* to it. Completing this step finishes the onboarding flow.*/-export function SayHelloStep({ onBack, onLaunched }: SayHelloStepProps) {+export function SayHelloStep({+ onBack,+ onClose,+ onLaunched,+}: SayHelloStepProps) {const { t } = useTranslation("openhands");const { navigate } = useNavigation();const defaultMessage = t(I18nKey.ONBOARDING$HELLO_DEFAULT_MESSAGE);@@ -66,9 +72,9 @@ export function SayHelloStep({ onBack, onLaunched }: SayHelloStepProps) {return (<divdata-testid="onboarding-step-say-hello"- className="flex flex-col gap-6"+ className="flex max-h-[calc(90vh-7rem)] flex-col">- <header className="flex flex-col gap-2">+ <header className="flex shrink-0 flex-col gap-2"><h2 className="text-2xl font-medium text-white">{t(I18nKey.ONBOARDING$HELLO_TITLE)}</h2>@@ -77,24 +83,62 @@ export function SayHelloStep({ onBack, onLaunched }: SayHelloStepProps) {</p></header>- <form onSubmit={handleSubmit} className="contents">- <input- data-testid="onboarding-hello-input"- aria-label={t(I18nKey.ONBOARDING$HELLO_TITLE)}- type="text"- value={message}- onChange={(event) => setMessage(event.target.value)}- placeholder={defaultMessage}- disabled={isLaunching}- className="w-full rounded-xl border border-white/10 bg-base-secondary px-4 py-3 text-base text-white placeholder:text-[var(--oh-text-subtle)] focus:border-primary focus:outline-none disabled:opacity-60"- />+ <form+ onSubmit={handleSubmit}+ data-testid="onboarding-hello-input-form"+ className="mt-6 box-border flex w-full shrink-0 flex-col items-start justify-center rounded-[15px] border border-[var(--oh-border)] bg-surface-raised p-4"+ >+ <div className="relative w-full">+ <div className="box-border flex w-full shrink-0 flex-row items-end justify-between gap-2 p-0 pb-[18px]">+ <input+ data-testid="onboarding-hello-input"+ aria-label={t(I18nKey.ONBOARDING$HELLO_TITLE)}+ type="text"+ value={message}+ onChange={(event) => setMessage(event.target.value)}+ onKeyDown={(event) => {+ if (event.key === "Enter" && !event.shiftKey) {+ event.preventDefault();+ launchConversation();+ }+ }}+ placeholder={defaultMessage}+ disabled={isLaunching}+ className="min-h-[20px] w-full flex-1 bg-transparent text-[16px] font-normal leading-[20px] text-white outline-none placeholder:text-[var(--oh-text-tertiary)] disabled:cursor-not-allowed disabled:opacity-50"+ />+ </div>+ </div>+ <div className="flex w-full min-w-0 items-center justify-end gap-2">+ <ChatSendButton+ buttonClassName=""+ handleSubmit={launchConversation}+ disabled={!canSubmit}+ />+ </div></form>- <div data-testid="onboarding-recommended-automations">- <RecommendedAutomationsLauncher onLaunched={onLaunched} />+ <div+ data-testid="onboarding-hello-or-separator"+ className="mt-6 flex w-full items-center gap-3"+ >+ <div className="h-px flex-1 bg-[var(--oh-border)]" />+ <span className="text-xs uppercase text-[var(--oh-muted)]">+ {t(I18nKey.LANDING$OR)}+ </span>+ <div className="h-px flex-1 bg-[var(--oh-border)]" />+ </div>++ <div+ data-testid="onboarding-recommended-automations"+ className="flex min-h-0 flex-1 flex-col"+ >+ <RecommendedAutomationsLauncher+ onLaunched={onLaunched}+ scrollableGrid+ /></div>- <div className="sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7">+ <div className="flex shrink-0 items-center justify-between gap-2 bg-base-secondary pt-7 pb-7"><BrandButtontestId="onboarding-hello-back"type="button"@@ -105,16 +149,13 @@ export function SayHelloStep({ onBack, onLaunched }: SayHelloStepProps) {{t(I18nKey.ONBOARDING$BACK)}</BrandButton><BrandButton- testId="onboarding-hello-launch"+ testId="onboarding-hello-close"type="button"- variant="primary"- isDisabled={!canSubmit}- onClick={launchConversation}- startContent={<Send className="size-4" aria-hidden />}+ variant="secondary"+ onClick={onClose}+ isDisabled={isLaunching}>- {isLaunching- ? t(I18nKey.ONBOARDING$HELLO_LAUNCHING)- : t(I18nKey.ONBOARDING$HELLO_LAUNCH)}+ {t(I18nKey.BUTTON$CLOSE)}</BrandButton></div></div>diff --git a/src/components/features/onboarding/steps/setup-llm-step.tsx b/src/components/features/onboarding/steps/setup-llm-step.tsxindex 9e918b6038..b470ea922f 100644--- a/src/components/features/onboarding/steps/setup-llm-step.tsx+++ b/src/components/features/onboarding/steps/setup-llm-step.tsx@@ -122,13 +122,14 @@ export function SetupLlmStep({ onBack, onNext }: SetupLlmStepProps) {<LlmSettingsScreenembeddedhideSaveButton+ suppressSuccessToastinitialValueOverrides={ONBOARDING_LLM_OVERRIDES}onSaveSuccess={handleSaveSuccess}onSaveControlChange={setSaveControl}/></div>- <div className="sticky bottom-0 flex items-center justify-end gap-2 bg-base-secondary pt-4 pb-7">+ <div className="sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7"><BrandButtontestId="onboarding-llm-back"type="button"diff --git a/src/components/features/settings/sdk-settings/sdk-section-page.tsx b/src/components/features/settings/sdk-settings/sdk-section-page.tsxindex de7835a57c..02e98e3bf1 100644--- a/src/components/features/settings/sdk-settings/sdk-section-page.tsx+++ b/src/components/features/settings/sdk-settings/sdk-section-page.tsx@@ -153,6 +153,7 @@ export function SdkSectionPage({initialValueOverrides,embedded = false,hideSaveButton = false,+ suppressSuccessToast = false,onSaveControlChange,testId = "sdk-section-settings-screen",}: {@@ -199,6 +200,8 @@ export function SdkSectionPage({* action (e.g. an onboarding "Next" button).*/hideSaveButton?: boolean;+ /** Suppress the default success toast after save completes. */+ suppressSuccessToast?: boolean;/*** Fires whenever the save state changes (a mutation starts/finishes,* dirty status flips). Provides a stable `save()` callback the@@ -413,7 +416,9 @@ export function SdkSectionPage({saveSettings(payload, {onError: handleError,onSuccess: () => {- displaySuccessToast(t(I18nKey.SETTINGS$SAVED_WARNING));+ if (!suppressSuccessToast) {+ displaySuccessToast(t(I18nKey.SETTINGS$SAVED_WARNING));+ }setDirty({});onSaveSuccess?.();},@@ -449,7 +454,10 @@ export function SdkSectionPage({});}, [isPending, saveControlIsDirty, values, view]);- if (isLoading || isFetching || isSchemaLoading) {+ // Keep existing form content visible during background refetches to avoid+ // flashing the full skeleton (notably during onboarding Next transitions).+ const isInitialSettingsLoad = (isLoading || isFetching) && !settings;+ if (isInitialSettingsLoad || isSchemaLoading) {return <LlmSettingsInputsSkeleton />;}diff --git a/src/components/shared/modals/modal-backdrop.tsx b/src/components/shared/modals/modal-backdrop.tsxindex fb53d657c0..efd5d5f709 100644--- a/src/components/shared/modals/modal-backdrop.tsx+++ b/src/components/shared/modals/modal-backdrop.tsx@@ -6,6 +6,8 @@ interface ModalBackdropProps {onClose?: () => void;/** When false, pressing Escape does not close the modal. Defaults to true. */closeOnEscape?: boolean;+ /** When false, clicking the backdrop does not close the modal. Defaults to true. */+ closeOnBackdropClick?: boolean;"aria-label"?: string;}@@ -13,6 +15,7 @@ export function ModalBackdrop({children,onClose,closeOnEscape = true,+ closeOnBackdropClick = true,"aria-label": ariaLabel,}: ModalBackdropProps) {React.useEffect(() => {@@ -26,6 +29,7 @@ export function ModalBackdrop({}, [closeOnEscape, onClose]);const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {+ if (!closeOnBackdropClick) return;if (e.target === e.currentTarget) onClose?.(); // only close if the click was on the backdrop};diff --git a/src/i18n/translation.json b/src/i18n/translation.jsonindex b6d0099b71..e48a11be92 100644--- a/src/i18n/translation.json+++ b/src/i18n/translation.json@@ -27608,21 +27608,55 @@"uk": "З'єднання встановлено! 🎉"},"ONBOARDING$BACKEND_CONNECTED_BODY": {- "en": "Your agent server is up and running. Let's keep going.",- "ja": "エージェントサーバーが稼働しています。次に進みましょう。",- "zh-CN": "智能体服务器已就绪。让我们继续。",- "zh-TW": "代理伺服器已啟動並執行中。讓我們繼續。",- "ko-KR": "에이전트 서버가 정상적으로 실행 중입니다. 계속 진행합시다.",- "no": "Agent-serveren din kjører. La oss gå videre.",- "ar": "خادم الوكيل قيد التشغيل. لنتابع.",- "de": "Ihr Agent-Server läuft. Lassen Sie uns weitermachen.",- "fr": "Votre serveur d'agent est opérationnel. Continuons.",- "it": "Il tuo server agente è attivo. Andiamo avanti.",- "pt": "Seu servidor de agente está em execução. Vamos continuar.",- "es": "Tu servidor de agentes está en marcha. Sigamos.",- "ca": "El teu servidor d'agent està actiu. Continuem.",- "tr": "Aracı sunucunuz çalışıyor. Devam edelim.",- "uk": "Ваш агент-сервер працює. Продовжимо."+ "en": "We've started a default backend to run your agents, but you can connect as many agent backends as you want. You could have one on your laptop, one sandboxed in Docker, and one on a remote VM.",+ "ja": "エージェント実行用のデフォルトバックエンドを起動しましたが、エージェントバックエンドは必要な数だけ接続できます。ノートPC上、Dockerでサンドボックス化したもの、リモートVM上など、複数を使い分けられます。",+ "zh-CN": "我们已启动默认后端来运行您的智能体,但您可以连接任意数量的智能体后端。例如,您可以在笔记本电脑、Docker 沙箱或远程 VM 上各运行一个。",+ "zh-TW": "我們已啟動預設後端來執行您的代理,但您可以連接任意數量的代理後端。您可以在筆記型電腦、Docker 沙箱或遠端 VM 上各執行一個。",+ "ko-KR": "에이전트를 실행할 기본 백엔드를 시작했지만, 원하는 만큼 많은 에이전트 백엔드를 연결할 수 있습니다. 노트북, Docker 샌드박스, 원격 VM에 각각 하나씩 둘 수 있습니다.",+ "no": "Vi har startet en standard backend for å kjøre agentene dine, men du kan koble til så mange agent-backends du vil. Du kan ha én på laptopen, én i Docker-sandbox og én på en ekstern VM.",+ "ar": "لقد بدأنا خادمًا خلفيًا افتراضيًا لتشغيل وكلائك، ولكن يمكنك توصيل عدد غير محدود من خوادم الوكلاء. يمكن أن يكون لديك واحد على جهازك المحمول، وآخر معزول في Docker، وآخر على VM بعيد.",+ "de": "Wir haben ein Standard-Backend gestartet, um Ihre Agenten auszuführen, aber Sie können beliebig viele Agent-Backends verbinden. Sie könnten eines auf Ihrem Laptop, eines in Docker sandboxed und eines auf einer entfernten VM haben.",+ "fr": "Nous avons démarré un backend par défaut pour exécuter vos agents, mais vous pouvez connecter autant de backends d'agent que vous le souhaitez. Vous pourriez en avoir un sur votre ordinateur portable, un dans Docker et un sur une VM distante.",+ "it": "Abbiamo avviato un backend predefinito per eseguire i tuoi agenti, ma puoi collegarne quanti ne vuoi. Potresti averne uno sul laptop, uno in sandbox Docker e uno su una VM remota.",+ "pt": "Iniciamos um backend padrão para executar seus agentes, mas você pode conectar quantos backends de agente quiser. Você pode ter um no laptop, um em sandbox no Docker e um em uma VM remota.",+ "es": "Hemos iniciado un backend predeterminado para ejecutar tus agentes, pero puedes conectar tantos backends de agente como quieras. Podrías tener uno en tu portátil, otro en un sandbox de Docker y otro en una VM remota.",+ "ca": "Hem iniciat un backend predeterminat per executar els teus agents, però pots connectar tants backends d'agent com vulguis. En podries tenir un al portàtil, un en un sandbox de Docker i un en una VM remota.",+ "tr": "Ajanlarınızı çalıştırmak için varsayılan bir backend başlattık, ancak istediğiniz kadar ajan backend'i bağlayabilirsiniz. Dizüstü bilgisayarınızda bir tane, Docker'da sandbox'lanmış bir tane ve uzak bir VM'de bir tane olabilir.",+ "uk": "Ми запустили типовий бекенд для ваших агентів, але ви можете підключити скільки завгодно бекендів агентів. Один може бути на ноутбуці, один у Docker sandbox і один на віддаленій VM."+ },+ "ONBOARDING$BACKEND_SHOW_CONFIGURATION": {+ "en": "Show configuration",+ "ja": "設定を表示",+ "zh-CN": "显示配置",+ "zh-TW": "顯示設定",+ "ko-KR": "구성 표시",+ "no": "Vis konfigurasjon",+ "ar": "إظهار الإعدادات",+ "de": "Konfiguration anzeigen",+ "fr": "Afficher la configuration",+ "it": "Mostra configurazione",+ "pt": "Mostrar configuração",+ "es": "Mostrar configuración",+ "ca": "Mostra la configuració",+ "tr": "Yapılandırmayı göster",+ "uk": "Показати конфігурацію"+ },+ "ONBOARDING$BACKEND_HIDE_CONFIGURATION": {+ "en": "Hide configuration",+ "ja": "設定を非表示",+ "zh-CN": "隐藏配置",+ "zh-TW": "隱藏設定",+ "ko-KR": "구성 숨기기",+ "no": "Skjul konfigurasjon",+ "ar": "إخفاء الإعدادات",+ "de": "Konfiguration ausblenden",+ "fr": "Masquer la configuration",+ "it": "Nascondi configurazione",+ "pt": "Ocultar configuração",+ "es": "Ocultar configuración",+ "ca": "Amaga la configuració",+ "tr": "Yapılandırmayı gizle",+ "uk": "Приховати конфігурацію"},"ONBOARDING$BACKEND_CHECKING": {"en": "Checking your backend connection…",@@ -27795,21 +27829,21 @@"uk": "Надішліть перше повідомлення до OpenHands. Почнемо нову розмову без робочого простору."},"ONBOARDING$HELLO_DEFAULT_MESSAGE": {- "en": "Create a basic webpage explaining what OpenHands can do",- "ja": "OpenHands でできることを説明する簡単な Web ページを作成して",- "zh-CN": "创建一个简单的网页,说明 OpenHands 能做什么",- "zh-TW": "建立一個簡單的網頁,說明 OpenHands 能做什麼",- "ko-KR": "OpenHands가 무엇을 할 수 있는지 설명하는 간단한 웹페이지를 만들어 줘",- "no": "Lag en enkel nettside som forklarer hva OpenHands kan gjøre",- "ar": "أنشئ صفحة ويب بسيطة تشرح ما يمكن لـ OpenHands القيام به",- "de": "Erstelle eine einfache Webseite, die erklärt, was OpenHands leisten kann",- "fr": "Crée une page web simple expliquant ce que peut faire OpenHands",- "it": "Crea una pagina web semplice che spieghi cosa può fare OpenHands",- "pt": "Crie uma página web básica explicando o que o OpenHands pode fazer",- "es": "Crea una página web sencilla que explique lo que puede hacer OpenHands",- "ca": "Crea una pàgina web senzilla que expliqui què pot fer OpenHands",- "tr": "OpenHands'in neler yapabileceğini anlatan basit bir web sayfası oluştur",- "uk": "Створи просту вебсторінку, що пояснює, на що здатний OpenHands"+ "en": "Create a basic webpage explaining what OpenHands can do.",+ "ja": "OpenHands でできることを説明する簡単な Web ページを作成して。",+ "zh-CN": "创建一个简单的网页,说明 OpenHands 能做什么。",+ "zh-TW": "建立一個簡單的網頁,說明 OpenHands 能做什麼。",+ "ko-KR": "OpenHands가 무엇을 할 수 있는지 설명하는 간단한 웹페이지를 만들어 줘.",+ "no": "Lag en enkel nettside som forklarer hva OpenHands kan gjøre.",+ "ar": "أنشئ صفحة ويب بسيطة تشرح ما يمكن لـ OpenHands القيام به.",+ "de": "Erstelle eine einfache Webseite, die erklärt, was OpenHands leisten kann.",+ "fr": "Crée une page web simple expliquant ce que peut faire OpenHands.",+ "it": "Crea una pagina web semplice che spieghi cosa può fare OpenHands.",+ "pt": "Crie uma página web básica explicando o que o OpenHands pode fazer.",+ "es": "Crea una página web sencilla que explique lo que puede hacer OpenHands.",+ "ca": "Crea una pàgina web senzilla que expliqui què pot fer OpenHands.",+ "tr": "OpenHands'in neler yapabileceğini anlatan basit bir web sayfası oluştur.",+ "uk": "Створи просту вебсторінку, що пояснює, на що здатний OpenHands."},"ONBOARDING$HELLO_LAUNCH": {"en": "Send",diff --git a/src/routes/home.tsx b/src/routes/home.tsxindex 84578dde6b..fbe36cbbce 100644--- a/src/routes/home.tsx+++ b/src/routes/home.tsx@@ -1,11 +1,17 @@-import { PrefetchPageLinks } from "react-router";+import { PrefetchPageLinks, useLocation } from "react-router";import { HomeChatLauncher } from "#/components/features/home/home-chat-launcher";import { LlmNotConfiguredBanner } from "#/components/features/home/llm-not-configured-banner";-import { OnboardingHost } from "#/components/features/onboarding";+import {+ isOnboardingPreviewActive,+ OnboardingHost,+} from "#/components/features/onboarding";<PrefetchPageLinks page="/conversations/:conversationId" />;function HomeScreen() {+ const location = useLocation();+ const isPreview = isOnboardingPreviewActive(location.search);+return (<divdata-testid="home-screen"@@ -17,7 +23,7 @@ function HomeScreen() {<HomeChatLauncher /></div>- <OnboardingHost />+ {!isPreview ? <OnboardingHost /> : null}</div>);}diff --git a/src/routes/llm-settings.tsx b/src/routes/llm-settings.tsxindex 5ccd0e5668..885b3903c0 100644--- a/src/routes/llm-settings.tsx+++ b/src/routes/llm-settings.tsx@@ -104,6 +104,7 @@ export function LlmSettingsScreen({initialValueOverrides,embedded,hideSaveButton,+ suppressSuccessToast,onSaveControlChange,}: {scope?: SettingsScope;@@ -116,6 +117,8 @@ export function LlmSettingsScreen({/** Forwarded to {@link SdkSectionPage}. */hideSaveButton?: boolean;/** Forwarded to {@link SdkSectionPage}. */+ suppressSuccessToast?: boolean;+ /** Forwarded to {@link SdkSectionPage}. */onSaveControlChange?: (control: SdkSectionSaveControl) => void;}) {const { t } = useTranslation("openhands");@@ -308,6 +311,7 @@ export function LlmSettingsScreen({initialValueOverrides={initialValueOverrides}embedded={embedded}hideSaveButton={hideSaveButton}+ suppressSuccessToast={suppressSuccessToast}onSaveControlChange={onSaveControlChange}testId="llm-settings-screen"/>diff --git a/src/routes/root-layout.tsx b/src/routes/root-layout.tsxindex b4117f6f30..8c71edabdd 100644--- a/src/routes/root-layout.tsx+++ b/src/routes/root-layout.tsx@@ -18,6 +18,8 @@ import { useSyncPostHogConsent } from "#/hooks/use-sync-posthog-consent";import { LoadingSpinner } from "#/components/shared/loading-spinner";import { useAppTitle } from "#/hooks/use-app-title";import { ReactRouterNavigationProvider } from "./react-router-navigation-provider";+import { OnboardingHost } from "#/components/features/onboarding";+import { isOnboardingPreviewActive } from "#/components/features/onboarding/onboarding-preview";// Lazy-load components that are only rendered conditionally — keeps them out// of the root layout's eager dev/prod graph (and out of every page's first@@ -111,6 +113,7 @@ export default function MainApp() {const hideMobileSidebarMenuBar = /^\/conversations\/[^/]+/.test(location.pathname,);+ const showOnboardingPreview = isOnboardingPreviewActive(location.search);return (<ReactRouterNavigationProvider>@@ -159,6 +162,7 @@ export default function MainApp() {<React.Suspense fallback={null}><EnvironmentSwitchOverlay /></React.Suspense>+ {showOnboardingPreview ? <OnboardingHost /> : null}</SidebarMobileNavProvider></ReactRouterNavigationProvider>);