Skip to content

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

fix(mac): hide Remove-Background on local Mac (no ComfyUI RMBG node)

purple9f86092d6af0
diff --git a/src/components/create/experimental/IntentBar.tsx b/src/components/create/experimental/IntentBar.tsx
index 4e1576c3..7cc0962d 100644
--- a/src/components/create/experimental/IntentBar.tsx
+++ b/src/components/create/experimental/IntentBar.tsx
@@ -1,5 +1,6 @@
import { useCreateStore } from '../../../stores/createStore'
-import { INTENTS } from './intents'
+import { visibleIntents } from './intents'
+import { isMlxImageHost } from '../../../api/mlx-image'
import { cn } from '../ui/cn'
// Pure-CSS expand: no Framer layout projection anywhere, so nothing can snap or
@@ -13,10 +14,10 @@ export function IntentBar() {
const intent = useCreateStore((s) => s.intent())
const setIntent = useCreateStore((s) => s.setIntent)
const backend = useCreateStore((s) => s.backend)
- // Utility intents (upscale/eraser) are hosted-only endpoints — hide them on
- // the local backend. setIntent's base already clears a stale utilityOp when
- // the mode flips back and the user picks any normal intent.
- const intents = INTENTS.filter((m) => !m.cloudOnly || backend === 'cloud')
+ // setIntent's base already clears a stale utilityOp when the mode flips back
+ // and the user picks any normal intent. Filtering (hosted-only ops + Mac's
+ // missing RMBG node) lives in visibleIntents so it stays unit-tested.
+ const intents = visibleIntents(backend, isMlxImageHost())
return (
<div
diff --git a/src/components/create/experimental/__tests__/intents.test.ts b/src/components/create/experimental/__tests__/intents.test.ts
index 7a05adf4..be7b5e1b 100644
--- a/src/components/create/experimental/__tests__/intents.test.ts
+++ b/src/components/create/experimental/__tests__/intents.test.ts
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
-import { INTENTS, INTENT_MAP } from '../intents'
+import { INTENT_MAP, visibleIntents } from '../intents'
// David 2026-07-10: the advanced ops have no local models — they exist only on
// the cloud backend. Only plain generation and removebg (local RMBG node,
@@ -17,8 +17,20 @@ describe('intent cloud gating', () => {
}
})
- it('the local IntentBar filter keeps exactly the local lane', () => {
- const local = INTENTS.filter((m) => !m.cloudOnly).map((m) => m.id)
+ it('the local (non-Mac) IntentBar filter keeps exactly the local lane', () => {
+ const local = visibleIntents('local', false).map((m) => m.id)
expect(local).toEqual(['image', 'removebg', 'video'])
})
+
+ it('the local Mac filter drops removebg (no ComfyUI RMBG node there)', () => {
+ // MLX-only Mac has no ComfyUI, so RMBG can't run locally — only plain image
+ // and video generation remain on the local Mac lane.
+ const localMac = visibleIntents('local', true).map((m) => m.id)
+ expect(localMac).toEqual(['image', 'video'])
+ })
+
+ it('cloud keeps every intent regardless of host', () => {
+ const cloud = visibleIntents('cloud', true).map((m) => m.id)
+ expect(cloud).toEqual(['image', 'edit', 'removebg', 'upscale', 'eraser', 'video', 'animate'])
+ })
})
diff --git a/src/components/create/experimental/intents.ts b/src/components/create/experimental/intents.ts
index 4d6f8346..661a33ed 100644
--- a/src/components/create/experimental/intents.ts
+++ b/src/components/create/experimental/intents.ts
@@ -75,3 +75,19 @@ export const INTENTS: IntentMeta[] = [
export const INTENT_MAP: Record<CreateIntent, IntentMeta> =
Object.fromEntries(INTENTS.map((i) => [i.id, i])) as Record<CreateIntent, IntentMeta>
+
+/**
+ * The intents to surface for a given backend + host. Utility intents
+ * (edit/upscale/eraser/animate) are hosted-only endpoints. Remove-Background
+ * runs through the ComfyUI RMBG node, which never exists on the Mac (MLX-only,
+ * no ComfyUI) — so on the local Mac it is hidden too, otherwise it's a dead
+ * affordance that only errors on submit. Cloud and non-Mac local keep it.
+ */
+export function visibleIntents(backend: 'local' | 'cloud', mlxHost: boolean): IntentMeta[] {
+ const localMac = backend !== 'cloud' && mlxHost
+ return INTENTS.filter((m) => {
+ if (m.cloudOnly && backend !== 'cloud') return false
+ if (m.capability === 'rmbg' && localMac) return false
+ return true
+ })
+}