Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Tests: a self-hosted install with hosted runs off keeps its words, pinned by golden files

Adarshd935cbf8103a
diff --git a/tests/golden/self-host/engine-switch.html b/tests/golden/self-host/engine-switch.html
new file mode 100644
index 00000000..93aaad9c
--- /dev/null
+++ b/tests/golden/self-host/engine-switch.html
@@ -0,0 +1,130 @@
+<a aria-label="Open source. Runs on your own GPU. Add a fal.ai or Replicate key to use paid models." class="inline-flex shrink-0 items-center gap-1.5 rounded-full bg-muted px-3 text-[13px] font-medium whitespace-nowrap text-muted-foreground transition-colors h-8 sm:h-9 hover:text-foreground" data-state="closed" data-slot="tooltip-trigger" href="/settings#your-keys">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu size-3.5" aria-hidden="true">
+<path d="M12 20v2">
+</path>
+<path d="M12 2v2">
+</path>
+<path d="M17 20v2">
+</path>
+<path d="M17 2v2">
+</path>
+<path d="M2 12h2">
+</path>
+<path d="M2 17h2">
+</path>
+<path d="M2 7h2">
+</path>
+<path d="M20 12h2">
+</path>
+<path d="M20 17h2">
+</path>
+<path d="M20 7h2">
+</path>
+<path d="M7 20v2">
+</path>
+<path d="M7 2v2">
+</path>
+<rect x="4" y="4" width="16" height="16" rx="2">
+</rect>
+<rect x="8" y="8" width="8" height="8" rx="1">
+</rect>
+</svg>
+<span class="hidden sm:inline">Open source</span>
+<span class="sm:hidden">Add key</span>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lock size-3 opacity-60" aria-hidden="true">
+<rect width="18" height="11" x="3" y="11" rx="2" ry="2">
+</rect>
+<path d="M7 11V7a5 5 0 0 1 10 0v4">
+</path>
+</svg>
+</a>
+
+<div role="radiogroup" aria-label="Engine" class="relative inline-grid shrink-0 grid-cols-2 rounded-full bg-muted p-0.5 h-8 sm:h-9">
+<span aria-hidden="true" class="absolute inset-y-0.5 left-0.5 w-[calc(50%-2px)] rounded-full bg-background shadow-soft transition-transform duration-300 ease-move" style="transform:translateX(100%)">
+</span>
+<button type="button" role="radio" aria-checked="false" tabindex="-1" aria-label="Cloud" class="relative z-10 flex items-center justify-center gap-1.5 rounded-full text-[13px] font-medium whitespace-nowrap transition-colors w-9 sm:w-auto sm:px-3 text-muted-foreground hover:text-foreground" data-state="closed" data-slot="tooltip-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud size-3.5" aria-hidden="true">
+<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z">
+</path>
+</svg>
+<span class="hidden sm:inline">Cloud</span>
+</button>
+<button type="button" role="radio" aria-checked="true" tabindex="0" aria-label="Open source" class="relative z-10 flex items-center justify-center gap-1.5 rounded-full text-[13px] font-medium whitespace-nowrap transition-colors w-9 sm:w-auto sm:px-3 text-foreground" data-state="closed" data-slot="tooltip-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu size-3.5" aria-hidden="true">
+<path d="M12 20v2">
+</path>
+<path d="M12 2v2">
+</path>
+<path d="M17 20v2">
+</path>
+<path d="M17 2v2">
+</path>
+<path d="M2 12h2">
+</path>
+<path d="M2 17h2">
+</path>
+<path d="M2 7h2">
+</path>
+<path d="M20 12h2">
+</path>
+<path d="M20 17h2">
+</path>
+<path d="M20 7h2">
+</path>
+<path d="M7 20v2">
+</path>
+<path d="M7 2v2">
+</path>
+<rect x="4" y="4" width="16" height="16" rx="2">
+</rect>
+<rect x="8" y="8" width="8" height="8" rx="1">
+</rect>
+</svg>
+<span class="hidden sm:inline">Open source</span>
+</button>
+</div>
+
+<div role="radiogroup" aria-label="Engine" class="relative inline-grid shrink-0 grid-cols-2 rounded-full bg-muted p-0.5 h-8 sm:h-9">
+<span aria-hidden="true" class="absolute inset-y-0.5 left-0.5 w-[calc(50%-2px)] rounded-full bg-background shadow-soft transition-transform duration-300 ease-move" style="transform:translateX(100%)">
+</span>
+<button type="button" role="radio" aria-checked="false" tabindex="-1" aria-label="Cloud" class="relative z-10 flex items-center justify-center gap-1.5 rounded-full text-[13px] font-medium whitespace-nowrap transition-colors w-9 sm:w-auto sm:px-3 text-muted-foreground hover:text-foreground" data-state="closed" data-slot="tooltip-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud size-3.5" aria-hidden="true">
+<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z">
+</path>
+</svg>
+<span class="hidden sm:inline">Cloud</span>
+</button>
+<button type="button" role="radio" aria-checked="true" tabindex="0" aria-label="Open source" class="relative z-10 flex items-center justify-center gap-1.5 rounded-full text-[13px] font-medium whitespace-nowrap transition-colors w-9 sm:w-auto sm:px-3 text-foreground" data-state="closed" data-slot="tooltip-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu size-3.5" aria-hidden="true">
+<path d="M12 20v2">
+</path>
+<path d="M12 2v2">
+</path>
+<path d="M17 20v2">
+</path>
+<path d="M17 2v2">
+</path>
+<path d="M2 12h2">
+</path>
+<path d="M2 17h2">
+</path>
+<path d="M2 7h2">
+</path>
+<path d="M20 12h2">
+</path>
+<path d="M20 17h2">
+</path>
+<path d="M20 7h2">
+</path>
+<path d="M7 20v2">
+</path>
+<path d="M7 2v2">
+</path>
+<rect x="4" y="4" width="16" height="16" rx="2">
+</rect>
+<rect x="8" y="8" width="8" height="8" rx="1">
+</rect>
+</svg>
+<span class="hidden sm:inline">Open source</span>
+</button>
+</div>
\ No newline at end of file
diff --git a/tests/golden/self-host/feed-tiles.html b/tests/golden/self-host/feed-tiles.html
new file mode 100644
index 00000000..963ab4e0
--- /dev/null
+++ b/tests/golden/self-host/feed-tiles.html
@@ -0,0 +1,77 @@
+<div class="relative h-full max-w-full overflow-hidden rounded-xl bg-muted" style="aspect-ratio:1">
+<div class="skeleton-sweep absolute inset-0 animate-skeleton">
+</div>
+<div class="absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 p-3">
+<div class="min-w-0">
+<p title="Queued" class="shimmer-text animate-shimmer-text line-clamp-2 text-[13px] font-medium">Queued</p>
+<p class="flex flex-wrap gap-x-1.5 font-mono text-[11px] text-muted-foreground tabular-nums">
+<span class="">1m 30s</span>
+</p>
+</div>
+<button class="grid size-7 shrink-0 place-items-center rounded-full bg-background/70 text-muted-foreground hover:text-foreground" aria-label="Cancel" data-state="closed" data-slot="tooltip-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x size-3.5" aria-hidden="true">
+<path d="M18 6 6 18">
+</path>
+<path d="m6 6 12 12">
+</path>
+</svg>
+</button>
+</div>
+</div>
+
+<div class="relative h-full max-w-full overflow-hidden rounded-xl bg-muted" style="aspect-ratio:1">
+<div class="skeleton-sweep absolute inset-0 animate-skeleton">
+</div>
+<div class="absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 p-3">
+<div class="min-w-0">
+<p title="Generating" class="shimmer-text animate-shimmer-text line-clamp-2 text-[13px] font-medium">Generating</p>
+<p class="flex flex-wrap gap-x-1.5 font-mono text-[11px] text-muted-foreground tabular-nums">
+<span>42%</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">1m 30s</span>
+</p>
+</div>
+<button class="grid size-7 shrink-0 place-items-center rounded-full bg-background/70 text-muted-foreground hover:text-foreground" aria-label="Cancel" data-state="closed" data-slot="tooltip-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x size-3.5" aria-hidden="true">
+<path d="M18 6 6 18">
+</path>
+<path d="m6 6 12 12">
+</path>
+</svg>
+</button>
+</div>
+<div class="absolute inset-x-0 top-0 h-0.5 bg-transparent">
+<div class="h-full origin-left bg-primary transition-transform duration-(--motion-slow) ease-standard" style="transform:scaleX(0.42)">
+</div>
+</div>
+</div>
+
+<div class="flex h-full max-w-full flex-col justify-between rounded-xl border border-dashed bg-background p-3" style="aspect-ratio:1">
+<div class="min-h-0 space-y-1 overflow-hidden">
+<p class="text-[13px] font-medium">Couldn&#x27;t generate this one</p>
+<p class="line-clamp-5 text-[12px] leading-snug break-words whitespace-pre-line text-muted-foreground">Your GPU ran out of memory. Try a smaller size or a shorter clip.</p>
+</div>
+<div class="mt-2 flex flex-wrap gap-1.5">
+<button class="inline-flex h-7 w-fit items-center gap-1.5 rounded-full bg-secondary px-2.5 text-[12px] font-medium hover:bg-accent">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-ccw size-3" aria-hidden="true">
+<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8">
+</path>
+<path d="M3 3v5h5">
+</path>
+</svg> Retry</button>
+</div>
+</div>
+
+<div class="flex h-full max-w-full flex-col justify-between rounded-xl border border-dashed bg-background p-3" style="aspect-ratio:1">
+<div class="min-h-0 space-y-1 overflow-hidden">
+<p class="text-[13px] font-medium">Canceled</p>
+</div>
+<div class="mt-2 flex flex-wrap gap-1.5">
+<button class="inline-flex h-7 w-fit items-center gap-1.5 rounded-full bg-secondary px-2.5 text-[12px] font-medium hover:bg-accent">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-ccw size-3" aria-hidden="true">
+<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8">
+</path>
+<path d="M3 3v5h5">
+</path>
+</svg> Retry</button>
+</div>
+</div>
\ No newline at end of file
diff --git a/tests/golden/self-host/feed.html b/tests/golden/self-host/feed.html
new file mode 100644
index 00000000..34791230
--- /dev/null
+++ b/tests/golden/self-host/feed.html
@@ -0,0 +1,282 @@
+<div class="space-y-9">
+<section data-gen-id="g-open" class="group/gen space-y-2.5 [contain-intrinsic-size:auto_330px] [content-visibility:auto]">
+<header class="flex items-start gap-3">
+<div class="min-w-0 flex-1">
+<h2 class="line-clamp-2 font-heading text-[19px] leading-snug" title="a fox in the snow">a fox in the snow</h2>
+<p class="mt-0.5 flex flex-wrap items-center gap-x-1.5 text-[12px] text-muted-foreground">
+<span class="inline-flex items-center gap-1">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu size-3" aria-hidden="true">
+<path d="M12 20v2">
+</path>
+<path d="M12 2v2">
+</path>
+<path d="M17 20v2">
+</path>
+<path d="M17 2v2">
+</path>
+<path d="M2 12h2">
+</path>
+<path d="M2 17h2">
+</path>
+<path d="M2 7h2">
+</path>
+<path d="M20 12h2">
+</path>
+<path d="M20 17h2">
+</path>
+<path d="M20 7h2">
+</path>
+<path d="M7 20v2">
+</path>
+<path d="M7 2v2">
+</path>
+<rect x="4" y="4" width="16" height="16" rx="2">
+</rect>
+<rect x="8" y="8" width="8" height="8" rx="1">
+</rect>
+</svg>Open source</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">oss-z-image-turbo</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">Text to image</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">2m ago</span>
+</p>
+</div>
+<div class="flex shrink-0 items-center gap-0.5 opacity-100 transition-opacity sm:opacity-0 sm:group-hover/gen:opacity-100 sm:focus-within:opacity-100 [@media(hover:none)]:opacity-100">
+<button class="grid size-8 place-items-center rounded-lg text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="More" type="button" id="radix-_R_52p_" aria-haspopup="menu" aria-expanded="false" data-state="closed" data-slot="dropdown-menu-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis lucide-more-horizontal size-4" aria-hidden="true">
+<circle cx="12" cy="12" r="1">
+</circle>
+<circle cx="19" cy="12" r="1">
+</circle>
+<circle cx="5" cy="12" r="1">
+</circle>
+</svg>
+</button>
+</div>
+</header>
+<div class="flex flex-wrap gap-2">
+<div class="group/tile relative h-56 max-w-full cursor-zoom-in overflow-hidden rounded-xl bg-muted sm:h-64" style="aspect-ratio:1">
+<img src="/api/files/a1" alt="" loading="lazy" decoding="async" class="size-full object-cover"/>
+<button type="button" aria-label="Open “a fox in the snow”" class="pointer-events-none absolute inset-0 rounded-xl outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset">
+</button>
+</div>
+</div>
+<div class="empty:-mt-2.5">
+<div role="group" aria-labelledby="_R_6p_" class="min-w-0 space-y-2.5 pt-1">
+<p id="_R_6p_" class="text-[12px] font-semibold tracking-[0.08em] text-brand-text uppercase">Keep going with this picture</p>
+<ul class="scrollbar-none flex gap-2.5 overflow-x-auto overscroll-x-contain max-md:snap-x max-md:snap-mandatory md:flex-wrap md:overflow-visible">
+<li class="shrink-0 snap-start">
+<a class="nav-row flex items-center h-[52px] gap-2.5 rounded-[14px] border bg-card pr-4 pl-1.5 text-card-foreground nav-hover:border-border-strong" href="/video?image=%2Fapi%2Ffiles%2Fa1">
+<span aria-hidden="true" class="relative block shrink-0 overflow-hidden bg-muted size-10 rounded-[10px]">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles lucide-stars absolute inset-0 m-auto size-[42%] max-h-6 max-w-6 text-muted-foreground" aria-hidden="true">
+<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z">
+</path>
+<path d="M20 2v4">
+</path>
+<path d="M22 4h-4">
+</path>
+<circle cx="4" cy="20" r="2">
+</circle>
+</svg>
+</span>
+<span class="flex min-w-0 flex-col leading-tight">
+<span class="text-[13.5px] font-semibold whitespace-nowrap">Animate it</span>
+<span class="text-[11.5px] text-muted-foreground whitespace-nowrap">Video</span>
+</span>
+</a>
+</li>
+<li class="shrink-0 snap-start">
+<a class="nav-row flex items-center h-[52px] gap-2.5 rounded-[14px] border bg-card pr-4 pl-1.5 text-card-foreground nav-hover:border-border-strong" href="/edit?image=%2Fapi%2Ffiles%2Fa1">
+<span aria-hidden="true" class="relative block shrink-0 overflow-hidden bg-muted size-10 rounded-[10px]">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles lucide-stars absolute inset-0 m-auto size-[42%] max-h-6 max-w-6 text-muted-foreground" aria-hidden="true">
+<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z">
+</path>
+<path d="M20 2v4">
+</path>
+<path d="M22 4h-4">
+</path>
+<circle cx="4" cy="20" r="2">
+</circle>
+</svg>
+</span>
+<span class="flex min-w-0 flex-col leading-tight">
+<span class="text-[13.5px] font-semibold whitespace-nowrap">Change it with words</span>
+<span class="text-[11.5px] text-muted-foreground whitespace-nowrap">Edit</span>
+</span>
+</a>
+</li>
+<li class="shrink-0 snap-start">
+<a class="nav-row flex items-center h-[52px] gap-2.5 rounded-[14px] border bg-card pr-4 pl-1.5 text-card-foreground nav-hover:border-border-strong" href="/upscale?image=%2Fapi%2Ffiles%2Fa1">
+<span aria-hidden="true" class="relative block shrink-0 overflow-hidden bg-muted size-10 rounded-[10px]">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles lucide-stars absolute inset-0 m-auto size-[42%] max-h-6 max-w-6 text-muted-foreground" aria-hidden="true">
+<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z">
+</path>
+<path d="M20 2v4">
+</path>
+<path d="M22 4h-4">
+</path>
+<circle cx="4" cy="20" r="2">
+</circle>
+</svg>
+</span>
+<span class="flex min-w-0 flex-col leading-tight">
+<span class="text-[13.5px] font-semibold whitespace-nowrap">Sharpen to 4K</span>
+<span class="text-[11.5px] text-muted-foreground whitespace-nowrap">Upscale</span>
+</span>
+</a>
+</li>
+<li class="shrink-0 snap-start">
+<a class="nav-row flex items-center h-[52px] gap-2.5 rounded-[14px] border bg-card pr-4 pl-1.5 text-card-foreground nav-hover:border-border-strong" href="/color-grade?image=%2Fapi%2Ffiles%2Fa1">
+<span aria-hidden="true" class="relative block shrink-0 overflow-hidden bg-muted size-10 rounded-[10px]">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles lucide-stars absolute inset-0 m-auto size-[42%] max-h-6 max-w-6 text-muted-foreground" aria-hidden="true">
+<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z">
+</path>
+<path d="M20 2v4">
+</path>
+<path d="M22 4h-4">
+</path>
+<circle cx="4" cy="20" r="2">
+</circle>
+</svg>
+</span>
+<span class="flex min-w-0 flex-col leading-tight">
+<span class="text-[13.5px] font-semibold whitespace-nowrap">Color grade</span>
+<span class="text-[11.5px] text-muted-foreground whitespace-nowrap">Color grading</span>
+</span>
+</a>
+</li>
+<li class="shrink-0 snap-start">
+<a class="nav-row flex items-center h-[52px] gap-2.5 rounded-[14px] border bg-card pr-4 pl-1.5 text-card-foreground nav-hover:border-border-strong" href="/image-to-3d?image=%2Fapi%2Ffiles%2Fa1">
+<span aria-hidden="true" class="relative block shrink-0 overflow-hidden bg-muted size-10 rounded-[10px]">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles lucide-stars absolute inset-0 m-auto size-[42%] max-h-6 max-w-6 text-muted-foreground" aria-hidden="true">
+<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z">
+</path>
+<path d="M20 2v4">
+</path>
+<path d="M22 4h-4">
+</path>
+<circle cx="4" cy="20" r="2">
+</circle>
+</svg>
+</span>
+<span class="flex min-w-0 flex-col leading-tight">
+<span class="text-[13.5px] font-semibold whitespace-nowrap">Turn it into 3D</span>
+<span class="text-[11.5px] text-muted-foreground whitespace-nowrap">Image to 3D</span>
+</span>
+</a>
+</li>
+</ul>
+</div>
+</div>
+</section>
+<section data-gen-id="g-cloud" class="group/gen space-y-2.5 [contain-intrinsic-size:auto_330px] [content-visibility:auto]">
+<header class="flex items-start gap-3">
+<div class="min-w-0 flex-1">
+<h2 class="line-clamp-2 font-heading text-[19px] leading-snug" title="a fox in the snow">a fox in the snow</h2>
+<p class="mt-0.5 flex flex-wrap items-center gap-x-1.5 text-[12px] text-muted-foreground">
+<span class="inline-flex items-center gap-1">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud size-3" aria-hidden="true">
+<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z">
+</path>
+</svg>Cloud</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">nano-banana</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">Text to image</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">2m ago</span>
+<span class="font-mono before:mr-1.5 before:content-[&#x27;·&#x27;]">$0.04</span>
+</p>
+</div>
+<div class="flex shrink-0 items-center gap-0.5 opacity-100 transition-opacity sm:opacity-0 sm:group-hover/gen:opacity-100 sm:focus-within:opacity-100 [@media(hover:none)]:opacity-100">
+<button class="grid size-8 place-items-center rounded-lg text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="More" type="button" id="radix-_R_539_" aria-haspopup="menu" aria-expanded="false" data-state="closed" data-slot="dropdown-menu-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis lucide-more-horizontal size-4" aria-hidden="true">
+<circle cx="12" cy="12" r="1">
+</circle>
+<circle cx="19" cy="12" r="1">
+</circle>
+<circle cx="5" cy="12" r="1">
+</circle>
+</svg>
+</button>
+</div>
+</header>
+<div class="flex flex-wrap gap-2">
+<div class="group/tile relative h-56 max-w-full cursor-zoom-in overflow-hidden rounded-xl bg-muted sm:h-64" style="aspect-ratio:1">
+<img src="/api/files/a1" alt="" loading="lazy" decoding="async" class="size-full object-cover"/>
+<button type="button" aria-label="Open “a fox in the snow”" class="pointer-events-none absolute inset-0 rounded-xl outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset">
+</button>
+</div>
+</div>
+</section>
+<section data-gen-id="g-failed" class="group/gen space-y-2.5 [contain-intrinsic-size:auto_330px] [content-visibility:auto]">
+<header class="flex items-start gap-3">
+<div class="min-w-0 flex-1">
+<h2 class="line-clamp-2 font-heading text-[19px] leading-snug" title="a fox in the snow">a fox in the snow</h2>
+<p class="mt-0.5 flex flex-wrap items-center gap-x-1.5 text-[12px] text-muted-foreground">
+<span class="inline-flex items-center gap-1">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cpu size-3" aria-hidden="true">
+<path d="M12 20v2">
+</path>
+<path d="M12 2v2">
+</path>
+<path d="M17 20v2">
+</path>
+<path d="M17 2v2">
+</path>
+<path d="M2 12h2">
+</path>
+<path d="M2 17h2">
+</path>
+<path d="M2 7h2">
+</path>
+<path d="M20 12h2">
+</path>
+<path d="M20 17h2">
+</path>
+<path d="M20 7h2">
+</path>
+<path d="M7 20v2">
+</path>
+<path d="M7 2v2">
+</path>
+<rect x="4" y="4" width="16" height="16" rx="2">
+</rect>
+<rect x="8" y="8" width="8" height="8" rx="1">
+</rect>
+</svg>Open source</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">oss-z-image-turbo</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">Text to image</span>
+<span class="before:mr-1.5 before:content-[&#x27;·&#x27;]">2m ago</span>
+</p>
+</div>
+<div class="flex shrink-0 items-center gap-0.5 opacity-100 transition-opacity sm:opacity-0 sm:group-hover/gen:opacity-100 sm:focus-within:opacity-100 [@media(hover:none)]:opacity-100">
+<button class="grid size-8 place-items-center rounded-lg text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="More" type="button" id="radix-_R_53p_" aria-haspopup="menu" aria-expanded="false" data-state="closed" data-slot="dropdown-menu-trigger">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis lucide-more-horizontal size-4" aria-hidden="true">
+<circle cx="12" cy="12" r="1">
+</circle>
+<circle cx="19" cy="12" r="1">
+</circle>
+<circle cx="5" cy="12" r="1">
+</circle>
+</svg>
+</button>
+</div>
+</header>
+<div class="flex flex-wrap gap-2">
+<div class="h-56 max-w-full sm:h-64">
+<div class="flex h-full max-w-full flex-col justify-between rounded-xl border border-dashed bg-background p-3" style="aspect-ratio:1">
+<div class="min-h-0 space-y-1 overflow-hidden">
+<p class="text-[13px] font-medium">Couldn&#x27;t generate this one</p>
+<p class="line-clamp-5 text-[12px] leading-snug break-words whitespace-pre-line text-muted-foreground">ComfyUI isn&#x27;t answering. Start it again, and Fuobe goes on by itself.</p>
+</div>
+<div class="mt-2 flex flex-wrap gap-1.5">
+<button class="inline-flex h-7 w-fit items-center gap-1.5 rounded-full bg-secondary px-2.5 text-[12px] font-medium hover:bg-accent">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-ccw size-3" aria-hidden="true">
+<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8">
+</path>
+<path d="M3 3v5h5">
+</path>
+</svg> Retry</button>
+</div>
+</div>
+</div>
+</div>
+</section>
+</div>
\ No newline at end of file
diff --git a/tests/golden/self-host/home-steps.html b/tests/golden/self-host/home-steps.html
new file mode 100644
index 00000000..f4752e89
--- /dev/null
+++ b/tests/golden/self-host/home-steps.html
@@ -0,0 +1,197 @@
+<ol class="space-y-5">
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">1</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Look around.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Open every studio, preset and model, no account needed.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2" href="/effects">Browse effects <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">2</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Sign up free.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">A free account runs every open model on your own GPU.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a href="/login?signup=1" class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2">Sign up free <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">3</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Connect your ComfyUI.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Use the ComfyUI on your computer, or one you reach by link. Fuobe shows you everything it can run.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2" href="/connect">Connect your GPU <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+</ol>
+
+<ol class="space-y-5">
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">1</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Look around.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Open every studio, preset and model, no account needed.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2" href="/effects">Browse effects <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">2</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Sign up free.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">A free account runs every open model on your own GPU.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<span class="inline-flex items-center gap-1 text-[13px] font-medium text-foreground">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-3.5 text-brand-text" aria-hidden="true">
+<path d="M20 6 9 17l-5-5">
+</path>
+</svg> You’re signed in</span>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">3</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Connect your ComfyUI.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Use the ComfyUI on your computer, or one you reach by link. Fuobe shows you everything it can run.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<button type="button" class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2">Connect your GPU <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</button>
+</div>
+</div>
+</li>
+</ol>
+
+<ol class="space-y-5">
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">1</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Look around.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Open every studio, preset and model, no account needed.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2" href="/effects">Browse effects <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">2</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Sign up free.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">A free account runs every open model on your own GPU.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<span class="inline-flex items-center gap-1 text-[13px] font-medium text-foreground">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-3.5 text-brand-text" aria-hidden="true">
+<path d="M20 6 9 17l-5-5">
+</path>
+</svg> You’re signed in</span>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">3</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Connect your ComfyUI.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Use the ComfyUI on your computer, or one you reach by link. Fuobe shows you everything it can run.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<span class="inline-flex items-center gap-1 text-[13px] font-medium text-foreground">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-3.5 text-brand-text" aria-hidden="true">
+<path d="M20 6 9 17l-5-5">
+</path>
+</svg> Your GPU is connected</span>
+</div>
+</div>
+</li>
+</ol>
+
+<ol class="space-y-5">
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">1</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Look around.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Open every studio, preset and model, no account needed.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2" href="/effects">Browse effects <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">2</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Sign up free.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">A free account runs every open model on your own GPU.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2" href="/settings#get-started">Connect ComfyUI or add a key <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+<li class="flex gap-3">
+<span class="grid size-6 shrink-0 place-items-center rounded-full bg-brand-faint text-[12px] font-semibold text-brand-text tabular-nums">3</span>
+<div class="min-h-[68px] min-w-0">
+<p class="text-[15px] font-medium">Connect your ComfyUI.</p>
+<p class="mt-0.5 text-[13px] text-muted-foreground">Use the ComfyUI on your computer, or one you reach by link. Fuobe shows you everything it can run.</p>
+<div class="mt-1.5 flex h-5 items-center">
+<a class="inline-flex items-center gap-1 text-[13px] font-medium text-brand-text hover:underline underline-offset-2" href="/connect">Connect your GPU <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5" aria-hidden="true">
+<path d="M5 12h14">
+</path>
+<path d="m12 5 7 7-7 7">
+</path>
+</svg>
+</a>
+</div>
+</div>
+</li>
+</ol>
\ No newline at end of file
diff --git a/tests/golden/self-host/library-cover.html b/tests/golden/self-host/library-cover.html
new file mode 100644
index 00000000..1ef80288
--- /dev/null
+++ b/tests/golden/self-host/library-cover.html
@@ -0,0 +1,30 @@
+<div class="relative size-full bg-muted">
+<div class="skeleton-sweep absolute inset-0 animate-skeleton">
+</div>
+<div class="absolute inset-x-0 bottom-0 p-3">
+<p class="shimmer-text animate-shimmer-text truncate text-[13px] font-medium">Queued</p>
+<p class="font-mono text-[11px] text-muted-foreground">1m 30s</p>
+</div>
+</div>
+
+<div class="relative size-full bg-muted">
+<div class="skeleton-sweep absolute inset-0 animate-skeleton">
+</div>
+<div class="absolute inset-x-0 bottom-0 p-3">
+<p class="shimmer-text animate-shimmer-text truncate text-[13px] font-medium">Generating</p>
+<p class="font-mono text-[11px] text-muted-foreground">42% · 1m 30s</p>
+</div>
+</div>
+
+<div class="flex size-full flex-col justify-between border border-dashed bg-background p-3">
+<div class="min-h-0 space-y-1 overflow-hidden">
+<p class="text-[13px] font-medium">Couldn&#x27;t generate this one</p>
+<p class="line-clamp-4 text-[12px] leading-snug break-words text-muted-foreground">Your GPU ran out of memory. Try a smaller size or a shorter clip.</p>
+</div>
+</div>
+
+<div class="flex size-full flex-col justify-between border border-dashed bg-background p-3">
+<div class="min-h-0 space-y-1 overflow-hidden">
+<p class="text-[13px] font-medium">Canceled</p>
+</div>
+</div>
\ No newline at end of file
diff --git a/tests/golden/self-host/settings-account.html b/tests/golden/self-host/settings-account.html
new file mode 100644
index 00000000..8c45f069
--- /dev/null
+++ b/tests/golden/self-host/settings-account.html
@@ -0,0 +1,42 @@
+<section id="your-gpu" aria-labelledby="your-gpu-title" class="grid scroll-mt-28 grid-cols-[minmax(0,1fr)] gap-6 border-b py-8 md:scroll-mt-20 md:grid-cols-[260px_minmax(0,1fr)]">
+<div class="min-w-0">
+<h2 id="your-gpu-title" class="text-[15px] font-semibold">Your GPU</h2>
+<p class="mt-1 text-[13px] text-muted-foreground">Run open models on your own graphics card, free and with no run limit.</p>
+</div>
+<div class="min-w-0 space-y-4">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-circle lucide-loader-2 size-5 animate-spin text-muted-foreground" aria-hidden="true">
+<path d="M21 12a9 9 0 1 1-6.219-8.56">
+</path>
+</svg>
+</div>
+</section>
+
+<section id="your-keys" aria-labelledby="your-keys-title" class="grid scroll-mt-28 grid-cols-[minmax(0,1fr)] gap-6 border-b py-8 md:scroll-mt-20 md:grid-cols-[260px_minmax(0,1fr)]">
+<div class="min-w-0">
+<h2 id="your-keys-title" class="text-[15px] font-semibold">Your keys</h2>
+<p class="mt-1 text-[13px] text-muted-foreground">Add your fal.ai or Replicate key to use Nano Banana, Kling, Veo and more. You pay the provider directly. Your key is stored encrypted.</p>
+</div>
+<div class="grid min-w-0 gap-4">
+<ul class="grid gap-1.5 text-[13px] text-muted-foreground">
+<li>
+<span class="font-medium text-foreground">What it costs:</span> about $0.04 a picture. The price next to Generate is an estimate; your provider&#x27;s bill is the final word.</li>
+<li>Up to 4 runs at once and 60 an hour.</li>
+</ul>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-circle lucide-loader-2 size-5 animate-spin text-muted-foreground" aria-hidden="true">
+<path d="M21 12a9 9 0 1 1-6.219-8.56">
+</path>
+</svg>
+</div>
+</section>
+
+<div class="flex flex-wrap items-center gap-x-3 gap-y-2 rounded-xl border border-dashed px-3 py-2.5 text-[13px]">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round mt-0.5 size-4 shrink-0 self-start text-brand-text" aria-hidden="true">
+<path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z">
+</path>
+<circle cx="16.5" cy="7.5" r=".5" fill="currentColor">
+</circle>
+</svg>
+<p class="min-w-0 flex-1 basis-56 text-muted-foreground">
+<span class="font-medium text-foreground">No GPU?</span> Add your own fal.ai or Replicate key to use paid models like Nano Banana, Kling and Veo, billed to your account with them.</p>
+<button data-slot="button" data-variant="secondary" data-size="sm" class="group/button inline-flex shrink-0 items-center justify-center border border-transparent bg-clip-padding font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,scale] duration-(--motion-base) ease-(--ease-standard) outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:duration-(--motion-fast) active:not-aria-[haspopup]:scale-(--motion-press-card) disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&amp;_svg]:pointer-events-none [&amp;_svg]:shrink-0 bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&amp;_svg:not([class*=&#x27;size-&#x27;])]:size-3.5">Add a key</button>
+</div>
\ No newline at end of file
diff --git a/tests/golden/self-host/words.json b/tests/golden/self-host/words.json
new file mode 100644
index 00000000..3966c4ec
--- /dev/null
+++ b/tests/golden/self-host/words.json
@@ -0,0 +1,692 @@
+{
+ "place": {
+ "owner open": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner open hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner open priced": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner open priced hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner open gpu": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner open gpu hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner open gpu priced": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner open gpu priced hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "owner cloud": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "",
+ "model": "Z-Image Turbo"
+ },
+ "owner cloud hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "",
+ "model": "Z-Image Turbo"
+ },
+ "owner cloud priced": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "≈ $0.04 · cloud",
+ "model": "Z-Image Turbo"
+ },
+ "owner cloud priced hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "≈ $0.04 · cloud",
+ "model": "Z-Image Turbo"
+ },
+ "owner cloud gpu": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "",
+ "model": "Z-Image Turbo"
+ },
+ "owner cloud gpu hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "",
+ "model": "Z-Image Turbo"
+ },
+ "owner cloud gpu priced": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "≈ $0.04 · cloud",
+ "model": "Z-Image Turbo"
+ },
+ "owner cloud gpu priced hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed by the provider to your key.",
+ "send": "≈ $0.04 · cloud",
+ "model": "Z-Image Turbo"
+ },
+ "owner browser": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "owner browser hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "owner browser priced": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "owner browser priced hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "owner browser gpu": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "owner browser gpu hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "owner browser gpu priced": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "owner browser gpu priced hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account open": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Connect your GPU to run it.",
+ "send": "Free · connect your GPU first",
+ "needs": "gpu"
+ },
+ "account open hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Connect your GPU to run it.",
+ "send": "Free · connect your GPU first",
+ "needs": "gpu"
+ },
+ "account open priced": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Connect your GPU to run it.",
+ "send": "Free · connect your GPU first",
+ "needs": "gpu"
+ },
+ "account open priced hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Connect your GPU to run it.",
+ "send": "Free · connect your GPU first",
+ "needs": "gpu"
+ },
+ "account open gpu": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "account open gpu hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "account open gpu priced": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "account open gpu priced hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free.",
+ "send": "Free · your GPU"
+ },
+ "account cloud": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: add your key in Settings → Your keys.",
+ "send": "add your key",
+ "needs": "key",
+ "model": "Z-Image Turbo"
+ },
+ "account cloud hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: add your key in Settings → Your keys.",
+ "send": "add your key",
+ "needs": "key",
+ "model": "Z-Image Turbo"
+ },
+ "account cloud priced": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: add your key in Settings → Your keys.",
+ "send": "≈ $0.04 · add your key",
+ "needs": "key",
+ "model": "Z-Image Turbo"
+ },
+ "account cloud priced hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: add your key in Settings → Your keys.",
+ "send": "≈ $0.04 · add your key",
+ "needs": "key",
+ "model": "Z-Image Turbo"
+ },
+ "account cloud gpu": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed to your fal.ai account.",
+ "send": "",
+ "model": "Z-Image Turbo"
+ },
+ "account cloud gpu hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: add your key in Settings → Your keys.",
+ "send": "add your key",
+ "needs": "key",
+ "model": "Z-Image Turbo"
+ },
+ "account cloud gpu priced": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Estimated cost, billed to your fal.ai account.",
+ "send": "≈ $0.04 · cloud",
+ "model": "Z-Image Turbo"
+ },
+ "account cloud gpu priced hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: add your key in Settings → Your keys.",
+ "send": "≈ $0.04 · add your key",
+ "needs": "key",
+ "model": "Z-Image Turbo"
+ },
+ "account browser": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account browser hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account browser priced": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account browser priced hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account browser gpu": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account browser gpu hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account browser gpu priced": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "account browser gpu priced hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest open": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest open hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest open priced": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest open priced hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest open gpu": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest open gpu hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest open gpu priced": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest open gpu priced hosted-off": {
+ "where": "gpu",
+ "label": "Your GPU",
+ "price": "Free",
+ "title": "Runs on your GPU",
+ "tip": "Runs on your own GPU with Z-Image Turbo. Free. Create a free account and connect your GPU to run it.",
+ "send": "Free · your GPU, after sign-up",
+ "needs": "signup"
+ },
+ "guest cloud": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest cloud hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest cloud priced": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "≈ $0.04 · cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest cloud priced hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "≈ $0.04 · cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest cloud gpu": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest cloud gpu hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest cloud gpu priced": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "≈ $0.04 · cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest cloud gpu priced hosted-off": {
+ "where": "cloud",
+ "label": "Z-Image Turbo",
+ "price": "≈ $0.04",
+ "title": "Runs in the cloud",
+ "tip": "Runs in the cloud with Z-Image Turbo. Billed to your own fal.ai or Replicate account: create a free account and add your key to run it.",
+ "send": "≈ $0.04 · cloud, after sign-up",
+ "needs": "signup",
+ "model": "Z-Image Turbo"
+ },
+ "guest browser": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest browser hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest browser priced": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest browser priced hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest browser gpu": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest browser gpu hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest browser gpu priced": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ },
+ "guest browser gpu priced hosted-off": {
+ "where": "browser",
+ "label": "Your browser",
+ "price": "Free",
+ "title": "Runs in your browser",
+ "tip": "It plays as you type, instantly and free. No model and no GPU are used.",
+ "send": "Free · in your browser"
+ }
+ },
+ "tips": {
+ "no key": {
+ "locked": {
+ "text": "Open source",
+ "tip": "Runs on your own GPU. Add a fal.ai or Replicate key to use paid models.",
+ "href": "/settings#your-keys",
+ "addKey": true
+ }
+ },
+ "a key": {
+ "tips": {
+ "cloud": "Paid models, billed to your fal.ai account",
+ "open": "Open models on your own GPU. Connect it first"
+ }
+ },
+ "a key and a GPU": {
+ "tips": {
+ "cloud": "Paid models, billed to your fal.ai and Replicate accounts",
+ "open": "Open models on your own GPU"
+ }
+ },
+ "open only": {
+ "locked": {
+ "text": "Open source",
+ "tip": "Runs on your own GPU.",
+ "href": "/settings#your-gpu"
+ }
+ },
+ "guest": null
+ },
+ "again": {
+ "open": " on your GPU",
+ "cloud": " · ≈ $0.42",
+ "placeholders": ""
+ },
+ "accountLimits": {
+ "imageTooBig": "That picture is over 25 MB. Save it smaller, then try again.",
+ "imageTooManyPixels": "That picture is over 40 megapixels. Save it smaller, then try again.",
+ "audioTooBig": "That sound file is over 50 MB. Trim it, then try again.",
+ "videoTooBig": "That clip is over 95 MB. Trim it or lower its quality, then try again.",
+ "fileTooBig": "That file is over 95 MB. Make it smaller, then try again.",
+ "wrongType": "Fuobe takes PNG, JPEG or WebP pictures, MP4, MOV, WebM, MKV or AVI clips, and MP3, WAV, OGG, FLAC or M4A sound.",
+ "uploadsFull": "You've used your 1 GB for uploads. Older uploads clear after 14 days, or delete some to make room now.",
+ "filesFull": "Your files have reached 3 GB. Delete some runs to make room.",
+ "uploadRate": "That's a lot of uploads at once. Try again in a few minutes.",
+ "uploadsBusy": "Lots of uploads right now. Try again in a moment.",
+ "uploadStalled": "The upload stopped arriving. Check your connection, then try again.",
+ "diskLow": "Uploads are paused for a moment. Please try again shortly.",
+ "activeRuns": "You have 4 runs going. Start the next one when one finishes.",
+ "runRate": "That's a lot of runs this hour. Try again later.",
+ "finishRate": "That's a lot of finished pictures this hour. Try again later.",
+ "finishBusy": "Your last pictures are still being saved. Try again in a moment.",
+ "outputsCapped": "Each run makes up to 4 results.",
+ "bodyTooBig": "That's too large to send. Try a smaller file.",
+ "gpuChecks": "Give it a minute, then check again.",
+ "probeRate": "Too many clip checks at once. Wait a moment, then try again.",
+ "reloadToUpload": "Reload the page, then upload again.",
+ "lengthNeeded": "That upload didn't go through. Please try again.",
+ "zipTooMany": "Download up to 200 at a time.",
+ "zipTooBig": "That's over 1 GB. Download fewer items at a time.",
+ "zipBusy": "Your last download is still going. Try again when it finishes."
+ }
+}
diff --git a/tests/self-host-unchanged.test.ts b/tests/self-host-unchanged.test.ts
new file mode 100644
index 00000000..4f64bfee
--- /dev/null
+++ b/tests/self-host-unchanged.test.ts
@@ -0,0 +1,224 @@
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { createElement, type ReactNode } from "react";
+import { renderToStaticMarkup } from "react-dom/server";
+import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
+import type { StatusInfo, ViewerInfo } from "@/lib/api";
+import type { Generation } from "@/lib/catalog/types";
+import { tempDir } from "./helpers/temp-dir";
+
+/*
+ * A self-hosted install with hosted runs off (the default: no FUOBE_HOSTED_RUNS) keeps every word and every element it
+ * had before runs on this install's GPUs got their own place name and words. The golden files under
+ * tests/golden/self-host were recorded from the code before those changes: the feed's tiles and header, a Library
+ * card, the home steps, Settings → Your GPU and Your keys, the engine switch and its tips, the place chip's words for
+ * every viewer and engine, Run again's words, and the account-limit words. A difference here is a change self-hosters
+ * would see.
+ */
+
+process.env.FUOBE_DATA_DIR = tempDir("fuobe-self-host-");
+process.env.FUOBE_PUBLIC_SIGNUP = "1";
+for (const k of ["FUOBE_PASSWORD", "FUOBE_HOSTED_RUNS", "FUOBE_HOSTED_FREE", "FUOBE_BILLING_URL", "FUOBE_MODERATION_URL", "FUOBE_PLACE_NAME"]) delete process.env[k];
+
+const state = vi.hoisted(() => ({
+ hydrated: true,
+ viewer: undefined as ViewerInfo | undefined,
+ status: undefined as StatusInfo | undefined,
+}));
+
+vi.mock("next/navigation", () => ({
+ useRouter: () => ({ prefetch: () => {}, push: () => {}, replace: () => {}, back: () => {}, refresh: () => {} }),
+ usePathname: () => "/image",
+ useSearchParams: () => new URLSearchParams(),
+}));
+vi.mock("@/lib/api", async (load) => ({
+ ...(await load<typeof import("@/lib/api")>()),
+ useHydrated: () => state.hydrated,
+ useViewer: () => ({ data: state.viewer }),
+ useStatus: () => ({ data: state.status }),
+ useEngineMode: () => "both",
+}));
+
+const { PendingTile, FailedTile, Feed } = await import("@/components/studio/feed");
+const { StatusCover } = await import("@/components/library/asset-card");
+const { StartSteps } = await import("@/components/home/home-islands");
+const { AccountGpuSection } = await import("@/components/gpu/account-gpu-section");
+const { AccountKeysSection, KeyInstead } = await import("@/components/keys/your-keys");
+const { EngineSwitch } = await import("@/components/studio/engine-switch");
+const { TooltipProvider } = await import("@/components/ui/tooltip");
+const { runPlace } = await import("@/lib/run-place");
+const { accountEngine } = await import("@/lib/your-keys");
+const { againWhere } = await import("@/lib/demo-mode");
+const { ACCOUNT_MESSAGES } = await import("@/server/account-files");
+const auth = await import("@/server/auth");
+const { visitorStatus } = await import("@/server/account-gpu");
+
+const GOLDEN = "./golden/self-host";
+const NOW = Date.parse("2026-11-01T12:00:00Z");
+
+beforeAll(() => {
+ vi.useFakeTimers({ toFake: ["Date"] });
+ vi.setSystemTime(NOW);
+});
+afterAll(() => vi.useRealTimers());
+
+const render = (node: ReactNode) => renderToStaticMarkup(createElement(QueryClientProvider, { client: new QueryClient() }, createElement(TooltipProvider, null, node)));
+
+/** One element per line, so a golden file's difference reads as the words that changed. */
+const lines = (html: string) => html.replace(/></g, ">\n<");
+
+const gen = (o: Partial<Generation> = {}): Generation =>
+ ({
+ id: "g1",
+ batchId: null,
+ feature: "image",
+ presetId: null,
+ modelId: "oss-z-image-turbo",
+ engine: "open",
+ provider: "comfyui",
+ op: "t2i",
+ kind: "image",
+ status: "queued",
+ progress: null,
+ message: null,
+ prompt: "a fox in the snow",
+ request: { feature: "image", modelId: "oss-z-image-turbo", prompt: "a fox in the snow" },
+ outputs: [],
+ error: null,
+ costUsd: null,
+ favorite: false,
+ createdAt: NOW - 90_000,
+ updatedAt: NOW - 30_000,
+ completedAt: null,
+ ...o,
+ }) as Generation;
+
+const ownerViewer: ViewerInfo = { signedIn: true, owner: true, publicSignup: true };
+const accountViewer: ViewerInfo = { signedIn: true, owner: false, publicSignup: true, account: { email: "[email protected]" } };
+const guestViewer: ViewerInfo = { signedIn: false, owner: false, publicSignup: true };
+
+/** A visitor's status with hosted runs off: what the server sends a self-hoster's guests and accounts. */
+function statusOf(v: Partial<NonNullable<StatusInfo["viewer"]>> = {}): StatusInfo {
+ return {
+ providers: { comfyui: { label: "Your GPU", configured: true } },
+ demoMode: "off",
+ engineMode: "both",
+ cloudProvider: "auto",
+ onboarded: true,
+ viewer: { kind: "account", gpu: { connected: false }, keys: [], paidAllowed: true, ...v },
+ } as StatusInfo;
+}
+
+const ownerStatus: StatusInfo = { providers: { comfyui: { label: "ComfyUI", configured: true } }, demoMode: "off", engineMode: "both", cloudProvider: "auto", onboarded: true } as StatusInfo;
+
+beforeEach(() => {
+ state.hydrated = true;
+ state.viewer = undefined;
+ state.status = undefined;
+});
+
+describe("a self-hosted install with hosted runs off", () => {
+ it("has hosted runs off in this test", () => {
+ expect(process.env.FUOBE_HOSTED_RUNS ?? "").toBe("");
+ });
+
+ it("the feed's tiles: in line, working, failed, stopped", async () => {
+ const html = [
+ render(createElement(PendingTile, { g: gen({ status: "queued", message: "Queued" }), ratio: 1 })),
+ render(createElement(PendingTile, { g: gen({ status: "running", message: "Generating", progress: 0.42 }), ratio: 1 })),
+ render(createElement(FailedTile, { g: gen({ status: "failed", error: "Your GPU ran out of memory. Try a smaller size or a shorter clip." }), ratio: 1, onRetry: () => {} })),
+ render(createElement(FailedTile, { g: gen({ status: "canceled" }), ratio: 1, onRetry: () => {} })),
+ ].map(lines);
+ await expect(html.join("\n\n")).toMatchFileSnapshot(`${GOLDEN}/feed-tiles.html`);
+ });
+
+ it("the feed's header for a result on your GPU and in the cloud", async () => {
+ const out = { url: "/api/files/a1", kind: "image" as const, contentType: "image/png", width: 1024, height: 1024 };
+ const items = [
+ gen({ id: "g-open", status: "succeeded", outputs: [out], completedAt: NOW - 20_000 }),
+ gen({ id: "g-cloud", engine: "cloud", provider: "fal", modelId: "nano-banana", status: "succeeded", outputs: [out], costUsd: 0.04, completedAt: NOW - 20_000 }),
+ gen({ id: "g-failed", status: "failed", error: "ComfyUI isn't answering. Start it again, and Fuobe goes on by itself." }),
+ ];
+ const html = render(createElement(Feed, { items, empty: createElement("p", null, "Nothing yet") }));
+ await expect(lines(html)).toMatchFileSnapshot(`${GOLDEN}/feed.html`);
+ });
+
+ it("a Library card's cover in each state", async () => {
+ const html = [
+ render(createElement(StatusCover, { g: gen({ status: "queued", message: "Queued" }) })),
+ render(createElement(StatusCover, { g: gen({ status: "running", message: "Generating", progress: 0.42 }) })),
+ render(createElement(StatusCover, { g: gen({ status: "failed", error: "Your GPU ran out of memory. Try a smaller size or a shorter clip." }) })),
+ render(createElement(StatusCover, { g: gen({ status: "canceled" }) })),
+ ].map(lines);
+ await expect(html.join("\n\n")).toMatchFileSnapshot(`${GOLDEN}/library-cover.html`);
+ });
+
+ it("the home steps for a guest, an account, an account with its GPU, and the owner", async () => {
+ const out: string[] = [];
+ for (const [viewer, status] of [
+ [guestViewer, statusOf({ kind: "guest" })],
+ [accountViewer, statusOf()],
+ [accountViewer, statusOf({ gpu: { connected: true, mode: "link", online: true } })],
+ [ownerViewer, ownerStatus],
+ ] as const) {
+ state.viewer = viewer;
+ state.status = status;
+ out.push(lines(render(createElement(StartSteps))));
+ }
+ await expect(out.join("\n\n")).toMatchFileSnapshot(`${GOLDEN}/home-steps.html`);
+ });
+
+ it("Settings → Your GPU and Your keys for an account", async () => {
+ state.viewer = accountViewer;
+ state.status = statusOf();
+ const html = [render(createElement(AccountGpuSection)), render(createElement(AccountKeysSection, { prices: "about $0.04 a picture" })), render(createElement(KeyInstead))].map(lines);
+ await expect(html.join("\n\n")).toMatchFileSnapshot(`${GOLDEN}/settings-account.html`);
+ });
+
+ it("the engine switch for an account with no key, and with a key", async () => {
+ state.viewer = accountViewer;
+ const out: string[] = [];
+ for (const status of [statusOf(), statusOf({ keys: ["fal"] }), statusOf({ keys: ["fal"], gpu: { connected: true, mode: "link", online: true } })]) {
+ state.status = status;
+ out.push(lines(render(createElement(EngineSwitch, { value: "open", onChange: () => {} }))));
+ }
+ await expect(out.join("\n\n")).toMatchFileSnapshot(`${GOLDEN}/engine-switch.html`);
+ });
+
+ it("the words: the place chip for every viewer and engine, engine tips, Run again and the account limits", async () => {
+ const format = (usd: number) => `$${usd.toFixed(2)}`;
+ const place: Record<string, unknown> = {};
+ for (const audience of ["owner", "account", "guest"] as const)
+ for (const engine of ["open", "cloud", "browser"] as const)
+ for (const gpu of [false, true])
+ for (const costUsd of [undefined, 0.04]) {
+ const key = `${audience} ${engine}${gpu ? " gpu" : ""}${costUsd ? " priced" : ""}`;
+ place[key] = runPlace({ audience, engine, gpu, costUsd, models: ["Z-Image Turbo"], payer: audience === "account" && gpu ? "fal" : null, format });
+ place[`${key} hosted-off`] = runPlace({ audience, engine, gpu, costUsd, models: ["Z-Image Turbo"], hosted: false, format });
+ }
+ const tips: Record<string, unknown> = {};
+ for (const [name, v] of Object.entries({
+ "no key": statusOf(),
+ "a key": statusOf({ keys: ["fal"] }),
+ "a key and a GPU": statusOf({ keys: ["fal", "replicate"], gpu: { connected: true, mode: "link", online: true } }),
+ "open only": statusOf({ paidAllowed: false }),
+ guest: statusOf({ kind: "guest" }),
+ }))
+ tips[name] = accountEngine(v);
+ const again = {
+ open: againWhere({ engine: "open" }, { placeholders: false }),
+ cloud: againWhere({ engine: "cloud" }, { placeholders: false }, 0.42),
+ placeholders: againWhere({ engine: "open" }, { placeholders: true }),
+ };
+ const words = { place, tips, again, accountLimits: ACCOUNT_MESSAGES };
+ await expect(`${JSON.stringify(words, null, 2)}\n`).toMatchFileSnapshot(`${GOLDEN}/words.json`);
+ });
+
+ it("the status a guest and an account read: nothing of hosted runs, their place or their pick", async () => {
+ auth.setPassword("install password");
+ const a = auth.createAccount("[email protected]", "long enough");
+ for (const s of [await visitorStatus(a), await visitorStatus(null)]) {
+ expect(Object.keys(s.viewer).sort()).toEqual(["gpu", "keys", "kind", "paidAllowed"]);
+ expect(JSON.stringify(s.viewer)).not.toMatch(/placeName|runOn|prefer|hosted|"pool"/);
+ }
+ });
+});