Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(cloud): solid modal surface + stepped, centered LU Cloud gate

purple3bff8e3fe84a
diff --git a/e2e/support/cloud-mock.ts b/e2e/support/cloud-mock.ts
index 47d805cd..1e3e26c5 100644
--- a/e2e/support/cloud-mock.ts
+++ b/e2e/support/cloud-mock.ts
@@ -207,9 +207,12 @@ export function cloudSwitch(page: Page) {
return page.getByRole('switch', { name: /^Cloud$/i })
}
-/** Sign in through the CloudGateModal that the header switch opens. */
+/** Sign in through the CloudGateModal that the header switch opens. The
+ * signed-out gate is a stepped flow: hero → plans → in-app sign-in. */
export async function signInViaGate(page: Page): Promise<void> {
await cloudSwitch(page).click()
+ await page.getByRole('button', { name: /Get LU Cloud/i }).click()
+ await page.getByRole('button', { name: /Already got an account/i }).click()
await page.getByPlaceholder('Email').fill('[email protected]')
await page.getByPlaceholder('Password').fill('e2e-password')
await page.getByRole('button', { name: /^Sign in$/i }).click()
diff --git a/src/components/cloud/CloudGateModal.tsx b/src/components/cloud/CloudGateModal.tsx
index 47ea3561..5006034f 100644
--- a/src/components/cloud/CloudGateModal.tsx
+++ b/src/components/cloud/CloudGateModal.tsx
@@ -1,15 +1,16 @@
// The gate in front of the global Cloud mode. Opened by the header's purple
-// Cloud switch whenever the cloud axis isn't usable yet. David 2026-07-10:
-// every no-subscription state offers FOUR options — back to Local (switch
-// stays off) or one of the three plans (Hosted / Pro / Max), which open
-// lu-labs.ai/pricing in the browser (login → pay there). Signed-out
-// additionally offers the in-app login for accounts that already subscribed.
-// The moment deriveCloudAvailable passes, the mode flips — via the one-time
-// cloud onboarding on the very first flip.
-// Payment stays on lu-labs.ai (browser) — the app never touches Stripe.
+// Cloud switch whenever the cloud axis isn't usable yet.
+//
+// David 2026-07-11 redesign: a CENTERED, STEPPED flow instead of one crowded
+// screen. Signed-out walks: (1) a "LU Cloud" hero with the hosted-GPU pitch,
+// (2) the three plans to pick + "Stay on Local", with "Already got an account?"
+// underneath → (3) the in-app sign-in. Every no-subscription state still offers
+// back-to-Local or a plan (Hosted / Pro / Max → lu-labs.ai/pricing). The moment
+// deriveCloudAvailable passes, the mode flips (via the one-time onboarding on
+// the first flip). Payment stays on lu-labs.ai — the app never touches Stripe.
-import { useEffect, useRef } from 'react'
-import { Cloud, ExternalLink, HardDrive, RefreshCw } from 'lucide-react'
+import { useEffect, useRef, useState } from 'react'
+import { Cloud, ExternalLink, HardDrive, RefreshCw, ArrowLeft, ArrowRight } from 'lucide-react'
import { Modal } from '../ui/Modal'
import { useUIStore } from '../../stores/uiStore'
import { useSettingsStore } from '../../stores/settingsStore'
@@ -25,38 +26,54 @@ const PLANS = [
{ anchor: 'max', name: 'Max' },
] as const
-/** David's 4-options block: three plan buttons → pricing in the browser,
- * plus "Stay on Local" so the switch simply stays off. */
-function PlanOptions({ onLocal }: { onLocal: () => void }) {
+/** Three plan buttons → pricing in the browser. */
+function PlanGrid() {
return (
- <div className="space-y-2">
- <p className="text-[0.65rem] text-gray-500 dark:text-gray-500">
- Pick a plan on lu-labs.ai — payment stays in the browser.
- </p>
- <div className="grid grid-cols-3 gap-2">
- {PLANS.map((p) => (
- <button
- key={p.anchor}
- onClick={() => void openExternal(`${CLOUD_BASE}/pricing#${p.anchor}`)}
- className="flex flex-col items-center gap-0.5 px-2 py-2 rounded-lg border border-[#7c3aed]/40 bg-[#7c3aed]/5 hover:bg-[#7c3aed]/15 transition-colors"
- >
- <span className="text-[0.7rem] font-semibold text-[#7c3aed] dark:text-[#a78bfa]">{p.name}</span>
- <span className="flex items-center gap-1 text-[0.55rem] text-gray-500">
- <ExternalLink size={8} /> lu-labs.ai
- </span>
- </button>
- ))}
- </div>
- <button
- onClick={onLocal}
- className="w-full flex items-center justify-center gap-1.5 px-3 py-1.5 rounded text-[0.7rem] font-medium border border-gray-200 dark:border-white/10 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-white/5 transition-colors"
- >
- <HardDrive size={11} /> Stay on Local
- </button>
+ <div className="grid grid-cols-3 gap-2">
+ {PLANS.map((p) => (
+ <button
+ key={p.anchor}
+ onClick={() => void openExternal(`${CLOUD_BASE}/pricing#${p.anchor}`)}
+ className="flex flex-col items-center gap-0.5 px-2 py-3 rounded-lg border border-[#7c3aed]/40 bg-[#7c3aed]/5 hover:bg-[#7c3aed]/15 transition-colors"
+ >
+ <span className="text-[0.8rem] font-semibold text-[#7c3aed] dark:text-[#a78bfa]">{p.name}</span>
+ <span className="flex items-center gap-1 text-[0.55rem] text-gray-500">
+ <ExternalLink size={8} /> lu-labs.ai
+ </span>
+ </button>
+ ))}
</div>
)
}
+function StayLocalButton({ onLocal }: { onLocal: () => void }) {
+ return (
+ <button
+ onClick={onLocal}
+ className="w-full flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[0.72rem] font-medium border border-gray-200 dark:border-white/10 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-white/5 transition-colors"
+ >
+ <HardDrive size={12} /> Stay on Local
+ </button>
+ )
+}
+
+/** The purple cloud emblem that headlines every step. */
+function CloudHero({ subtitle }: { subtitle?: string }) {
+ return (
+ <div className="flex flex-col items-center text-center gap-2">
+ <span className="flex h-12 w-12 items-center justify-center rounded-2xl bg-[#7c3aed]/10 text-[#7c3aed] dark:text-[#a78bfa]">
+ <Cloud size={24} />
+ </span>
+ <h2 className="text-xl font-semibold text-gray-900 dark:text-white">LU Cloud</h2>
+ {subtitle && (
+ <p className="text-[0.75rem] leading-relaxed text-gray-600 dark:text-gray-400 max-w-xs">{subtitle}</p>
+ )}
+ </div>
+ )
+}
+
+type Step = 'intro' | 'plans' | 'login'
+
export function CloudGateModal() {
const open = useUIStore((s) => s.cloudGateOpen)
const setOpen = useUIStore((s) => s.setCloudGateOpen)
@@ -72,13 +89,16 @@ export function CloudGateModal() {
const quota = useCloudAuthStore((s) => s.quota)
const available = deriveCloudAvailable({ user, licenseActive, access, quota })
+ // Signed-out walkthrough position. Reset to the hero every time the gate
+ // opens so a re-open never lands mid-flow.
+ const [step, setStep] = useState<Step>('intro')
+ useEffect(() => { if (open) setStep('intro') }, [open])
+
// The moment the account clears every gate (fresh login, re-check after
// subscribing), flip the global switch and get out of the way — via the
// one-time cloud onboarding when this is the first successful flip.
const wasOpen = useRef(false)
- useEffect(() => {
- wasOpen.current = open
- }, [open])
+ useEffect(() => { wasOpen.current = open }, [open])
useEffect(() => {
if (wasOpen.current && available) {
setOpen(false)
@@ -98,81 +118,122 @@ export function CloudGateModal() {
if (open) void refresh()
}, [open, refresh])
- const linkBtn =
- 'flex items-center gap-1.5 px-3 py-1.5 rounded text-[0.7rem] font-medium bg-gray-900 text-white dark:bg-white dark:text-gray-900 hover:opacity-90 transition-opacity'
+ const primaryBtn =
+ 'w-full flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[0.72rem] font-medium bg-[#7c3aed] text-white hover:opacity-90 transition-opacity'
const ghostBtn =
- 'flex items-center gap-1.5 px-3 py-1.5 rounded text-[0.7rem] font-medium border border-gray-200 dark:border-white/10 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-white/5 transition-colors'
+ 'w-full flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[0.72rem] font-medium border border-gray-200 dark:border-white/10 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-white/5 transition-colors'
+ const linkRow =
+ 'flex items-center justify-center gap-1 text-[0.68rem] text-gray-500 hover:text-gray-800 dark:hover:text-gray-200 transition-colors'
+
+ const signedOut = status === 'signed-out' || !user
return (
- <Modal open={open} onClose={() => setOpen(false)} title="LU Cloud">
- {status === 'signed-out' || !user ? (
- <div className="space-y-3">
- <p className="text-[0.75rem] text-gray-600 dark:text-gray-400 flex items-start gap-2">
- <Cloud size={14} className="mt-0.5 shrink-0" />
- Cloud mode runs chat, image and video on LU's hosted GPUs with your
- lu-labs.ai account. Local mode stays free and never needs one.
- </p>
- <PlanOptions onLocal={stayLocal} />
- <div className="pt-1 border-t border-gray-200 dark:border-white/10">
- <p className="text-[0.65rem] text-gray-500 dark:text-gray-500 pt-2 pb-1">
- Already subscribed? Sign in:
- </p>
- <AccountPanel />
+ <Modal open={open} onClose={() => setOpen(false)} title="LU Cloud" hideHeader>
+ {signedOut ? (
+ step === 'intro' ? (
+ <div className="space-y-5 pt-2">
+ <CloudHero subtitle="Run chat, image and video on LU's hosted GPU fleet with your lu-labs.ai account — the full cloud catalog, no downloads, no VRAM limits. Local mode stays free and never needs an account." />
+ <div className="space-y-2 max-w-xs mx-auto">
+ <button onClick={() => setStep('plans')} className={primaryBtn}>
+ Get LU Cloud <ArrowRight size={13} />
+ </button>
+ <StayLocalButton onLocal={stayLocal} />
+ </div>
</div>
- </div>
+ ) : step === 'plans' ? (
+ <div className="space-y-5 pt-2">
+ <CloudHero subtitle="Pick a plan on lu-labs.ai — payment stays in the browser." />
+ <div className="space-y-3 max-w-xs mx-auto">
+ <PlanGrid />
+ <StayLocalButton onLocal={stayLocal} />
+ <div className="pt-1 flex items-center gap-2">
+ <div className="flex-1 h-px bg-gray-200 dark:bg-white/10" />
+ <span className="text-[0.6rem] text-gray-400 dark:text-gray-600">or</span>
+ <div className="flex-1 h-px bg-gray-200 dark:bg-white/10" />
+ </div>
+ <button onClick={() => setStep('login')} className={linkRow + ' w-full'}>
+ Already got an account? Sign in <ArrowRight size={11} />
+ </button>
+ </div>
+ </div>
+ ) : (
+ /* step === 'login' */
+ <div className="space-y-4 pt-2">
+ <CloudHero subtitle="Sign in with the account you subscribed with." />
+ <div className="max-w-xs mx-auto">
+ <AccountPanel />
+ <button onClick={() => setStep('plans')} className={linkRow + ' w-full mt-3'}>
+ <ArrowLeft size={11} /> Back to plans
+ </button>
+ </div>
+ </div>
+ )
) : !licenseActive ? (
- <div className="space-y-3">
- <p className="text-[0.75rem] text-gray-600 dark:text-gray-400">
- You're signed in as <span className="text-gray-900 dark:text-gray-100">{user.email ?? user.id}</span>,
- but this account has no active plan yet. LU Cloud is part of the paid plans on lu-labs.ai.
- </p>
- <PlanOptions onLocal={stayLocal} />
- <button className={ghostBtn} onClick={() => void refresh()}>
- <RefreshCw size={11} /> I subscribed — re-check
- </button>
+ <div className="space-y-5 pt-2">
+ <CloudHero />
+ <div className="space-y-3 max-w-xs mx-auto">
+ <p className="text-[0.72rem] text-center text-gray-600 dark:text-gray-400">
+ You're signed in as <span className="text-gray-900 dark:text-gray-100">{user.email ?? user.id}</span>,
+ but this account has no active plan yet. LU Cloud is part of the paid plans.
+ </p>
+ <PlanGrid />
+ <StayLocalButton onLocal={stayLocal} />
+ <button className={ghostBtn} onClick={() => void refresh()}>
+ <RefreshCw size={12} /> I subscribed — re-check
+ </button>
+ </div>
</div>
) : !access ? (
- <div className="space-y-3">
- <p className="text-[0.75rem] text-gray-600 dark:text-gray-400">
- LU Cloud is in a closed beta right now (Max plan only). Your plan is
- active, but the beta hasn't opened for it yet — you'll get in the
- moment it does, nothing to reinstall.
- </p>
- <PlanOptions onLocal={stayLocal} />
- <button className={ghostBtn} onClick={() => void refresh()}>
- <RefreshCw size={11} /> Re-check
- </button>
+ <div className="space-y-5 pt-2">
+ <CloudHero />
+ <div className="space-y-3 max-w-xs mx-auto">
+ <p className="text-[0.72rem] text-center text-gray-600 dark:text-gray-400">
+ LU Cloud is in a closed beta right now (Max plan only). Your plan is
+ active, but the beta hasn't opened for it yet — you'll get in the
+ moment it does, nothing to reinstall.
+ </p>
+ <StayLocalButton onLocal={stayLocal} />
+ <button className={ghostBtn} onClick={() => void refresh()}>
+ <RefreshCw size={12} /> Re-check
+ </button>
+ </div>
</div>
) : quota === null ? (
- <div className="space-y-3">
- <p className="text-[0.75rem] text-gray-600 dark:text-gray-400">
- Your plan is active, but your usage couldn't be loaded just now, so
- Cloud mode can't switch on yet. Check your connection and re-check.
- </p>
- <div className="flex items-center gap-2">
+ <div className="space-y-5 pt-2">
+ <CloudHero />
+ <div className="space-y-3 max-w-xs mx-auto">
+ <p className="text-[0.72rem] text-center text-gray-600 dark:text-gray-400">
+ Your plan is active, but your usage couldn't be loaded just now, so
+ Cloud mode can't switch on yet. Check your connection and re-check.
+ </p>
+ <StayLocalButton onLocal={stayLocal} />
<button className={ghostBtn} onClick={() => void refresh()}>
- <RefreshCw size={11} /> Re-check
+ <RefreshCw size={12} /> Re-check
</button>
</div>
</div>
) : quota.limits.credits <= 0 ? (
- <div className="space-y-3">
- <p className="text-[0.75rem] text-gray-600 dark:text-gray-400">
- Your plan is active, but it doesn't include a hosted-compute credit
- budget, so there's nothing for Cloud mode to run on. Plans with
- cloud credits are on lu-labs.ai.
- </p>
- <div className="flex items-center gap-2">
- <button className={linkBtn} onClick={() => void openExternal(`${CLOUD_BASE}/account`)}>
- <ExternalLink size={11} /> Open your account on lu-labs.ai
+ <div className="space-y-5 pt-2">
+ <CloudHero />
+ <div className="space-y-3 max-w-xs mx-auto">
+ <p className="text-[0.72rem] text-center text-gray-600 dark:text-gray-400">
+ Your plan is active, but it doesn't include a hosted-compute credit
+ budget, so there's nothing for Cloud mode to run on. Plans with
+ cloud credits are on lu-labs.ai.
+ </p>
+ <button className={primaryBtn} onClick={() => void openExternal(`${CLOUD_BASE}/account`)}>
+ <ExternalLink size={12} /> Open your account
</button>
+ <StayLocalButton onLocal={stayLocal} />
<button className={ghostBtn} onClick={() => void refresh()}>
- <RefreshCw size={11} /> Re-check
+ <RefreshCw size={12} /> Re-check
</button>
</div>
</div>
) : (
- <p className="text-[0.75rem] text-gray-600 dark:text-gray-400">Checking your account…</p>
+ <div className="pt-2">
+ <CloudHero subtitle="Checking your account…" />
+ </div>
)}
</Modal>
)
diff --git a/src/components/ui/Modal.tsx b/src/components/ui/Modal.tsx
index 2c9814c5..ee9fa8b9 100644
--- a/src/components/ui/Modal.tsx
+++ b/src/components/ui/Modal.tsx
@@ -7,9 +7,18 @@ interface Props {
onClose: () => void
title: string
children: ReactNode
+ /** Hide the default title/X header so the dialog can render its own
+ * centered hero layout (a floating close button is still provided). */
+ hideHeader?: boolean
+ /** Tailwind max-width of the panel. Default `max-w-lg`. */
+ maxWidth?: string
}
-export function Modal({ open, onClose, title, children }: Props) {
+// A modal is a real dialog, so it needs an OPAQUE, elevated surface — not the
+// transparent `.glass-card` (which is `background: transparent` for inline
+// panels). Without this the dialog read straight through to whatever tab was
+// behind it and the white title vanished on a light surface.
+export function Modal({ open, onClose, title, children, hideHeader, maxWidth = 'max-w-lg' }: Props) {
return (
<AnimatePresence>
{open && (
@@ -21,22 +30,35 @@ export function Modal({ open, onClose, title, children }: Props) {
>
<div className="absolute inset-0 bg-black/60 backdrop-blur-sm" onClick={onClose} />
<motion.div
- className="glass-card relative z-10 w-full max-w-lg rounded-2xl p-6"
+ className={
+ 'relative z-10 w-full rounded-2xl p-6 border border-gray-200 dark:border-white/10 ' +
+ 'bg-white dark:bg-[#161719] shadow-2xl shadow-black/30 ' + maxWidth
+ }
initial={{ scale: 0.9, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
exit={{ scale: 0.9, opacity: 0 }}
transition={{ type: 'spring', damping: 25, stiffness: 300 }}
>
- <div className="flex items-center justify-between mb-4">
- <h2 className="text-lg font-semibold text-white">{title}</h2>
+ {hideHeader ? (
<button
onClick={onClose}
- className="p-1 rounded-lg hover:bg-white/10 text-gray-400 hover:text-white transition-colors"
+ className="absolute top-3 right-3 p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 hover:text-gray-700 dark:hover:text-white transition-colors"
aria-label="Close"
>
- <X size={20} />
+ <X size={18} />
</button>
- </div>
+ ) : (
+ <div className="flex items-center justify-between mb-4">
+ <h2 className="text-lg font-semibold text-gray-900 dark:text-white">{title}</h2>
+ <button
+ onClick={onClose}
+ className="p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 hover:text-gray-700 dark:hover:text-white transition-colors"
+ aria-label="Close"
+ >
+ <X size={20} />
+ </button>
+ </div>
+ )}
{children}
</motion.div>
</motion.div>