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.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
feat(ui): cloud waitlist badge + image-tool discovery noti
purplec4bc1f310910
diff --git a/src-tauri/src/commands/mod.rs b/src-tauri/src/commands/mod.rsindex 465bfe3c..25d73357 100644--- a/src-tauri/src/commands/mod.rs+++ b/src-tauri/src/commands/mod.rs@@ -14,6 +14,7 @@ pub mod search;pub mod shell;pub mod system;pub mod tts;+pub mod waitlist;pub mod whisper;// ── uselu-compat error helpers ────────────────────────────────────────diff --git a/src-tauri/src/commands/waitlist.rs b/src-tauri/src/commands/waitlist.rsnew file mode 100644index 00000000..e84b97c8--- /dev/null+++ b/src-tauri/src/commands/waitlist.rs@@ -0,0 +1,130 @@+//! Cloud "Hosted LU Workflows" waitlist — opt-in email capture.+//!+//! The desktop app posts a single, user-typed email straight to LU's own+//! Supabase project (EU region). This is the ONE thing LU sends off-device,+//! and ONLY when the user explicitly clicks "Notify me" — no telemetry, no+//! tracking, no ping on launch. See the in-app microcopy in CloudWaitlistBadge.+//!+//! Direct-to-Supabase with an INSERT-ONLY RLS policy: the anon key below is+//! public-safe by design — under the policy it can only INSERT into the+//! `waitlist` table, never read it. So shipping it in the client is fine.+//!+//! `Prefer: return=minimal` is REQUIRED: without it PostgREST tries to SELECT+//! the freshly-inserted row back to return it, which the insert-only policy+//! blocks → the whole request would 401/403. We do a PLAIN insert (NOT an+//! on-conflict upsert: PostgREST's upsert path needs more than the insert+//! policy and 401s under insert-only RLS — verified live). A repeat email+//! therefore returns 409, which we treat as success so "You're already on+//! the list" stays clean.++/// LU's own Supabase project (EU region). The project URL is public — it is+/// the `NEXT_PUBLIC_SUPABASE_URL` and ships in every Supabase client.+const SUPABASE_URL: &str = "https://gewbdlmziumhseftxgrr.supabase.co";++/// Public-safe anon ("publishable") key.+/// Source: Supabase Dashboard → Project Settings → API → Project API keys →+/// `anon` `public` (same value as `NEXT_PUBLIC_SUPABASE_ANON_KEY` in+/// `apps/web/.env.local`). Safe to embed — RLS is insert-only.+///+/// This is the anon key (JWT `role:anon`) — NOT the service-role key. It can+/// only INSERT into `waitlist` under the insert-only RLS policy, never read.+const SUPABASE_ANON_KEY: &str = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imdld2JkbG16aXVtaHNlZnR4Z3JyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzMxNDk2MzQsImV4cCI6MjA4ODcyNTYzNH0.aywRbeeJNQezl56i_39dA0EpdsN6Y4AI9EkobSmJQ3A";++/// Minimal, defense-in-depth email check (the UI validates too — this just+/// stops obviously-bogus values from hitting the network).+fn looks_like_email(email: &str) -> bool {+ if email.len() < 3 || email.len() > 254 || email.contains(char::is_whitespace) {+ return false;+ }+ let at = match email.find('@') {+ Some(i) => i,+ None => return false,+ };+ // Exactly one '@', non-empty local part, and a dotted domain.+ if email.matches('@').count() != 1 || at == 0 {+ return false;+ }+ let domain = &email[at + 1..];+ domain.len() >= 3+ && domain.contains('.')+ && !domain.starts_with('.')+ && !domain.ends_with('.')+}++/// Submit one opt-in email to the hosted-workflows waitlist.+///+/// Parameters are deliberately SINGLE WORDS (`email`, `source`, `version`) so+/// there is zero camelCase↔snake_case ambiguity across the Tauri IPC boundary+/// (a real footgun — cf. the STT `audioBase64` bug). The Supabase column is+/// `app_version`; we map `version` → that column when building the JSON body.+#[tauri::command]+pub async fn waitlist_submit(+ email: String,+ source: Option<String>,+ version: Option<String>,+) -> Result<(), String> {+ let email = email.trim().to_lowercase();+ if !looks_like_email(&email) {+ return Err("Please enter a valid email address.".into());+ }++ let url = format!("{}/rest/v1/waitlist", SUPABASE_URL);+ let payload = serde_json::json!({+ "email": email,+ "source": source.unwrap_or_else(|| "app-badge".to_string()),+ "app_version": version,+ });++ let client = reqwest::Client::builder()+ .user_agent("LocallyUncensored/2.0")+ .timeout(std::time::Duration::from_secs(15))+ .build()+ .map_err(|e| e.to_string())?;++ let resp = client+ .post(&url)+ .header("apikey", SUPABASE_ANON_KEY)+ .header("Authorization", format!("Bearer {}", SUPABASE_ANON_KEY))+ .header("Content-Type", "application/json")+ // return=minimal is mandatory under insert-only RLS (no SELECT-back).+ // PLAIN insert (not an on-conflict upsert — PostgREST's upsert path 401s+ // under insert-only RLS); a repeat email returns 409, handled as success.+ .header("Prefer", "return=minimal")+ .body(payload.to_string())+ .send()+ .await+ .map_err(|e| format!("waitlist_submit: {}", e))?;++ let status = resp.status();+ // 2xx = inserted (or duplicate ignored). 409 = duplicate without the+ // ignore-duplicates path — still "you're on the list", so treat as success.+ if status.is_success() || status.as_u16() == 409 {+ Ok(())+ } else {+ let code = status.as_u16();+ let text = resp.text().await.unwrap_or_default();+ Err(format!("Waitlist signup failed (HTTP {}): {}", code, text))+ }+}++#[cfg(test)]+mod tests {+ use super::looks_like_email;++ #[test]+ fn accepts_normal_addresses() {+ assert!(looks_like_email("[email protected]"));+ assert!(looks_like_email("[email protected]"));+ }++ #[test]+ fn rejects_bogus() {+ assert!(!looks_like_email(""));+ assert!(!looks_like_email("noatsign"));+ assert!(!looks_like_email("@nolocal.com"));+ assert!(!looks_like_email("no@domain"));+ assert!(!looks_like_email("two@@at.com"));+ assert!(!looks_like_email("has [email protected]"));+ assert!(!looks_like_email("trailing@dot."));+ }+}diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rsindex b9bcd7fe..8c0c5559 100644--- a/src-tauri/src/main.rs+++ b/src-tauri/src/main.rs@@ -205,6 +205,8 @@ fn main() {commands::proxy::proxy_localhost_stream_chunked,commands::proxy::pull_model_stream,commands::proxy::cancel_model_pull,+ // Cloud "Hosted LU Workflows" waitlist — opt-in email capture+ commands::waitlist::waitlist_submit,// B7 (uselu Phase 4 inspiration) — one-shot diagnostic probecommands::health::system_health,// Bug BB v2.5.0 — BobbyT GPU pickerdiff --git a/src/api/__tests__/waitlist.test.ts b/src/api/__tests__/waitlist.test.tsnew file mode 100644index 00000000..385ff548--- /dev/null+++ b/src/api/__tests__/waitlist.test.ts@@ -0,0 +1,23 @@+import { describe, it, expect } from 'vitest'+import { isValidEmail } from '../waitlist'++// ═══════════════════════════════════════════════════════════════+// waitlist — email validation (the client-side gate before any POST)+// ═══════════════════════════════════════════════════════════════++describe('isValidEmail', () => {+ it('accepts normal addresses', () => {+ expect(isValidEmail('[email protected]')).toBe(true)+ expect(isValidEmail('[email protected]')).toBe(true)+ expect(isValidEmail(' [email protected] ')).toBe(true) // trims before testing+ })++ it('rejects bogus input', () => {+ expect(isValidEmail('')).toBe(false)+ expect(isValidEmail('noatsign')).toBe(false)+ expect(isValidEmail('@nolocal.com')).toBe(false)+ expect(isValidEmail('no@domain')).toBe(false) // no dot in domain+ expect(isValidEmail('has [email protected]')).toBe(false)+ expect(isValidEmail('two@@at.com')).toBe(false)+ })+})diff --git a/src/api/waitlist.ts b/src/api/waitlist.tsnew file mode 100644index 00000000..2a7988d8--- /dev/null+++ b/src/api/waitlist.ts@@ -0,0 +1,88 @@+/**+ * Cloud "Hosted LU Workflows" waitlist — opt-in email capture.+ *+ * The ONLY thing LU ever sends off the user's device, and only when the user+ * explicitly clicks "Notify me". No telemetry, no tracking, no ping on launch.+ *+ * In the built app (Tauri) the POST goes through the Rust `waitlist_submit`+ * command (bypasses CORS, keeps the request off the webview origin). In dev+ * (`npm run dev`, plain browser) there is no Rust side, so we hit the Supabase+ * REST endpoint directly — Supabase allows this with the public anon key under+ * an insert-only RLS policy.+ */++import { isTauri } from "./backend";+import { log } from "../lib/logger";++/** LU's own Supabase project (EU region). Public URL — only used on the dev path. */+const SUPABASE_URL = "https://gewbdlmziumhseftxgrr.supabase.co";++/**+ * Public-safe anon key (JWT `role:anon`) — ONLY used on the dev (non-Tauri)+ * path; the built app holds the key in Rust. Safe to ship: under the insert-only+ * RLS policy it can only INSERT into `waitlist`, never read it.+ */+const SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imdld2JkbG16aXVtaHNlZnR4Z3JyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzMxNDk2MzQsImV4cCI6MjA4ODcyNTYzNH0.aywRbeeJNQezl56i_39dA0EpdsN6Y4AI9EkobSmJQ3A";++export type WaitlistSource = "app-badge" | "readme" | "landing";++/** Same shape the Rust side and the web companion validate against. */+export function isValidEmail(email: string): boolean {+ return /^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email.trim());+}++/** Best-effort app version for the `app_version` column (metadata only). */+async function getAppVersion(): Promise<string> {+ try {+ if (isTauri()) {+ const { getVersion } = await import("@tauri-apps/api/app");+ return await getVersion();+ }+ } catch {+ /* fall through to the release default */+ }+ return "2.5.0";+}++/**+ * Submit one opt-in email to the waitlist. Throws on invalid email or a failed+ * request; resolves on success (a repeat email is a silent success — the user+ * is simply already on the list).+ */+export async function submitWaitlist(+ email: string,+ source: WaitlistSource = "app-badge",+): Promise<void> {+ const clean = email.trim().toLowerCase();+ if (!isValidEmail(clean)) throw new Error("Please enter a valid email address.");++ const version = await getAppVersion();++ if (isTauri()) {+ const { invoke } = await import("@tauri-apps/api/core");+ // Single-word keys map 1:1 to the Rust params (no camel/snake ambiguity).+ await invoke("waitlist_submit", { email: clean, source, version });+ return;+ }++ // Dev / browser path: direct REST insert.+ const res = await fetch(`${SUPABASE_URL}/rest/v1/waitlist`, {+ method: "POST",+ headers: {+ apikey: SUPABASE_ANON_KEY,+ Authorization: `Bearer ${SUPABASE_ANON_KEY}`,+ "Content-Type": "application/json",+ // return=minimal is mandatory under insert-only RLS (no SELECT-back).+ // Plain insert (not an upsert — that 401s under insert-only RLS); a+ // duplicate email comes back as 409, handled as success below.+ Prefer: "return=minimal",+ },+ body: JSON.stringify({ email: clean, source, app_version: version }),+ });+ // 409 = duplicate email (unique constraint) → still "on the list".+ if (!res.ok && res.status !== 409) {+ const text = await res.text().catch(() => "");+ log.warn("[waitlist] dev submit failed", { status: res.status, text });+ throw new Error(`Waitlist signup failed (HTTP ${res.status}).`);+ }+}diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsxindex 2dbc35ce..eaecdbf1 100644--- a/src/components/chat/ChatView.tsx+++ b/src/components/chat/ChatView.tsx@@ -26,6 +26,7 @@ import { RealtimeCounter } from './RealtimeCounter'import { CodexView } from './CodexView'import { useCodexStore } from '../../stores/codexStore'import { useRemoteStore } from '../../stores/remoteStore'+import { useImageToolNoti } from '../../hooks/useImageToolNoti'export function ChatView() {const { sendMessage, stopGeneration, isGenerating, isLoadingModel, regenerateMessage, editAndResend, pendingApproval, approveToolCall, rejectToolCall } = useChat()@@ -52,6 +53,9 @@ export function ChatView() {const isAgentActive = useAgentModeStore((s) =>activeConversationId ? s.agentModeActive[activeConversationId] ?? false : false)+ // Image-tool discovery noti (HW-gated, clears on first click). Used to dot+ // the Tools button; the "1" itself lives on the Image row in the dropdown.+ const { visible: imageToolNoti } = useImageToolNoti()const isComparing = useCompareStore((s) => s.isComparing)// Remote-chat state: show a reactivate banner when the user is viewing a@@ -175,6 +179,12 @@ export function ChatView() {<span>Tools</span><ChevronDown size={8} className={`transition-transform ${toolsDropdownOpen ? 'rotate-180' : ''}`} /></button>+ {/* Image-tool discovery noti dot — signals "open Tools" on+ image-gen-capable hardware; clears with the dropdown "1"+ (same seen flag). Purely visual. */}+ {imageToolNoti && (+ <span className="absolute -top-1 -right-1 w-2 h-2 rounded-full bg-purple-500 ring-2 ring-gray-100 dark:ring-[#141414] pointer-events-none" />+ )}{toolsDropdownOpen && (<><div className="fixed inset-0 z-40" onClick={() => setToolsDropdownOpen(false)} />diff --git a/src/components/chat/PermissionOverrideBar.tsx b/src/components/chat/PermissionOverrideBar.tsxindex b134ac66..8c430ff9 100644--- a/src/components/chat/PermissionOverrideBar.tsx+++ b/src/components/chat/PermissionOverrideBar.tsx@@ -1,6 +1,7 @@import { usePermissionStore } from '../../stores/permissionStore'import { useChatStore } from '../../stores/chatStore'import type { ToolCategory } from '../../api/mcp/types'+import { useImageToolNoti } from '../../hooks/useImageToolNoti'import { FolderOpen, Terminal, Monitor, Globe, Cpu, Image, Film, GitBranch, Lock } from 'lucide-react'// Image generation is LIVE (chat agent → ComfyUI). Video generation is turned@@ -23,6 +24,7 @@ const CATEGORIES: { key: ToolCategory; icon: typeof Globe; label: string }[] = [export function PermissionOverrideBar() {const activeConversationId = useChatStore((s) => s.activeConversationId)const { getEffectivePermissions, setConversationOverride } = usePermissionStore()+ const { visible: imageNoti, dismiss: dismissImageNoti } = useImageToolNoti()if (!activeConversationId) return null@@ -30,6 +32,9 @@ export function PermissionOverrideBar() {const toggleTool = (cat: ToolCategory) => {if (LOCKED.has(cat)) return+ // First click on the image-tool noti only acknowledges it (purely visual,+ // no activation — David 2026-06-06). After that the row toggles as normal.+ if (cat === 'image' && imageNoti) { dismissImageNoti(); return }const current = permissions[cat]setConversationOverride(activeConversationId, cat, current === 'blocked' ? 'auto' : 'blocked')}@@ -58,6 +63,13 @@ export function PermissionOverrideBar() {<Icon size={8} className={isOn ? 'text-green-400' : 'text-gray-600'} />)}<span className={`flex-1 text-left ${isLocked ? 'line-through' : ''}`}>{label}</span>+ {/* Image-tool discovery noti — small purple "1", purely visual,+ clears on first click (David 2026-06-06). HW-gated by the hook. */}+ {key === 'image' && imageNoti && (+ <span className="min-w-[12px] h-[12px] flex items-center justify-center rounded-full bg-purple-500 text-[0.45rem] font-bold text-white leading-none px-0.5 mr-0.5">+ 1+ </span>+ )}{isLocked ? (<span className="text-[0.4rem] text-gray-700">soon</span>) : (diff --git a/src/components/layout/CloudWaitlistBadge.tsx b/src/components/layout/CloudWaitlistBadge.tsxnew file mode 100644index 00000000..7540c4db--- /dev/null+++ b/src/components/layout/CloudWaitlistBadge.tsx@@ -0,0 +1,164 @@+import { useState, useRef, useEffect, type KeyboardEvent } from 'react'+import { motion, AnimatePresence } from 'framer-motion'+import { Cloud, Check, Loader2 } from 'lucide-react'+import { useCloudTeaserStore } from '../../stores/cloudTeaserStore'+import { submitWaitlist, isValidEmail } from '../../api/waitlist'+import { log } from '../../lib/logger'++/**+ * Cloud "Hosted LU Workflows" waitlist teaser — a subtle purple badge next to+ * the brand monogram (top-left). Click opens a small popover with one optional+ * email field.+ *+ * Deliberately NOT naggy (the adversarial call): no pulsing/animation on the+ * dot, the network call fires ONLY on the explicit "Notify me" click (never on+ * render or launch), and there is honest microcopy that this is the one thing+ * LU sends off-device. The badge only ever disappears via the explicit+ * "Don't show me again" — closing the popover or clicking outside leaves it.+ *+ * The popover is a self-contained dark gradient card (black → dark-grey) in+ * both themes — David 2026-06-06 wanted it distinct from the flat grey panels,+ * so all inner text is light regardless of light/dark mode.+ */+export function CloudWaitlistBadge() {+ const dismissed = useCloudTeaserStore((s) => s.dismissed)+ const submitted = useCloudTeaserStore((s) => s.submitted)+ const setDismissed = useCloudTeaserStore((s) => s.setDismissed)+ const setSubmitted = useCloudTeaserStore((s) => s.setSubmitted)++ const [open, setOpen] = useState(false)+ const [email, setEmail] = useState('')+ const [busy, setBusy] = useState(false)+ const [error, setError] = useState<string | null>(null)+ const ref = useRef<HTMLDivElement>(null)++ // Click outside closes the popover (does NOT dismiss the badge).+ useEffect(() => {+ const handler = (e: MouseEvent) => {+ if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false)+ }+ document.addEventListener('mousedown', handler)+ return () => document.removeEventListener('mousedown', handler)+ }, [])++ // The badge is gone for good only once the user explicitly opts out.+ if (dismissed) return null++ const handleSubmit = async () => {+ if (busy) return+ const value = email.trim()+ if (!isValidEmail(value)) {+ setError('Please enter a valid email address.')+ return+ }+ setBusy(true)+ setError(null)+ try {+ await submitWaitlist(value, 'app-badge')+ setSubmitted(true) // popover flips to the "you're on the list" state+ } catch (err) {+ log.error('[waitlist] submit failed', { err })+ setError(err instanceof Error ? err.message : 'Something went wrong. Please try again.')+ } finally {+ setBusy(false)+ }+ }++ const onKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {+ if (e.key === 'Enter') { e.preventDefault(); void handleSubmit() }+ }++ return (+ <div ref={ref} className="relative">+ {/* Trigger — subtle, no pulse */}+ <button+ onClick={() => setOpen((v) => !v)}+ className="relative p-1 rounded-md text-purple-500 hover:text-purple-400 hover:bg-purple-500/10 transition-colors"+ title="LU in the cloud — early access"+ aria-label="Cloud early access"+ >+ <Cloud size={14} />+ <span className="absolute -top-0.5 -right-0.5 min-w-[13px] h-[13px] flex items-center justify-center rounded-full bg-purple-500 text-[0.5rem] font-bold text-white leading-none px-0.5">+ {submitted ? <Check size={8} strokeWidth={3} /> : '1'}+ </span>+ </button>++ <AnimatePresence>+ {open && (+ <motion.div+ className="absolute left-0 top-full mt-1.5 w-72 rounded-lg overflow-hidden z-50 bg-gradient-to-br from-black via-neutral-900 to-neutral-700 border border-white/10 shadow-2xl shadow-black/60"+ initial={{ opacity: 0, y: -6, scale: 0.98 }}+ animate={{ opacity: 1, y: 0, scale: 1 }}+ exit={{ opacity: 0, y: -6, scale: 0.98 }}+ transition={{ duration: 0.12, ease: 'easeOut' }}+ >+ <div className="p-3.5">+ <div className="flex items-center gap-1.5 mb-1.5">+ <Cloud size={13} className="text-purple-400" />+ <span className="text-[0.72rem] font-semibold text-white">+ LU in the cloud is coming+ </span>+ </div>++ {submitted ? (+ <div className="py-1">+ <div className="flex items-center gap-1.5 text-green-400">+ <Check size={13} strokeWidth={3} />+ <span className="text-[0.72rem] font-medium">You're on the list.</span>+ </div>+ <p className="mt-1 text-[0.64rem] leading-relaxed text-gray-300">+ We'll email you once early access opens. Nothing else.+ </p>+ </div>+ ) : (+ <>+ <p className="text-[0.64rem] leading-relaxed text-gray-300 mb-2.5">+ Run LU from your phone or any light setup — hosted workflows.+ Local stays free & private.+ </p>+ <div className="flex items-center gap-1.5">+ <input+ type="email"+ inputMode="email"+ autoComplete="off"+ value={email}+ onChange={(e) => { setEmail(e.target.value); if (error) setError(null) }}+ onKeyDown={onKeyDown}+ placeholder="[email protected]"+ disabled={busy}+ className="flex-1 min-w-0 px-2 py-1 rounded-md text-[0.7rem] bg-white/10 border border-white/15 text-white placeholder:text-gray-400 focus:outline-none focus:border-purple-400/70 disabled:opacity-50"+ />+ <button+ onClick={() => void handleSubmit()}+ disabled={busy}+ className="shrink-0 flex items-center gap-1 px-2 py-1 rounded-md text-[0.68rem] font-medium bg-purple-500 hover:bg-purple-400 text-white disabled:opacity-60 transition-colors"+ >+ {busy ? <Loader2 size={11} className="animate-spin" /> : null}+ Notify me+ </button>+ </div>+ {error && (+ <p className="mt-1.5 text-[0.62rem] text-red-400">{error}</p>+ )}+ <p className="mt-2 text-[0.58rem] leading-relaxed text-gray-400">+ This is the only thing LU sends off your device.+ </p>+ </>+ )}+ </div>++ {/* Explicit opt-out — the ONLY way the badge goes away for good. */}+ <div className="border-t border-white/10 px-3.5 py-1.5">+ <button+ onClick={() => { setDismissed(true); setOpen(false) }}+ className="text-[0.6rem] text-gray-400 hover:text-gray-200 transition-colors"+ >+ Don't show me again+ </button>+ </div>+ </motion.div>+ )}+ </AnimatePresence>+ </div>+ )+}diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsxindex 4137a107..a4f6d247 100644--- a/src/components/layout/Header.tsx+++ b/src/components/layout/Header.tsx@@ -9,6 +9,7 @@ import { ModelSelector } from '../models/ModelSelector'import { MemoryDebugToggle } from '../chat/MemoryDebugPanel'import { UpdateBadge } from './UpdateBadge'import { DownloadBadge } from './DownloadBadge'+import { CloudWaitlistBadge } from './CloudWaitlistBadge'import { CreateTopControls } from '../create/CreateTopControls'import { loadModel } from '../../api/ollama'import { getProviderIdFromModel } from '../../api/providers'@@ -136,7 +137,7 @@ export function Header() {)return (- <header className="relative h-10 flex items-center justify-between px-3 bg-gray-100 dark:bg-[#141414] z-20">+ <header className="relative h-10 flex items-center justify-between px-3 bg-gray-100 dark:bg-[#141414] z-30">{/* Left: Sidebar + Logo */}<div className="flex items-center gap-2"><button@@ -159,6 +160,10 @@ export function Header() {inverted per theme. Matches the web companion. */}<img src="/LU-monogram-bw.png" alt="" width={33} height={33} className="dark:invert-0 invert opacity-80" /></button>+ {/* Cloud "Hosted LU Workflows" waitlist teaser — subtle opt-in badge+ in the brand area (David 2026-06-06). Sends nothing unless the user+ explicitly joins; hidden for good only via "Don't show me again". */}+ <CloudWaitlistBadge /></div>{/* Center: model picker, geometrically centered between the logo (left)diff --git a/src/hooks/useImageToolNoti.ts b/src/hooks/useImageToolNoti.tsnew file mode 100644index 00000000..3c18948f--- /dev/null+++ b/src/hooks/useImageToolNoti.ts@@ -0,0 +1,38 @@+import { useEffect } from "react";+import { useImageNotiStore } from "../stores/imageNotiStore";+import { isImageGenCapable } from "../lib/hardware";++// Module-level guard so the two consumers (Tools button + the dropdown row)+// don't both fire the hardware probe before either resolves.+let probeInFlight = false;++/**+ * Drives the image-tool discovery noti. Returns whether the noti should show+ * right now and a `dismiss()` that hides it for good.+ *+ * visible = hardware-capable (VRAM≥12 OR RAM≥16) AND not yet clicked+ *+ * The hardware probe runs once per session (cached in the store); `dismiss()`+ * is persisted so the noti never returns after the first click.+ */+export function useImageToolNoti() {+ const seen = useImageNotiStore((s) => s.seen);+ const eligible = useImageNotiStore((s) => s.eligible);+ const setSeen = useImageNotiStore((s) => s.setSeen);++ useEffect(() => {+ if (eligible !== null || probeInFlight) return;+ probeInFlight = true;+ isImageGenCapable()+ .then((ok) => useImageNotiStore.getState().setEligible(ok))+ .catch(() => useImageNotiStore.getState().setEligible(false))+ .finally(() => {+ probeInFlight = false;+ });+ }, [eligible]);++ return {+ visible: eligible === true && !seen,+ dismiss: () => setSeen(true),+ };+}diff --git a/src/lib/__tests__/hardware.test.ts b/src/lib/__tests__/hardware.test.tsnew file mode 100644index 00000000..b1d5c922--- /dev/null+++ b/src/lib/__tests__/hardware.test.ts@@ -0,0 +1,29 @@+import { describe, it, expect } from 'vitest'+import { meetsImageGenThreshold } from '../hardware'++// ═══════════════════════════════════════════════════════════════+// hardware — image-gen capability threshold (VRAM≥12 OR RAM≥16)+// ═══════════════════════════════════════════════════════════════++describe('meetsImageGenThreshold', () => {+ it('passes on enough VRAM alone', () => {+ expect(meetsImageGenThreshold(12, 8)).toBe(true) // 12GB VRAM, 8GB RAM+ expect(meetsImageGenThreshold(24, 8)).toBe(true)+ })++ it('passes on enough RAM alone', () => {+ expect(meetsImageGenThreshold(0, 16)).toBe(true) // no GPU, 16GB RAM+ expect(meetsImageGenThreshold(6, 32)).toBe(true)+ })++ it('fails when below both thresholds', () => {+ expect(meetsImageGenThreshold(8, 8)).toBe(false)+ expect(meetsImageGenThreshold(11.9, 15.9)).toBe(false)+ expect(meetsImageGenThreshold(0, 0)).toBe(false)+ })++ it('treats the thresholds as inclusive (≥)', () => {+ expect(meetsImageGenThreshold(12, 0)).toBe(true)+ expect(meetsImageGenThreshold(0, 16)).toBe(true)+ })+})diff --git a/src/lib/hardware.ts b/src/lib/hardware.tsnew file mode 100644index 00000000..fbcf9b22--- /dev/null+++ b/src/lib/hardware.ts@@ -0,0 +1,59 @@+/**+ * Hardware capability probes for UI gating (e.g. the image-tool discovery noti).+ *+ * Sources, both already shipped + registered as Tauri commands:+ * - `detect_gpus` → DetectedGpu[] with `memory_mib` (nvidia-smi / rocm-smi /+ * lspci / wmic → covers NVIDIA, AMD, Intel). Max across GPUs.+ * - `system_info` → `{ totalMemory: <bytes> }` (sysinfo). Total physical RAM.+ *+ * Both fail-soft to 0 (e.g. dev/browser where the command isn't wired, or a+ * machine with no vendor tool) so a probe failure simply means "not capable" —+ * the noti then stays hidden, which is the desired "sonst keine noti" behaviour.+ */++import { backendCall } from "../api/backend";++interface DetectedGpu {+ index: number;+ vendor: string;+ name: string;+ memory_mib: number | null;+ source: string;+}++/**+ * Pure threshold for "is image generation worth surfacing on this machine?".+ * David 2026-06-06: show the image-tool noti only when there is ≥12 GB VRAM+ * OR ≥16 GB system RAM — otherwise no noti.+ */+export function meetsImageGenThreshold(maxVramGb: number, totalRamGb: number): boolean {+ return maxVramGb >= 12 || totalRamGb >= 16;+}++/** Largest single-GPU VRAM in GB across all detected GPUs (0 if none/unknown). */+export async function getMaxVramGb(): Promise<number> {+ try {+ const gpus = await backendCall<DetectedGpu[]>("detect_gpus");+ const mibs = (Array.isArray(gpus) ? gpus : []).map((g) => g.memory_mib ?? 0);+ return mibs.length ? Math.max(...mibs) / 1024 : 0;+ } catch {+ return 0;+ }+}++/** Total physical RAM in GB (0 if unknown). */+export async function getTotalRamGb(): Promise<number> {+ try {+ const info = await backendCall<{ totalMemory?: number }>("system_info");+ const bytes = typeof info?.totalMemory === "number" ? info.totalMemory : 0;+ return bytes / 1_073_741_824;+ } catch {+ return 0;+ }+}++/** True when the machine clears the image-gen hardware bar (VRAM≥12 OR RAM≥16). */+export async function isImageGenCapable(): Promise<boolean> {+ const [vram, ram] = await Promise.all([getMaxVramGb(), getTotalRamGb()]);+ return meetsImageGenThreshold(vram, ram);+}diff --git a/src/stores/__tests__/cloudTeaserStore.test.ts b/src/stores/__tests__/cloudTeaserStore.test.tsnew file mode 100644index 00000000..63c65ca2--- /dev/null+++ b/src/stores/__tests__/cloudTeaserStore.test.ts@@ -0,0 +1,31 @@+import { describe, it, expect, beforeEach } from 'vitest'+import { useCloudTeaserStore } from '../cloudTeaserStore'++// ═══════════════════════════════════════════════════════════════+// cloudTeaserStore — Cloud waitlist teaser persistence+// ═══════════════════════════════════════════════════════════════++describe('cloudTeaserStore', () => {+ beforeEach(() => {+ useCloudTeaserStore.setState({ dismissed: false, submitted: false })+ })++ it('defaults to visible and not-yet-submitted', () => {+ const s = useCloudTeaserStore.getState()+ expect(s.dismissed).toBe(false)+ expect(s.submitted).toBe(false)+ })++ it('setSubmitted flips the join flag without dismissing the badge', () => {+ useCloudTeaserStore.getState().setSubmitted(true)+ const s = useCloudTeaserStore.getState()+ expect(s.submitted).toBe(true)+ // Per the plan: joining the list must NOT hide the badge.+ expect(s.dismissed).toBe(false)+ })++ it('setDismissed is the only thing that hides the badge', () => {+ useCloudTeaserStore.getState().setDismissed(true)+ expect(useCloudTeaserStore.getState().dismissed).toBe(true)+ })+})diff --git a/src/stores/__tests__/imageNotiStore.test.ts b/src/stores/__tests__/imageNotiStore.test.tsnew file mode 100644index 00000000..1a90c146--- /dev/null+++ b/src/stores/__tests__/imageNotiStore.test.ts@@ -0,0 +1,30 @@+import { describe, it, expect, beforeEach } from 'vitest'+import { useImageNotiStore } from '../imageNotiStore'++// ═══════════════════════════════════════════════════════════════+// imageNotiStore — image-tool discovery noti persistence+// ═══════════════════════════════════════════════════════════════++describe('imageNotiStore', () => {+ beforeEach(() => {+ useImageNotiStore.setState({ seen: false, eligible: null })+ })++ it('defaults to unseen + eligibility-unknown', () => {+ const s = useImageNotiStore.getState()+ expect(s.seen).toBe(false)+ expect(s.eligible).toBe(null)+ })++ it('setSeen hides the noti for good', () => {+ useImageNotiStore.getState().setSeen(true)+ expect(useImageNotiStore.getState().seen).toBe(true)+ })++ it('setEligible records the hardware probe result', () => {+ useImageNotiStore.getState().setEligible(true)+ expect(useImageNotiStore.getState().eligible).toBe(true)+ useImageNotiStore.getState().setEligible(false)+ expect(useImageNotiStore.getState().eligible).toBe(false)+ })+})diff --git a/src/stores/cloudTeaserStore.ts b/src/stores/cloudTeaserStore.tsnew file mode 100644index 00000000..3de16f1d--- /dev/null+++ b/src/stores/cloudTeaserStore.ts@@ -0,0 +1,31 @@+import { create } from "zustand";+import { persist } from "zustand/middleware";++/**+ * Persisted state for the Cloud "Hosted LU Workflows" waitlist teaser badge.+ *+ * - `dismissed`: the user clicked "Don't show me again". This is the ONLY way+ * the badge disappears — closing the popover or clicking outside leaves it.+ * Persists across app restarts (zustand persist → localStorage `lu_cloud_teaser`).+ * - `submitted`: the user joined the waitlist. The badge intentionally STAYS+ * (per the plan) but the popover then shows "You're on the list" instead of+ * the form.+ */+interface CloudTeaserState {+ dismissed: boolean;+ submitted: boolean;+ setDismissed: (v: boolean) => void;+ setSubmitted: (v: boolean) => void;+}++export const useCloudTeaserStore = create<CloudTeaserState>()(+ persist(+ (set) => ({+ dismissed: false,+ submitted: false,+ setDismissed: (v) => set({ dismissed: v }),+ setSubmitted: (v) => set({ submitted: v }),+ }),+ { name: "lu_cloud_teaser" },+ ),+);diff --git a/src/stores/imageNotiStore.ts b/src/stores/imageNotiStore.tsnew file mode 100644index 00000000..85ffd805--- /dev/null+++ b/src/stores/imageNotiStore.ts@@ -0,0 +1,38 @@+import { create } from "zustand";+import { persist } from "zustand/middleware";++/**+ * State for the image-tool discovery noti — a small purple "1" badge on the+ * Image entry in the agent-mode Tools dropdown (+ a dot on the Tools button),+ * shown only on image-gen-capable hardware (see lib/hardware).+ *+ * - `seen` (persisted): the user has clicked the Image noti once. This is the+ * ONLY thing that hides it, and it persists across restarts. Purely visual —+ * acknowledging the noti does NOT toggle the image tool (David 2026-06-06:+ * "nichts aktivieren rein optisch").+ * - `eligible` (transient): result of the one-shot hardware probe. `null` = not+ * checked yet this session; re-probed every launch so a hardware change is+ * always reflected.+ */+interface ImageNotiState {+ seen: boolean;+ eligible: boolean | null;+ setSeen: (v: boolean) => void;+ setEligible: (v: boolean) => void;+}++export const useImageNotiStore = create<ImageNotiState>()(+ persist(+ (set) => ({+ seen: false,+ eligible: null,+ setSeen: (v) => set({ seen: v }),+ setEligible: (v) => set({ eligible: v }),+ }),+ {+ name: "lu_image_tool_noti",+ // Only the dismissal persists; eligibility is re-probed each launch.+ partialize: (s) => ({ seen: s.seen }),+ },+ ),+);