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(309): hide Neurons behind one switch for 3.0.9
purple82adf083d3e3
diff --git a/src/components/layout/AppShell.tsx b/src/components/layout/AppShell.tsxindex 73548758..9f9e8d61 100644--- a/src/components/layout/AppShell.tsx+++ b/src/components/layout/AppShell.tsx@@ -67,6 +67,7 @@ import { CreditsExhaustedModal } from './CreditsExhaustedModal'import { Titlebar } from './Titlebar'import { HfLinkInbox } from '../models/HfLinkInbox'import { useNeuronFollowsPersona } from '../../hooks/useNeuronFollowsPersona'+import { NEURONS_ENABLED } from '../../lib/features'// Aus der Komponente herausgezogen: `new Set(STORE_KEYS)` entstand bei jedem// Render neu und war damit die instabile Referenz, wegen der der Restore-Effekt@@ -1198,7 +1199,7 @@ export function AppShell() {{currentView === 'settings' && <LazyView load={loadSettingsPage} fallback={<SettingsSkeleton />} />}{currentView === 'create' && <LazyView load={loadCreateExperimental} fallback={<CreateSkeleton />} />}{currentView === 'voice' && <LazyView load={loadVoiceView} fallback={<VoiceSkeleton />} />}- {currentView === 'neuron' && <LazyView load={loadNeuronView} fallback={<BenchmarkSkeleton />} />}+ {currentView === 'neuron' && NEURONS_ENABLED && <LazyView load={loadNeuronView} fallback={<BenchmarkSkeleton />} />}</main></div></div>diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsxindex 4a098456..ccd48722 100644--- a/src/components/layout/Header.tsx+++ b/src/components/layout/Header.tsx@@ -21,6 +21,7 @@ import { checkModelCapability } from '../../api/ollama'import { closeDialog, isTopDialog, nextFocusIndex, openDialog } from '../ui/dialog-a11y'import { MONOGRAM, MONOGRAM_INVERT } from './brand'import type { View } from '../../stores/uiStore'+import { visibleView } from '../../lib/features'import { modelListIsStale, openaiEntriesAreStale } from '../../lib/model-list-staleness'/**@@ -242,6 +243,8 @@ export function Header() {/** Die sichtbaren Ziele in dieser Betriebsart. */const navTargets = NAV_TARGETS.filter((t) => !t.localOnly || settings.appMode !== 'cloud')+ // A view that is switched off (Neurons in 3.0.9, lib/features) has no tab.+ .filter((t) => t.view === null || visibleView(t.view) === t.view)const isNavActive = (t: NavTarget) =>t.view === null ? isComparing : currentView === t.view && !isComparingconst goto = (t: NavTarget) => {diff --git a/src/components/models/DiscoverModels.tsx b/src/components/models/DiscoverModels.tsxindex 0085d08b..e39f71ea 100644--- a/src/components/models/DiscoverModels.tsx+++ b/src/components/models/DiscoverModels.tsx@@ -62,6 +62,7 @@ import { ICON_SM } from '../ui/icon-size'import { CivitaiSearchPanel } from './CivitaiSearchPanel'import { ModelFileCheck, type FileCheckSubject } from './ModelFileCheck'import { bundleCheckTargets, chatModelCheckTargets, chatModelCheckable } from '../../lib/model-file-check'+import { NEURONS_ENABLED } from '../../lib/features'interface Props {category: ModelCategory@@ -978,7 +979,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0, oif (isActiveBuiltin && keepChatModel) {setInstallNotice(withFitNote(fitNote, noFolderOn? `${noFolderOn} reads no model folder LU knows, so ${model.name} is downloading to the LU Engine. Your chat stays on ${noFolderOn}; the model list shows it once it is done.`- : `${model.name} is downloading to the LU Engine. Your chat stays on its model; the Neuron tweaker and the model list show it once it is done.`))+ : `${model.name} is downloading to the LU Engine. Your chat stays on its model; ${NEURONS_ENABLED ? 'the Neuron tweaker and ' : ''}the model list show${NEURONS_ENABLED ? '' : 's'} it once it is done.`))} else if (isActiveBuiltin) {// Built-in engine: await the flat GGUF, then make it the active chat// model so the freshly-added model is chat-ready without a manual switch.@@ -1202,7 +1203,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0, oBack to {targetName(followTarget)}</button>) : (- <button className="lu-control" onClick={() => setTargetChoice('builtin')} data-testid="discover-target-builtin" title="The Neuron tweaker and the LU Engine only use files in the LU Engine. Your chat model stays as it is.">+ <button className="lu-control" onClick={() => setTargetChoice('builtin')} data-testid="discover-target-builtin" title={NEURONS_ENABLED ? 'The Neuron tweaker and the LU Engine only use files in the LU Engine. Your chat model stays as it is.' : 'The LU Engine only uses files in the LU Engine. Your chat model stays as it is.'}>Send to LU Engine instead</button>))}@@ -1395,7 +1396,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0, o{changed.length > 0 && (<div className="mt-5" data-testid="hf-results-changed"><p className="t-label text-gray-300 mb-0.5">Changed by others, not the original</p>- <p className={`t-micro ${HINWEIS_TEXT.ruhig} mb-2`}>Uncensored, merged or fine-tuned versions. Neuron sliders work best on the originals above.</p>+ <p className={`t-micro ${HINWEIS_TEXT.ruhig} mb-2`}>Uncensored, merged or fine-tuned versions.{NEURONS_ENABLED && ' Neuron sliders work best on the originals above.'}</p><div className="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-2.5">{tiles(changed)}</div>diff --git a/src/components/neuron/__tests__/neurons-for-beginners.test.tsx b/src/components/neuron/__tests__/neurons-for-beginners.test.tsxindex b8b8130d..815d0854 100644--- a/src/components/neuron/__tests__/neurons-for-beginners.test.tsx+++ b/src/components/neuron/__tests__/neurons-for-beginners.test.tsx@@ -143,12 +143,13 @@ describe('the introduction', () => {expect(screen.getByTestId('neuron-intro-step').textContent).toBe('Step 1 of 5')})- it('is in the command palette too', () => {+ // D13 (3.0.9): Neurons is hidden, so neither the view nor its introduction+ // is in the command palette; both come back with lib/features.+ it('is not in the command palette while Neurons is hidden', () => {const actions = buildCommands({ shortcuts: SHORTCUT_ACTIONS, keysFor: shortcutKeys, localViewsAvailable: true, setView: vi.fn(), openCompare: vi.fn(), toggleSidebar: vi.fn(), setActiveModel: vi.fn(), models: [], activeModel: null, quit: null })- const intro = actions.find((a) => a.id === 'neuron-intro')- expect(intro?.label).toBe('Neurons: how it works')- intro!.run()- expect(useNeuronIntroRequest.getState().open).toBe(true)+ expect(actions.find((a) => a.id === 'neuron-intro')).toBeUndefined()+ expect(actions.find((a) => a.id === 'view-neuron')).toBeUndefined()+ expect(useNeuronIntroRequest.getState().open).toBe(false)})it('stands still with reduced motion', () => {diff --git a/src/components/ui/command-actions.ts b/src/components/ui/command-actions.tsindex 751e25c1..c2b8c7f0 100644--- a/src/components/ui/command-actions.ts+++ b/src/components/ui/command-actions.ts@@ -15,6 +15,7 @@import type { ShortcutId } from '../../hooks/useKeyboardShortcuts'import type { View } from '../../stores/uiStore'import { useNeuronIntroRequest } from '../../stores/neuronIntroStore'+import { NEURONS_ENABLED } from '../../lib/features'// Das Blattmodul und nicht die Sammelstelle `api/providers`: diese Datei laeuft// im Test ohne DOM und soll dabei keine Provider-Klassen und keinen Store// mitziehen. `model-name.ts` ist reine Zeichenkettenarbeit ohne Laufzeit-Import.@@ -126,9 +127,11 @@ export function buildCommands(ctx: CommandContext): Command[] {if (ctx.localViewsAvailable) {out.push({ id: 'view-voice', label: 'Voice', group: GROUP_VIEW, run: () => ctx.setView('voice') })out.push({ id: 'view-benchmark', label: 'Benchmark', group: GROUP_VIEW, run: () => ctx.setView('benchmark') })- out.push({ id: 'view-neuron', label: 'Neuron tweaker', group: GROUP_VIEW, run: () => ctx.setView('neuron') })- // N2 (3.0.9): the Neurons introduction again, after its one showing.- out.push({ id: 'neuron-intro', label: 'Neurons: how it works', group: GROUP_VIEW, run: () => { ctx.setView('neuron'); useNeuronIntroRequest.getState().show() } })+ if (NEURONS_ENABLED) {+ out.push({ id: 'view-neuron', label: 'Neuron tweaker', group: GROUP_VIEW, run: () => ctx.setView('neuron') })+ // N2 (3.0.9): the Neurons introduction again, after its one showing.+ out.push({ id: 'neuron-intro', label: 'Neurons: how it works', group: GROUP_VIEW, run: () => { ctx.setView('neuron'); useNeuronIntroRequest.getState().show() } })+ }out.push({ id: 'view-models', label: 'Models', group: GROUP_VIEW, run: () => ctx.setView('models') })}out.push({ id: 'view-settings', label: 'Settings', group: GROUP_VIEW, run: () => ctx.setView('settings') })diff --git a/src/hooks/__tests__/neuron-follows-persona.test.ts b/src/hooks/__tests__/neuron-follows-persona.test.tsindex 1eb2043a..8f77ea44 100644--- a/src/hooks/__tests__/neuron-follows-persona.test.ts+++ b/src/hooks/__tests__/neuron-follows-persona.test.ts@@ -73,7 +73,9 @@ describe('which persona steers', () => {expect(steeringPersona({ personaId: 'pirate', personaEnabled: true, groupModels: ['a', 'b'] }, [PIRATE], 'pirate', true)).toEqual({ id: null, group: true })})- it('restarts the engine when the user opens a chat that speaks as a persona with own sliders', async () => {+ // D13 (3.0.9): with Neurons hidden (lib/features) a persona's sliders must+ // not steer the engine unseen, so switching to it restarts nothing.+ it('leaves the engine alone when the user opens a chat that speaks as a persona with own sliders', async () => {useSettingsStore.setState((s) => ({ personas: [PIRATE, CODER], activePersonaId: 'coder', settings: { ...s.settings, personasEnabled: true } }))useChatStore.setState({conversations: [@@ -84,8 +86,8 @@ describe('which persona steers', () => {})const { unmount } = renderHook(() => useNeuronFollowsPersona())useChatStore.setState({ activeConversationId: 'b' })- await vi.waitFor(() => expect(apply).toHaveBeenCalled())- expect(apply.mock.calls[0][1]).toEqual([{ id: 'casual', strength: 0.8 }])+ await new Promise((r) => setTimeout(r, 50))+ expect(apply).not.toHaveBeenCalled()unmount()})})diff --git a/src/hooks/useNeuronFollowsPersona.ts b/src/hooks/useNeuronFollowsPersona.tsindex 1762318d..85fedd97 100644--- a/src/hooks/useNeuronFollowsPersona.ts+++ b/src/hooks/useNeuronFollowsPersona.ts@@ -4,6 +4,7 @@ import { neuronApply, neuronInfo } from '../api/neuron'import { entriesFor, effectiveStrengths, hasPersonaProfile, steeringPersona } from '../lib/neuron'import { useChatStore } from '../stores/chatStore'import { useNeuronStore } from '../stores/neuronStore'+import { NEURONS_ENABLED } from '../lib/features'import { useSettingsStore } from '../stores/settingsStore'/**@@ -36,6 +37,8 @@ export function currentSteeringPersona(): { id: string | null; group: boolean }export function useNeuronFollowsPersona(): void {useEffect(() => {+ // With Neurons hidden (lib/features) no slider may steer the engine unseen.+ if (!NEURONS_ENABLED) returnlet prev = currentSteeringPersona().idconst check = () => {const next = currentSteeringPersona().iddiff --git a/src/lib/__tests__/neurons-hidden-309.test.ts b/src/lib/__tests__/neurons-hidden-309.test.tsnew file mode 100644index 00000000..b5772add--- /dev/null+++ b/src/lib/__tests__/neurons-hidden-309.test.ts@@ -0,0 +1,71 @@+// D13 (David, 04.11.2026): Neurons is hidden in 3.0.9, not removed. One+// switch (lib/features) closes every way in; these tests hold the switch and+// each entry it closes, so 3.1.0 turns it back on in one place.+import { describe, it, expect, vi, beforeEach } from 'vitest'+import { readFileSync } from 'node:fs'+import { resolve } from 'node:path'+import { NEURONS_ENABLED, visibleView } from '../features'+import { useUIStore } from '../../stores/uiStore'+import { buildCommands } from '../../components/ui/command-actions'+import { SHORTCUT_ACTIONS, shortcutKeys } from '../../hooks/useKeyboardShortcuts'+import { RELEASE_NOTES } from '../release-notes'+import { HOWTO } from '../howto'++const SRC = resolve(__dirname, '../..')+const read = (p: string) => readFileSync(resolve(SRC, p), 'utf-8')++describe('Neurons is hidden in 3.0.9', () => {+ beforeEach(() => useUIStore.setState({ currentView: 'chat' }))++ it('the switch is off', () => {+ expect(NEURONS_ENABLED).toBe(false)+ })++ it('a hidden view falls back to Chat, the others stay', () => {+ expect(visibleView('neuron')).toBe('chat')+ for (const v of ['chat', 'models', 'settings', 'create', 'benchmark', 'voice'] as const) expect(visibleView(v)).toBe(v)+ })++ it('a button or link that still asks for Neurons lands on Chat', () => {+ useUIStore.getState().setView('models')+ useUIStore.getState().setView('neuron')+ expect(useUIStore.getState().currentView).toBe('chat')+ })++ it('a saved UI state with "neuron" comes back as Chat', () => {+ const merge = useUIStore.persist.getOptions().merge!+ const merged = merge({ currentView: 'neuron', sidebarOpen: false }, useUIStore.getState()) as ReturnType<typeof useUIStore.getState>+ expect(merged.currentView).toBe('chat')+ expect(merged.sidebarOpen).toBe(false)+ })++ it('the header has no Neurons tab', () => {+ const header = read('components/layout/Header.tsx')+ expect(header).toMatch(/\.filter\(\(t\) => t\.view === null \|\| visibleView\(t\.view\) === t\.view\)/)+ })++ it('the command palette has neither the view nor the introduction', () => {+ const actions = buildCommands({ shortcuts: SHORTCUT_ACTIONS, keysFor: shortcutKeys, localViewsAvailable: true, setView: vi.fn(), openCompare: vi.fn(), toggleSidebar: vi.fn(), setActiveModel: vi.fn(), models: [], activeModel: null, quit: null })+ expect(actions.filter((a) => /neuron/i.test(a.id + a.label))).toEqual([])+ expect(actions.find((a) => a.id === 'view-models')).toBeDefined()+ })++ it('the app never mounts the Neurons view', () => {+ expect(read('components/layout/AppShell.tsx')).toContain("currentView === 'neuron' && NEURONS_ENABLED && <LazyView")+ })++ it('the 3.0.9 release notes and the how-to lines do not name Neurons', () => {+ const note = RELEASE_NOTES.find((n) => n.version === '3.0.9')!+ expect(JSON.stringify(note)).not.toMatch(/neuron/i)+ expect(JSON.stringify(HOWTO['gguf-file'])).not.toMatch(/neuron/i)+ })++ it('Models and Discover name no Neuron tweaker while it is off', () => {+ const discover = read('components/models/DiscoverModels.tsx')+ for (const m of discover.matchAll(/Neuron (tweaker|sliders)/g)) {+ const line = discover.slice(discover.lastIndexOf('\n', m.index!), discover.indexOf('\n', m.index!))+ if (line.trim().startsWith('//') || line.trim().startsWith('*')) continue+ expect(line).toContain('NEURONS_ENABLED')+ }+ })+})diff --git a/src/lib/features.ts b/src/lib/features.tsnew file mode 100644index 00000000..b80aefa8--- /dev/null+++ b/src/lib/features.ts@@ -0,0 +1,16 @@+import type { View } from '../stores/uiStore'++/**+ * Neurons (the Neuron tweaker, P11) is hidden in 3.0.9 (David, 04.11.2026):+ * the tool gets reworked for 3.1.0. This one switch hides every way in+ * (header tab, command palette, hints in Models and Discover, how-to lines,+ * release notes, the introduction) and keeps persona sliders from steering+ * the engine unseen. Backend, engine and saved sliders stay as they are.+ */+export const NEURONS_ENABLED = false++/** The view to show for `view`: a hidden view falls back to Chat, so a+ * stale button, link or saved state never lands on a page that is off. */+export function visibleView(view: View): View {+ return view === 'neuron' && !NEURONS_ENABLED ? 'chat' : view+}diff --git a/src/lib/howto.ts b/src/lib/howto.tsindex 8e8fc3d7..943fd0b0 100644--- a/src/lib/howto.ts+++ b/src/lib/howto.ts@@ -4,6 +4,8 @@// writes, so a line and its `from` second always belong to the film they were// recorded with. Cloud mode only: every line states what the cloud tabs do.+import { NEURONS_ENABLED } from './features'+export interface HowtoStep {/** Second of the film from which this line is shown. */from: number@@ -241,7 +243,9 @@ export const HOWTO: Record<string, HowtoTopic> = {'gguf-file': one('How to add a GGUF file', 'gguf-file', [{ from: 0, text: 'Press GGUF file and pick a .gguf chat model on your drive.' },{ from: 3, text: 'LU links it into the LU Engine folder, without a copy. File and folder must be on one drive.' },- { from: 6, text: 'It shows up in Neurons and under Models, Installed, where Use starts a chat with it.' },+ { from: 6, text: NEURONS_ENABLED+ ? 'It shows up in Neurons and under Models, Installed, where Use starts a chat with it.'+ : 'It shows up under Models, Installed, where Use starts a chat with it.' },], '/guide/storage/'),remote: one('How remote access works', 'remote', [{ from: 0, text: 'Remote access starts in the Remote tab of the sidebar.' },diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.tsindex 77115b05..5483aa4c 100644--- a/src/lib/release-notes.ts+++ b/src/lib/release-notes.ts@@ -15,6 +15,7 @@*/import { CLOUD_PITCH, CLOUD_REFUSAL_LINE, CLOUD_SUBSCRIBER_LINE, cloudSalesLines } from './cloud-pitch'+import { NEURONS_ENABLED } from './features'/*** The two model numbers the 3.0.0 sheet quotes, in one place and read, never@@ -136,16 +137,19 @@ export const RELEASE_NOTES: ReleaseNote[] = [// oder auf einer Karte lief, sagt die Zeile selbst knapp.{version: '3.0.9',- headline: 'Group chats send every speaker the context you picked, Neurons puts sliders on a local model, Animate takes an end image, and Create takes reference pictures.',+ headline: NEURONS_ENABLED+ ? 'Group chats send every speaker the context you picked, Neurons puts sliders on a local model, Animate takes an end image, and Create takes reference pictures.'+ : 'Group chats send every speaker the context you picked, Animate takes an end image, and Create takes reference pictures.',lines: [{title: 'Group chat: every speaker gets the context you picked.',detail: 'Local speakers get their chosen window minus room for the answer, no longer about half of it, and a grey line names messages that were not sent. One speaker can be regenerated on its own, and the speaking order can be changed with arrows or by dragging (GitHub #199, #200, #201).',},- {+ // Neurons is off in 3.0.9 (lib/features); the line comes back with it.+ ...(NEURONS_ENABLED ? [{title: 'Neurons: sliders that steer a local LU Engine model.',detail: 'Ready made sliders such as Serious to Cheerful or Fewer refusals, sliders from your own examples, and a before and after on the same question. LU measures how far each slider can push on your model; for small models that takes under a minute, and before a longer run Neurons says how long it will take and shows its progress. Ollama and LM Studio cannot take these sliders.',- },+ }] : []),{title: 'End images and reference pictures in Animate and Create.',detail: 'Animate takes an end image for Wan 2.2 A14B, Wan 2.1 FLF2V and MiniMax H3, and up to nine reference pictures with MiniMax H3. Create takes reference pictures for Krea 2, Qwen-Image 2.1 and FLUX.2. A video shows a preview while it renders. The local end image and the preview ran on an RTX 3060; the reference pictures ran in automated tests only.',diff --git a/src/stores/uiStore.ts b/src/stores/uiStore.tsindex 87654e86..89abaeff 100644--- a/src/stores/uiStore.ts+++ b/src/stores/uiStore.ts@@ -2,6 +2,7 @@ import { create } from 'zustand'import { persist } from 'zustand/middleware'import { safeJSONStorage } from '../lib/storage-quota'import type { SettingsTab } from '../lib/settings-reset'+import { visibleView } from '../lib/features'export type View = 'chat' | 'models' | 'settings' | 'create' | 'benchmark' | 'voice' | 'neuron'@@ -333,7 +334,8 @@ export const useUIStore = create<UIState>()(// Settings, which is exactly what the web parity round removes.// A plain setView is somebody navigating by hand, so it drops any focus// a previous deep link left behind rather than firing it late.- setView: (view) => set({ currentView: view, settingsFocus: null }),+ // A view that is switched off (Neurons in 3.0.9) lands on Chat.+ setView: (view) => set({ currentView: visibleView(view), settingsFocus: null }),openSettingsAt: (focus) =>set({ currentView: 'settings', settingsFocus: focus }),@@ -370,6 +372,12 @@ export const useUIStore = create<UIState>()(storage: safeJSONStorage(),version: 1,migrate: migriereUiZustand,+ // currentView is not written (partialize), but a blob from an older+ // build may still carry one; a view that is off must not come back.+ merge: (persisted, current) => {+ const merged = { ...current, ...(persisted as Partial<UIState>) }+ return { ...merged, currentView: visibleView(merged.currentView) }+ },// What survives a restart is a stated PREFERENCE, never a leftover of// one session. currentView and cloudGateOpen stay out: the app would// otherwise reopen on whatever tab was left behind, or come up with the