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): Cloud features switched off leave no cloud tab and no Cloud sheet in Local mode
purplebbee8bdceb2f
diff --git a/src/components/cloud/CloudHiddenNotice.tsx b/src/components/cloud/CloudHiddenNotice.tsxnew file mode 100644index 00000000..f9d6f6f3--- /dev/null+++ b/src/components/cloud/CloudHiddenNotice.tsx@@ -0,0 +1,36 @@+import { useEffect } from 'react'+import { useUIStore } from '../../stores/uiStore'+import { useSettingsStore } from '../../stores/settingsStore'+import { Hinweis } from '../ui/Hinweis'++/** How long the line stays if nobody closes it. */+export const CLOUD_HIDDEN_NOTICE_MS = 12_000+export const CLOUD_HIDDEN_NOTICE = 'Cloud features are hidden. Turn them back on in Settings, General.'++/**+ * The answer to "Don't show Cloud features in Local mode" on the Cloud sheet+ * (the box, 04.10.2026: the click closed the sheet, the Cloud tabs and rows+ * were gone, and nothing said where they went). One quiet line at the top of+ * Create, where the sheet was opened from. It leaves on its X, after a few+ * seconds, and at once when the switch is turned back on.+ */+export function CloudHiddenNotice() {+ const shown = useUIStore((s) => s.cloudHiddenNotice)+ const setShown = useUIStore((s) => s.setCloudHiddenNotice)+ const cloudFeatures = useSettingsStore((s) => s.settings.cloudTeasersEnabled)+ const visible = shown && !cloudFeatures++ useEffect(() => {+ if (!shown) return+ if (cloudFeatures) { setShown(false); return }+ const t = setTimeout(() => setShown(false), CLOUD_HIDDEN_NOTICE_MS)+ return () => clearTimeout(t)+ }, [shown, cloudFeatures, setShown])++ if (!visible) return null+ return (+ <Hinweis className="px-4 py-2 shrink-0" onDismiss={() => setShown(false)}>+ {CLOUD_HIDDEN_NOTICE}+ </Hinweis>+ )+}diff --git a/src/components/cloud/CloudTeaserModal.tsx b/src/components/cloud/CloudTeaserModal.tsxindex cc02088f..84887a4b 100644--- a/src/components/cloud/CloudTeaserModal.tsx+++ b/src/components/cloud/CloudTeaserModal.tsx@@ -59,6 +59,7 @@ const INTENT_COPY: Record<Extract<CloudTeaserTarget, { surface: 'intent' }>['intexport function CloudTeaserModal() {const target = useUIStore((s) => s.cloudTeaser)const setCloudTeaser = useUIStore((s) => s.setCloudTeaser)+ const setCloudHiddenNotice = useUIStore((s) => s.setCloudHiddenNotice)const setIntent = useCreateStore((s) => s.setIntent)const { updateSettings } = useSettingsStore()// The card's own number (David, 2026-09-07): "Your GPU has 6 GB" says why@@ -85,6 +86,9 @@ export function CloudTeaserModal() {const hideCloudFeatures = () => {updateSettings({ cloudTeasersEnabled: false })setCloudTeaser(null)+ // The tabs and rows vanish with this click, so Create says where they+ // come back (CloudHiddenNotice).+ setCloudHiddenNotice(true)}// 2.5.8: the lanes that ALSO run locally get a "Try local" path — the sheet// stops being a pure upsell and becomes the fork between the two lanes.diff --git a/src/components/create/experimental/CreateExperimental.tsx b/src/components/create/experimental/CreateExperimental.tsxindex 34210bf9..b8070708 100644--- a/src/components/create/experimental/CreateExperimental.tsx+++ b/src/components/create/experimental/CreateExperimental.tsx@@ -21,6 +21,7 @@ import { Hinweis } from '../../ui/Hinweis'import { BannerText } from './BannerText'import { MaskEditor } from './MaskEditor'import { VhsInstallModal } from './VhsInstallModal'+import { CloudHiddenNotice } from '../../cloud/CloudHiddenNotice'import { PresetShelf } from './PresetShelf'import type { CreatePreset } from '../../../lib/render/create-presets'import { Modal } from '../../ui/Modal'@@ -404,6 +405,8 @@ function CreateExperimentalInner() {</Hinweis>)}+ <CloudHiddenNotice />+{/* Cloud gallery retention (David 2026-07-24). Cloud renders live on ourservers, not on this machine, so the gallery is not permanent storage.Cloud mode only. One time ever: no close X and no auto-hide, the onlydiff --git a/src/components/create/experimental/IntentBar.tsx b/src/components/create/experimental/IntentBar.tsxindex d1f21e7a..6ce8e99d 100644--- a/src/components/create/experimental/IntentBar.tsx+++ b/src/components/create/experimental/IntentBar.tsx@@ -1,6 +1,7 @@import { Cloud } from 'lucide-react'import { useCreateStore } from '../../../stores/createStore'import { useUIStore, type CloudTeaserTarget } from '../../../stores/uiStore'+import { useSettingsStore } from '../../../stores/settingsStore'import { isIntentLocked, visibleIntents } from './intents'import { isMlxImageHost } from '../../../api/mlx-image'import { cn } from '../ui/cn'@@ -63,7 +64,9 @@ export function IntentBar() {const setIntent = useCreateStore((s) => s.setIntent)const backend = useCreateStore((s) => s.backend)const setCloudTeaser = useUIStore((s) => s.setCloudTeaser)- // Every tool is always in the bar. The 2.5.8 lanes with hasLocalLane+ // Every tool that can run or be previewed is in the bar. With "Show Cloud+ // features in Local mode" off, the hosted-only tools are left out of the+ // local bar (visibleIntents). The 2.5.8 lanes with hasLocalLane// (lipsync / music / extend / motion) are REAL local tabs, plain selectable// pills with NO cloud glyph (David 2026-07-19: the top row only carries a// cloud badge for the genuinely hosted-only tools). Only upscale, eraser and@@ -74,7 +77,8 @@ export function IntentBar() {// either, so they lock there too. Both rules live in intents.ts so they stay// pure + unit tested; this component only renders the verdict.const mlxHost = isMlxImageHost()- const intents = visibleIntents(backend, mlxHost)+ const cloudFeatures = useSettingsStore((s) => s.settings.cloudTeasersEnabled)+ const intents = visibleIntents(backend, mlxHost, cloudFeatures)return (<divdiff --git a/src/components/create/experimental/__tests__/cloud-features-off-means-no-cloud-in-local.test.tsx b/src/components/create/experimental/__tests__/cloud-features-off-means-no-cloud-in-local.test.tsxnew file mode 100644index 00000000..a03b9199--- /dev/null+++ b/src/components/create/experimental/__tests__/cloud-features-off-means-no-cloud-in-local.test.tsx@@ -0,0 +1,133 @@+// @vitest-environment jsdom+/**+ * The box, 04.10.2026: with "Show Cloud features in Local mode" off, the+ * Create bar kept "Enhance" and "Erase" with their cloud tag, and a click+ * still opened the Cloud sheet. The switch only took the LU Cloud rows out of+ * the model pickers. Off now means: no cloud tag and no Cloud sheet in Local+ * mode. A tool that cannot run on this machine is left out of the bar, the+ * way the Mac already leaves out what MLX cannot do.+ *+ * And the click on "Don't show Cloud features in Local mode" is answered: one+ * line says where to turn them back on.+ */+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'+import { render, cleanup, screen, fireEvent, act } from '@testing-library/react'++const mlx = vi.hoisted(() => ({ host: false }))+vi.mock('../../../../api/mlx-image', () => ({ isMlxImageHost: () => mlx.host }))+vi.mock('../../../../lib/hardware', () => ({ getMaxVramGb: () => Promise.resolve(12) }))++import { IntentBar } from '../IntentBar'+import { INTENTS, isIntentLocked, visibleIntents } from '../intents'+import { CloudTeaserModal } from '../../../cloud/CloudTeaserModal'+import { CloudHiddenNotice, CLOUD_HIDDEN_NOTICE, CLOUD_HIDDEN_NOTICE_MS } from '../../../cloud/CloudHiddenNotice'+import { useCreateStore } from '../../../../stores/createStore'+import { useSettingsStore } from '../../../../stores/settingsStore'+import { useUIStore } from '../../../../stores/uiStore'++const setFeatures = (on: boolean) => useSettingsStore.getState().updateSettings({ cloudTeasersEnabled: on })+const pills = () => screen.getAllByRole('radio').map((b) => b.textContent)+const cloudTagged = () => screen.getAllByRole('radio').filter((b) => /runs on LU Cloud/.test(b.getAttribute('aria-label') ?? ''))++beforeEach(() => {+ mlx.host = false+ useCreateStore.setState({ backend: 'local' })+ useUIStore.setState({ cloudTeaser: null, cloudHiddenNotice: false })+ setFeatures(true)+})+afterEach(() => { cleanup(); vi.useRealTimers() })++describe('the rule', () => {+ it('on: every tool is in the local bar, the hosted-only ones as teasers', () => {+ expect(visibleIntents('local', false, true)).toEqual(INTENTS)+ })++ it('off: the local bar holds exactly the tools that run locally', () => {+ const ids = visibleIntents('local', false, false).map((m) => m.id)+ expect(ids).not.toContain('upscale')+ expect(ids).not.toContain('eraser')+ expect(ids).toEqual(INTENTS.filter((m) => !isIntentLocked(m, 'local', false)).map((m) => m.id))+ expect(ids).toEqual(expect.arrayContaining(['image', 'edit', 'removebg', 'video', 'animate', 'character', 'lipsync', 'music', 'extend', 'motion']))+ })++ it('off on a Mac: only what MLX runs', () => {+ expect(visibleIntents('local', true, false).map((m) => m.id)).toEqual(['image', 'video'])+ })++ it('cloud mode shows everything, whatever the switch says', () => {+ expect(visibleIntents('cloud', false, false)).toEqual(INTENTS)+ expect(visibleIntents('cloud', true, false)).toEqual(INTENTS)+ })+})++describe('the bar', () => {+ it('on: Enhance and Erase carry the cloud tag and open the Cloud sheet', () => {+ render(<IntentBar />)+ expect(cloudTagged().map((b) => b.textContent)).toEqual(['Enhance', 'Erase'])+ fireEvent.click(screen.getByRole('radio', { name: /Enhance Image/ }))+ expect(useUIStore.getState().cloudTeaser).toEqual({ surface: 'intent', intent: 'upscale' })+ })++ it('off: no cloud tag, no Enhance, no Erase, nothing left that opens the Cloud sheet', () => {+ setFeatures(false)+ render(<IntentBar />)+ expect(cloudTagged()).toEqual([])+ expect(pills()).not.toContain('Enhance')+ expect(pills()).not.toContain('Erase')+ for (const b of screen.getAllByRole('radio')) fireEvent.click(b)+ expect(useUIStore.getState().cloudTeaser).toBeNull()+ })++ it('the switch acts on the bar that is on screen', () => {+ render(<IntentBar />)+ expect(pills()).toContain('Enhance')+ act(() => setFeatures(false))+ expect(pills()).not.toContain('Enhance')+ act(() => setFeatures(true))+ expect(pills()).toContain('Enhance')+ })+})++describe('the link on the Cloud sheet is answered', () => {+ const clickLink = async () => {+ useUIStore.getState().setCloudTeaser({ surface: 'intent', intent: 'upscale' })+ await act(async () => { render(<><CloudHiddenNotice /><IntentBar /><CloudTeaserModal /></>) })+ fireEvent.click(screen.getByText("Don't show Cloud features in Local mode"))+ }++ it('says where to turn them back on, and the cloud tabs are gone', async () => {+ expect(screen.queryByText(CLOUD_HIDDEN_NOTICE)).toBeNull()+ await clickLink()+ expect(CLOUD_HIDDEN_NOTICE).toBe('Cloud features are hidden. Turn them back on in Settings, General.')+ expect(screen.getByRole('status').textContent).toContain(CLOUD_HIDDEN_NOTICE)+ expect(pills()).not.toContain('Enhance')+ })++ it('closing the sheet any other way says nothing', async () => {+ useUIStore.getState().setCloudTeaser({ surface: 'intent', intent: 'upscale' })+ await act(async () => { render(<><CloudHiddenNotice /><CloudTeaserModal /></>) })+ fireEvent.click(screen.getByText('Not now'))+ expect(screen.queryByText(CLOUD_HIDDEN_NOTICE)).toBeNull()+ })++ it('leaves on its X', async () => {+ await clickLink()+ fireEvent.click(screen.getByLabelText('Dismiss'))+ expect(screen.queryByText(CLOUD_HIDDEN_NOTICE)).toBeNull()+ })++ it('leaves by itself after a while', async () => {+ vi.useFakeTimers()+ await clickLink()+ expect(screen.queryByText(CLOUD_HIDDEN_NOTICE)).not.toBeNull()+ act(() => { vi.advanceTimersByTime(CLOUD_HIDDEN_NOTICE_MS + 10) })+ expect(screen.queryByText(CLOUD_HIDDEN_NOTICE)).toBeNull()+ })++ it('leaves at once when the switch is turned back on', async () => {+ await clickLink()+ act(() => setFeatures(true))+ expect(screen.queryByText(CLOUD_HIDDEN_NOTICE)).toBeNull()+ expect(useUIStore.getState().cloudHiddenNotice).toBe(false)+ })+})diff --git a/src/components/create/experimental/__tests__/intents.test.ts b/src/components/create/experimental/__tests__/intents.test.tsindex c2c4830e..3600eae9 100644--- a/src/components/create/experimental/__tests__/intents.test.ts+++ b/src/components/create/experimental/__tests__/intents.test.ts@@ -13,13 +13,13 @@ import { LOCAL_LANE_OPS } from '../../../../stores/createStore'// musubi trainer runtime (trainer.rs), so its train lane is local now too./** The pills the bar shows, in order. */const shown = (backend: 'local' | 'cloud', mlxHost: boolean) =>- visibleIntents(backend, mlxHost).map((m) => m.id)+ visibleIntents(backend, mlxHost, true).map((m) => m.id)/** The pills a user can actually select (no cloud-teaser lock). */const unlocked = (backend: 'local' | 'cloud', mlxHost: boolean) =>- visibleIntents(backend, mlxHost).filter((m) => !isIntentLocked(m, backend, mlxHost)).map((m) => m.id)+ visibleIntents(backend, mlxHost, true).filter((m) => !isIntentLocked(m, backend, mlxHost)).map((m) => m.id)/** The pills shown as locked, cloud-tagged teasers. */const teasers = (backend: 'local' | 'cloud', mlxHost: boolean) =>- visibleIntents(backend, mlxHost).filter((m) => isIntentLocked(m, backend, mlxHost)).map((m) => m.id)+ visibleIntents(backend, mlxHost, true).filter((m) => isIntentLocked(m, backend, mlxHost)).map((m) => m.id)describe('intent cloud gating', () => {it('upscale and eraser stay hosted-only (no local lane)', () => {diff --git a/src/components/create/experimental/intents.ts b/src/components/create/experimental/intents.tsindex 67554f1c..e25a53bc 100644--- a/src/components/create/experimental/intents.ts+++ b/src/components/create/experimental/intents.ts@@ -195,10 +195,18 @@ const MLX_LOCAL_INTENTS: ReadonlySet<CreateIntent> = new Set<CreateIntent>(['ima* need a ComfyUI node or a ComfyUI-staged source image, so leaving them* selectable is a dead affordance that either errors on submit or — worse, the* MLX case — silently drops the source and returns an unrelated fresh image.+ *+ * `cloudFeatures` is the setting "Show Cloud features in Local mode". Off, the+ * local bar carries no cloud teaser at all: a tool that cannot run on this+ * machine is left out, the same way the Mac leaves out what MLX cannot do.+ * Until 3.0.5 the switch only took the LU Cloud rows out of the model+ * pickers, and Enhance and Erase kept their cloud tag and kept opening the+ * Cloud sheet (the box, 04.10.2026).*/-export function visibleIntents(backend: CreateBackend, mlxHost: boolean): IntentMeta[] {- if (backend === 'cloud' || !mlxHost) return INTENTS- return INTENTS.filter((m) => MLX_LOCAL_INTENTS.has(m.id) || m.cloudOnly === true)+export function visibleIntents(backend: CreateBackend, mlxHost: boolean, cloudFeatures: boolean): IntentMeta[] {+ if (backend === 'cloud') return INTENTS+ const shown = mlxHost ? INTENTS.filter((m) => MLX_LOCAL_INTENTS.has(m.id) || m.cloudOnly === true) : INTENTS+ return cloudFeatures ? shown : shown.filter((m) => !isIntentLocked(m, backend, mlxHost))}/**@@ -223,5 +231,5 @@ export function isIntentLocked(meta: IntentMeta, backend: CreateBackend, mlxHost*/export function isIntentAvailable(id: CreateIntent, backend: CreateBackend, mlxHost: boolean): boolean {const meta = INTENT_MAP[id]- return visibleIntents(backend, mlxHost).includes(meta) && !isIntentLocked(meta, backend, mlxHost)+ return visibleIntents(backend, mlxHost, true).includes(meta) && !isIntentLocked(meta, backend, mlxHost)}diff --git a/src/stores/__tests__/der-mac-strandet-nicht-auf-einem-werkzeug.test.ts b/src/stores/__tests__/der-mac-strandet-nicht-auf-einem-werkzeug.test.tsindex a4ab77c2..1e27b12d 100644--- a/src/stores/__tests__/der-mac-strandet-nicht-auf-einem-werkzeug.test.ts+++ b/src/stores/__tests__/der-mac-strandet-nicht-auf-einem-werkzeug.test.ts@@ -29,7 +29,7 @@ import { useCreateStore, deriveIntent } from '../createStore'import { visibleIntents } from '../../components/create/experimental/intents'import type { CreateIntent } from '../createStore'-const sichtbar = () => new Set(visibleIntents('local', true).map((m) => m.id))+const sichtbar = () => new Set(visibleIntents('local', true, true).map((m) => m.id))const jetzt = () => deriveIntent(useCreateStore.getState())describe('der Mac strandet nicht auf einem Werkzeug, das er lokal nicht hat', () => {@@ -41,7 +41,7 @@ describe('der Mac strandet nicht auf einem Werkzeug, das er lokal nicht hat', ()it('drei Werkzeuge sind lokal auf dem Mac wirklich versteckt', () => {// Ohne diesen Fall koennte der Rest gruen sein, weil gar nichts versteckt// ist. Genau das waere die stille Fassung des Fehlers.- const alle = new Set(visibleIntents('cloud', true).map((m) => m.id))+ const alle = new Set(visibleIntents('cloud', true, true).map((m) => m.id))const fehlend = [...alle].filter((id) => !sichtbar().has(id))expect(fehlend.sort()).toEqual(['animate', 'edit', 'removebg'])})@@ -61,7 +61,7 @@ describe('der Mac strandet nicht auf einem Werkzeug, das er lokal nicht hat', ()useCreateStore.setState({ backend: 'cloud' })useCreateStore.getState().setIntent('removebg')useCreateStore.getState().setBackend('local')- const liste = visibleIntents('local', true)+ const liste = visibleIntents('local', true, true)expect(liste.findIndex((m) => m.id === jetzt())).toBeGreaterThan(-1)})diff --git a/src/stores/uiStore.ts b/src/stores/uiStore.tsindex 68e80545..70055b97 100644--- a/src/stores/uiStore.ts+++ b/src/stores/uiStore.ts@@ -112,6 +112,9 @@ interface UIState {cloudGateOpen: boolean/** CloudTeaserModal, null = closed. */cloudTeaser: CloudTeaserTarget | null+ /** The Cloud sheet's link has just switched the Cloud features off. Create+ * says once where they are switched back on. Never persisted. */+ cloudHiddenNotice: boolean/** The hosted model the user named on the way into cloud mode, by clicking* its row in the local-mode picker. Read once by the mode rule when the* flip lands, then cleared. Never persisted: it describes one click, not a@@ -144,6 +147,7 @@ interface UIState {setSidebarOpen: (open: boolean) => voidsetCloudGateOpen: (open: boolean) => voidsetCloudTeaser: (target: CloudTeaserTarget | null) => void+ setCloudHiddenNotice: (shown: boolean) => voidsetPendingCloudModel: (name: string | null) => voidsetSidebarWidth: (width: number, viewportWidth: number) => voidsetAgentPanelWidth: (width: number, viewportWidth: number) => void@@ -197,6 +201,7 @@ export const useUIStore = create<UIState>()(sidebarOpen: false,cloudGateOpen: false,cloudTeaser: null,+ cloudHiddenNotice: false,pendingCloudModel: null,sidebarWidth: SIDEBAR_DEFAULT_WIDTH,agentPanelWidth: AGENT_PANEL_DEFAULT_WIDTH,@@ -225,6 +230,7 @@ export const useUIStore = create<UIState>()(setSidebarOpen: (open) => set({ sidebarOpen: open }),setCloudGateOpen: (open) => set({ cloudGateOpen: open }),setCloudTeaser: (target) => set({ cloudTeaser: target }),+ setCloudHiddenNotice: (shown) => set({ cloudHiddenNotice: shown }),setPendingCloudModel: (name) => set({ pendingCloudModel: name }),setSidebarWidth: (width, viewportWidth) =>set({ sidebarWidth: clampSidebarWidth(width, viewportWidth) }),