From 7650a66f9747ac011dec153dc341dd985a9e728b Mon Sep 17 00:00:00 2001 From: Lambda Date: Mon, 3 Aug 2026 01:20:43 +0800 Subject: [PATCH] fix(onboarding): close the gap above the step CTA and put Log out back on one row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two defects that read as one thing on screen: a large empty block sitting directly above the primary button. The card list was capped at STEP_MEASURE along with the form. That cap exists so a workspace name does not get an 800px input — a good reason for a text field and a bad one for selection cards, which are a list like the runtime grid. Capped, they stopped 299px short of the CTA, leaving a void above the button. The cards take the frame now; only the form keeps the reading measure. Log out came in from main as `fixed right-8 top-8`, pinned to the window corner. Its own comment says the fixed position exists to survive the flow's full-bleed layouts — which is what the measured frame replaced, so it landed outside the measure and above Back / Step N of N as a second header row. It now rides the header row on the frame. StepShellHeader takes it as a `trailing` slot rather than rendering it: calling useLogout inside the shared header forced a QueryClient into five step test files just to render a header bar. The flow injects it, matching how runtimeInstructions is already threaded, and the header stays presentational. Co-authored-by: multica-agent --- .../components/onboarding-logout-button.tsx | 19 +++++++++--- .../onboarding/components/step-shell.tsx | 7 +++++ packages/views/onboarding/onboarding-flow.tsx | 30 ++++++++++++------- .../views/onboarding/steps/step-about-you.tsx | 8 +++-- .../onboarding/steps/step-platform-fork.tsx | 6 +++- .../onboarding/steps/step-runtime-connect.tsx | 11 +++++-- .../views/onboarding/steps/step-workspace.tsx | 9 ++++-- 7 files changed, 68 insertions(+), 22 deletions(-) diff --git a/packages/views/onboarding/components/onboarding-logout-button.tsx b/packages/views/onboarding/components/onboarding-logout-button.tsx index 5ba13e99b1..ab46ec05e0 100644 --- a/packages/views/onboarding/components/onboarding-logout-button.tsx +++ b/packages/views/onboarding/components/onboarding-logout-button.tsx @@ -2,16 +2,24 @@ import { LogOut } from "lucide-react"; import { Button } from "@multica/ui/components/ui/button"; +import { cn } from "@multica/ui/lib/utils"; import { useLogout } from "../../auth"; import { useT } from "../../i18n"; /** * Account-switch escape hatch shared by every onboarding step. * - * The fixed position keeps it available across the flow's full-bleed layouts, - * including the narrow mobile layout where the issue was originally reported. + * `fixed` only for the welcome screen, which has no step header to sit in. + * Every other step passes `inline` so it rides the header row on STEP_FRAME: + * pinning it to the window corner put it outside the measure and above + * Back / Step N of N, which read as a second header row. */ -export function OnboardingLogoutButton() { +export function OnboardingLogoutButton({ + inline = false, +}: { + /** Render in normal flow (inside a step header) instead of pinned. */ + inline?: boolean; +} = {}) { const { t } = useT("onboarding"); const logout = useLogout(); @@ -19,7 +27,10 @@ export function OnboardingLogoutButton() {