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
fix(create): match Chat sizing, stop cutoffs, fix light mode
purple21e3a89222f2
diff --git a/src/components/create/experimental/CreateExperimental.tsx b/src/components/create/experimental/CreateExperimental.tsxindex d7b2866a..3ceadc68 100644--- a/src/components/create/experimental/CreateExperimental.tsx+++ b/src/components/create/experimental/CreateExperimental.tsx@@ -91,7 +91,7 @@ function CreateExperimentalInner() {}, [intent])return (- <div className="h-full w-full flex flex-col bg-[#141414] text-gray-200 overflow-hidden">+ <div className="h-full w-full flex flex-col bg-white dark:bg-[#141414] text-gray-200 overflow-hidden"><IntentBar /><AnimatePresence>diff --git a/src/components/create/experimental/MaskEditor.tsx b/src/components/create/experimental/MaskEditor.tsxindex 4d7ca9cb..eb8f4c1c 100644--- a/src/components/create/experimental/MaskEditor.tsx+++ b/src/components/create/experimental/MaskEditor.tsx@@ -212,7 +212,7 @@ function MaskEditorInner({ onClose }: { onClose: () => void }) {<motion.divinitial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}role="dialog" aria-modal="true" aria-labelledby="mask-editor-title"- className="fixed inset-0 z-[90] bg-[#141414] flex flex-col"+ className="fixed inset-0 z-[90] bg-white dark:bg-[#141414] flex flex-col">{/* top bar */}<div className="flex items-center justify-between px-4 h-12 border-b border-white/[0.06] shrink-0">diff --git a/src/components/create/experimental/OutputView.tsx b/src/components/create/experimental/OutputView.tsxindex 0435bb8f..66c9ee00 100644--- a/src/components/create/experimental/OutputView.tsx+++ b/src/components/create/experimental/OutputView.tsx@@ -130,7 +130,8 @@ export function ResultView({ item, onFullscreen, onSendToEditor }: ResultProps)const download = () => void downloadGalleryItem(item)const isVideo = item.type === 'video'return (- <div className="flex-1 flex flex-col items-center justify-center p-6 min-h-0">+ <div className="flex-1 min-h-0 overflow-y-auto scrollbar-thin flex flex-col">+ <div className="m-auto flex flex-col items-center p-6"><div className="relative group max-w-full max-h-full">{isVideo ? (<video@@ -179,6 +180,7 @@ export function ResultView({ item, onFullscreen, onSendToEditor }: ResultProps)<span>·</span><span className="truncate max-w-[280px]">{prettyModel(item.model)}</span></div>+ </div></div>)}diff --git a/src/components/create/experimental/Stage.tsx b/src/components/create/experimental/Stage.tsxindex 8e0a17ec..b17e1b8e 100644--- a/src/components/create/experimental/Stage.tsx+++ b/src/components/create/experimental/Stage.tsx@@ -154,44 +154,54 @@ function InputSlot() {}return (- <div className="flex-1 flex flex-col items-center justify-center p-6">- <div- onClick={() => inputRef.current?.click()}- onDragOver={(e) => { e.preventDefault(); setDrag(true) }}- onDragLeave={() => setDrag(false)}- onDrop={(e) => { e.preventDefault(); setDrag(false); const f = e.dataTransfer.files[0]; if (f) handleFile(f) }}- className={cn(- 'w-full max-w-sm aspect-[5/4] min-h-[220px] max-h-[44vh] rounded-[var(--radius-panel)] border-2 border-dashed flex flex-col items-center justify-center gap-3 cursor-pointer transition-colors',- drag ? 'border-blue-400 bg-blue-500/10' : 'border-white/10 bg-white/[0.02] hover:border-white/20',- )}- >- {loading ? <Loader2 className="animate-spin text-gray-400" size={28} /> : (- meta.id === 'removebg' ? <Scissors className="text-gray-500" size={28} strokeWidth={1.5} /> : <UploadCloud className="text-gray-500" size={28} strokeWidth={1.5} />- )}- <div className="text-center">- <div className="t-title text-gray-300">{meta.id === 'removebg' ? 'Drop an image to cut out' : meta.id === 'animate' ? 'Drop an image to animate' : 'Drop an image to edit'}</div>- <div className="t-body text-gray-600">or click to browse · PNG, JPG, WebP</div>- </div>- <input ref={inputRef} type="file" accept="image/*" className="hidden" onChange={(e) => { const f = e.target.files?.[0]; if (f) handleFile(f) }} />- </div>- {galleryImages.length > 0 && (- <div className="mt-4 w-full max-w-sm">- <div className="t-label text-gray-600 mb-2 text-center">or pick from your gallery</div>- <div className="flex justify-center gap-1.5 overflow-x-auto pb-1">- {galleryImages.map((g) => (- <button- key={g.id}- onClick={() => { if (!loading) void adoptFromGallery(g) }}- className="shrink-0 w-12 h-12 rounded-md overflow-hidden border border-white/10 hover:border-white/30 transition-colors"- title="Use this image as the source"- aria-label="Use this gallery image as the source"- >- <img src={galleryItemUrl(g)} alt="" className="w-full h-full object-cover" onError={() => recoverGalleryUrl(g)} />- </button>- ))}+ // Scroll-safe centering: `m-auto` centres the column when there's room and+ // collapses to a scroll when the dropzone + gallery strip exceed a short+ // window (e.g. a 1366×768 laptop) — previously the parent's overflow-hidden+ // clipped the "or pick from your gallery" strip.+ <div className="flex-1 min-h-0 overflow-y-auto scrollbar-thin flex flex-col">+ <div className="m-auto w-full max-w-sm flex flex-col items-center p-6">+ <div+ onClick={() => inputRef.current?.click()}+ onDragOver={(e) => { e.preventDefault(); setDrag(true) }}+ onDragLeave={() => setDrag(false)}+ onDrop={(e) => { e.preventDefault(); setDrag(false); const f = e.dataTransfer.files[0]; if (f) handleFile(f) }}+ className={cn(+ // max-h trimmed 44vh→36vh so the "or pick from your gallery" strip+ // below stays visible without scrolling at typical window heights+ // (the 44vh drop target scaled with the window and always shoved the+ // strip just past the fold). Still scrolls gracefully on tiny windows.+ 'w-full aspect-[5/4] min-h-[200px] max-h-[36vh] rounded-[var(--radius-panel)] border-2 border-dashed flex flex-col items-center justify-center gap-3 cursor-pointer transition-colors',+ drag ? 'border-blue-400 bg-blue-500/10' : 'border-white/10 bg-white/[0.02] hover:border-white/20',+ )}+ >+ {loading ? <Loader2 className="animate-spin text-gray-400" size={28} /> : (+ meta.id === 'removebg' ? <Scissors className="text-gray-500" size={28} strokeWidth={1.5} /> : <UploadCloud className="text-gray-500" size={28} strokeWidth={1.5} />+ )}+ <div className="text-center">+ <div className="t-title text-gray-300">{meta.id === 'removebg' ? 'Drop an image to cut out' : meta.id === 'animate' ? 'Drop an image to animate' : 'Drop an image to edit'}</div>+ <div className="t-body text-gray-600">or click to browse · PNG, JPG, WebP</div></div>+ <input ref={inputRef} type="file" accept="image/*" className="hidden" onChange={(e) => { const f = e.target.files?.[0]; if (f) handleFile(f) }} /></div>- )}+ {galleryImages.length > 0 && (+ <div className="mt-4 w-full">+ <div className="t-label text-gray-600 mb-2 text-center">or pick from your gallery</div>+ <div className="flex justify-center gap-1.5 overflow-x-auto pb-1">+ {galleryImages.map((g) => (+ <button+ key={g.id}+ onClick={() => { if (!loading) void adoptFromGallery(g) }}+ className="shrink-0 w-12 h-12 rounded-md overflow-hidden border border-white/10 hover:border-white/30 transition-colors"+ title="Use this image as the source"+ aria-label="Use this gallery image as the source"+ >+ <img src={galleryItemUrl(g)} alt="" className="w-full h-full object-cover" onError={() => recoverGalleryUrl(g)} />+ </button>+ ))}+ </div>+ </div>+ )}+ </div></div>)}@@ -210,33 +220,35 @@ function SourcePreview({ onOpenMaskEditor }: { onOpenMaskEditor: () => void }) {if (!source) return nullreturn (- <div className="flex-1 flex flex-col items-center justify-center p-6">- <div className="relative">- <img src={source.url} alt="source" className={cn('max-h-[52vh] max-w-full object-contain rounded-[var(--radius-panel)] border border-white/[0.06]', intent === 'removebg' && 'lu-checker')} />- {mask && (- <div className="absolute top-2 left-2 t-label text-gray-300 bg-black/50 px-2 py-1 rounded-md">mask painted</div>- )}- <button- onClick={() => { setSource(null); setMask(null) }}- className="absolute top-2 right-2 w-7 h-7 flex items-center justify-center rounded-lg bg-black/50 text-gray-300 hover:text-white"- title="Remove image"- >- <X size={14} />- </button>- </div>- <div className="flex items-center gap-2 mt-4">- {meta.allowsMask && (- <Button variant="secondary" icon={Wand2} onClick={onOpenMaskEditor}>{mask ? 'Edit mask' : 'Paint mask'}</Button>- )}- <ChangeImageButton onChange={(r) => setSource(r)} />+ <div className="flex-1 min-h-0 overflow-y-auto scrollbar-thin flex flex-col">+ <div className="m-auto flex flex-col items-center p-6">+ <div className="relative">+ <img src={source.url} alt="source" className={cn('max-h-[52vh] max-w-full object-contain rounded-[var(--radius-panel)] border border-white/[0.06]', intent === 'removebg' && 'lu-checker')} />+ {mask && (+ <div className="absolute top-2 left-2 t-label text-gray-300 bg-black/50 px-2 py-1 rounded-md">mask painted</div>+ )}+ <button+ onClick={() => { setSource(null); setMask(null) }}+ className="absolute top-2 right-2 w-7 h-7 flex items-center justify-center rounded-lg bg-black/50 text-gray-300 hover:text-white"+ title="Remove image"+ >+ <X size={14} />+ </button>+ </div>+ <div className="flex items-center gap-2 mt-4">+ {meta.allowsMask && (+ <Button variant="secondary" icon={Wand2} onClick={onOpenMaskEditor}>{mask ? 'Edit mask' : 'Paint mask'}</Button>+ )}+ <ChangeImageButton onChange={(r) => setSource(r)} />+ </div>+ <p className="t-body text-gray-600 mt-3 text-center max-w-sm">+ {meta.id === 'removebg' ? 'Hit Create to cut out the subject and export a transparent PNG.'+ : meta.id === 'upscale' ? 'Hit Create to upscale the image.'+ : meta.id === 'eraser' ? 'Paint a mask over the object to remove, then hit Create.'+ : meta.allowsMask ? 'Paint a mask over what should change, write the edit prompt below, then Create.'+ : 'Describe the motion below, then Create.'}+ </p></div>- <p className="t-body text-gray-600 mt-3 text-center max-w-sm">- {meta.id === 'removebg' ? 'Hit Create to cut out the subject and export a transparent PNG.'- : meta.id === 'upscale' ? 'Hit Create to upscale the image.'- : meta.id === 'eraser' ? 'Paint a mask over the object to remove, then hit Create.'- : meta.allowsMask ? 'Paint a mask over what should change, write the edit prompt below, then Create.'- : 'Describe the motion below, then Create.'}- </p></div>)}diff --git a/src/components/create/ui/Drawer.tsx b/src/components/create/ui/Drawer.tsxindex b93d0a1a..62d068bc 100644--- a/src/components/create/ui/Drawer.tsx+++ b/src/components/create/ui/Drawer.tsx@@ -60,7 +60,7 @@ export function Drawer({ open, onClose, title, width = 320, children, footer }:style={{ width }}className={cn('absolute top-0 right-0 bottom-0 z-50 flex flex-col',- 'bg-[#1e1e1e] border-l border-white/[0.08] shadow-[var(--shadow-xl)]',+ 'bg-white dark:bg-[#1e1e1e] border-l border-white/[0.08] shadow-[var(--shadow-xl)]',)}><div className="flex items-center justify-between px-4 h-12 border-b border-white/[0.06] shrink-0">diff --git a/src/index.css b/src/index.cssindex 65ef8f7c..754d5fb2 100644--- a/src/index.css+++ b/src/index.css@@ -32,6 +32,47 @@--shadow-lg: 0 8px 24px -6px rgba(0, 0, 0, 0.6), 0 2px 6px -2px rgba(0, 0, 0, 0.4);--shadow-xl: 0 16px 48px -12px rgba(0, 0, 0, 0.7), 0 4px 12px -4px rgba(0, 0, 0, 0.5);--shadow-2xl: 0 24px 64px -16px rgba(0, 0, 0, 0.8);++ /* ── Create surface accent — the disciplined violet promoted from the+ progress-bar rgb(160,148,248). Ported from the lu-labs create tokens+ (apps/web/app/globals.css). The desktop Create port referenced+ `bg-lu-accent` / `text-lu-accent` but never defined the colour, so the+ progress fill and accents resolved to nothing. ── */+ --color-lu-accent: #a094f8;+ --color-lu-accent-hover: #b1a6ff;+ --color-lu-accent-soft: rgba(160, 148, 248, 0.14);+ --color-lu-accent-ring: rgba(160, 148, 248, 0.55);+}++/* ─────────────────────────────────────────────────────────────────────+ Create design tokens — ported verbatim from the lu-labs web companion+ (apps/web/app/globals.css). The Create surface was ported WITHOUT these+ definitions, so every `t-*` typography class fell back to the raw 18.4px+ root (≈33% oversized vs Chat) and every `h-[var(--control-h-*)]` became an+ invalid/auto height — which is what oversized the Create tab relative to+ Chat and clipped the banner title / gallery / drop-zone. Chat is unaffected+ because it sizes with rem-based `text-*` utilities. These values are rem-+ based, so Create now scales off the same 18.4px root as Chat.+ ───────────────────────────────────────────────────────────────────── */+:root {+ /* Typography scale (rem-based → rides the 18.4px root exactly like Chat) */+ --text-display: 1.25rem; --text-display-lh: 1.2; --text-display-fw: 600;+ --text-title: 0.95rem; --text-title-lh: 1.3; --text-title-fw: 600;+ --text-body: 0.8rem; --text-body-lh: 1.5; --text-body-fw: 400;+ --text-control: 0.72rem; --text-control-lh: 1; --text-control-fw: 500;+ --text-label: 0.62rem; --text-label-lh: 1; --text-label-fw: 600;+ --text-mono: 0.7rem;++ /* Control heights + spacing rhythm */+ --space-unit: 4px;+ --control-h-sm: 26px;+ --control-h-md: 32px; /* default control height */+ --control-h-lg: 40px; /* primary Create button */++ /* Radii */+ --radius-control: 8px;+ --radius-panel: 12px;+ --radius-pill: 999px;}html {@@ -305,6 +346,8 @@ input[type="range"]::-webkit-slider-thumb {───────────────────────────────────────────────────────────────────── *//* Light mode: too-dim greys turn invisible on white. Darken them. */+.light .text-gray-100 { color: rgb(31 41 55); } /* → gray-800 (primary/heading text — the Create surface, ported dark-first, uses bare gray-100/200 for its t-title/body) */+.light .text-gray-200 { color: rgb(31 41 55); } /* → gray-800 */.light .text-gray-300 { color: rgb(75 85 99); } /* → gray-600 */.light .text-gray-400 { color: rgb(55 65 81); } /* → gray-700 */.light .text-gray-500 { color: rgb(55 65 81); } /* → gray-700 — same so 500 isn't dimmer than 400 */@@ -365,3 +408,37 @@ input[type="range"]::-webkit-slider-thumb {.light .placeholder-gray-500::placeholder,.light .placeholder-gray-600::placeholder { color: rgb(75 85 99); }++/* ─────────────────────────────────────────────────────────────────────+ Create typography + surface helpers — the classes the Create components+ apply instead of `text-[Npx]`. Ported from lu-labs globals.css. Without+ these every Create label/button/prompt rendered at the raw root size and+ the control-height vars above were undefined. See the token block near the+ top of this file for the full rationale.+ ───────────────────────────────────────────────────────────────────── */+.t-display { font-size: var(--text-display); line-height: var(--text-display-lh); font-weight: var(--text-display-fw); }+.t-title { font-size: var(--text-title); line-height: var(--text-title-lh); font-weight: var(--text-title-fw); }+.t-body { font-size: var(--text-body); line-height: var(--text-body-lh); font-weight: var(--text-body-fw); }+.t-control { font-size: var(--text-control); line-height: var(--text-control-lh); font-weight: var(--text-control-fw); }+.t-label { font-size: var(--text-label); line-height: var(--text-label-lh); font-weight: var(--text-label-fw); letter-spacing: 0.08em; text-transform: uppercase; }+.t-mono { font-size: var(--text-mono); font-variant-numeric: tabular-nums; font-family: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace; }++/* Focus affordance for Create controls that opt in via `.lu-focus-ring`+ (buttons/anchors already get the global ring above; this also covers+ div/role-based controls). Matches the global focus outline exactly. */+.lu-focus-ring:focus-visible {+ outline: 1px solid rgba(96, 165, 250, 0.6);+ outline-offset: 1px;+}++/* Checkerboard backing so transparent (background-removed) PNGs don't read+ as solid black in the Stage / gallery. */+.lu-checker {+ background-image:+ linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),+ linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),+ linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),+ linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%);+ background-size: 16px 16px;+ background-position: 0 0, 0 8px, 8px -8px, -8px 0;+}