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(plugins): every plugin gets the Neurons switch, plus the 3.1.0 Neurons hint
purplee6e08fa3f0dd
diff --git a/src/components/chat/NeuronPluginRow.tsx b/src/components/chat/NeuronPluginRow.tsxindex 4c06f0b3..68c1af4e 100644--- a/src/components/chat/NeuronPluginRow.tsx+++ b/src/components/chat/NeuronPluginRow.tsx@@ -9,6 +9,8 @@ import { AudioLines, PanelRightOpen } from 'lucide-react'import { useSettingsStore } from '../../stores/settingsStore'import { useNeuronWindow } from '../../stores/neuronWindowStore'import { HINWEIS_TEXT } from '../../lib/hinweis'+import { NEURONS_HINT_LABEL, useNeuronsHint } from '../../lib/neurons-hint'+import { HintDot, PluginRow } from './PluginRow'/** Why the switch is grey in Cloud mode. */export const NEURONS_CLOUD_REASON = 'Cloud models take no sliders. Neurons steers models the LU Engine runs on this computer.'@@ -16,66 +18,47 @@ export const NEURONS_CLOUD_REASON = 'Cloud models take no sliders. Neurons steer/** The line under the switch while Neurons is on. */export const NEURONS_ON_LINE = 'Your sliders steer the LU Engine model in Chat, Code and Agent. Tools work as before.'-export function NeuronPluginRow({ onOpenWindow }: { onOpenWindow?: () => void }) {+export function NeuronPluginRow({ onOpenWindow, hint = false }: { onOpenWindow?: () => void; hint?: boolean }) {const enabled = useSettingsStore((s) => s.settings.neuronsPluginEnabled === true)const cloud = useSettingsStore((s) => s.settings.appMode === 'cloud')const updateSettings = useSettingsStore((s) => s.updateSettings)const show = useNeuronWindow((s) => s.show)const hide = useNeuronWindow((s) => s.hide)+ const noteNeuronsOn = useNeuronsHint((s) => s.noteNeuronsOn)const available = !cloudconst on = enabled && availableconst open = () => { show(); onOpenWindow?.() }return (- <div className="px-2.5" data-testid="plugins-neurons">- <div className="w-full flex items-center justify-between py-1.5 gap-2">- <div className="flex items-center gap-1.5 min-w-0">- <AudioLines size={10} className={`shrink-0 ${on ? 'text-sky-400' : 'text-gray-400'}`} />- <span className="shrink-0 t-micro font-medium text-gray-600 dark:text-gray-300">Neurons</span>- <span className="t-micro text-gray-400 truncate">steer your local model</span>- </div>+ <PluginRow+ testId="plugins-neurons"+ icon={AudioLines}+ onColor="text-sky-400"+ name="Neurons"+ line="steer your local model"+ hint={hint ? <HintDot testId="plugins-neurons-hint" label={NEURONS_HINT_LABEL} /> : null}+ on={on}+ available={available}+ reason={NEURONS_CLOUD_REASON}+ onToggle={() => {+ updateSettings({ neuronsPluginEnabled: !enabled })+ if (enabled) hide()+ else { noteNeuronsOn(); open() }+ }}+ switchLabel="Neurons"+ switchTestId="plugins-neurons-switch"+ switchTitle={on ? 'Turn off Neurons: the engine runs without sliders' : 'Neurons: turn traits of your local model up or down'}+ >+ <div className="flex items-start justify-between gap-2">+ <span data-testid="plugins-neurons-line" className={`t-micro leading-snug ${HINWEIS_TEXT.ruhig}`}>{NEURONS_ON_LINE}</span><button- onClick={(e) => {- e.stopPropagation()- if (!available) return- updateSettings({ neuronsPluginEnabled: !enabled })- if (enabled) hide()- else open()- }}- disabled={!available}- aria-pressed={on}- aria-label="Neurons"- data-testid="plugins-neurons-switch"- title={!available ? NEURONS_CLOUD_REASON : on ? 'Turn off Neurons: the engine runs without sliders' : 'Neurons: turn traits of your local model up or down'}- className={- 'shrink-0 flex items-center w-7 h-3.5 rounded-full transition-colors '- + (!available- ? 'bg-gray-300/20 dark:bg-white/5 cursor-default justify-start'- : on- ? 'bg-sky-500/40 hover:bg-sky-500/55 justify-end'- : 'bg-gray-300/30 dark:bg-white/10 hover:bg-gray-300/45 dark:hover:bg-white/15 justify-start')- }+ type="button"+ onClick={(e) => { e.stopPropagation(); open() }}+ data-testid="plugins-neurons-open"+ className="shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded t-micro text-sky-600 dark:text-sky-400 hover:bg-sky-500/10">- <span className={`w-3 h-3 rounded-full shadow-sm mx-px ${available ? 'bg-white' : 'bg-white/40'}`} />+ <PanelRightOpen size={9} /> Open</button></div>- {!available && (- <div data-testid="plugins-neurons-reason" className={`pb-1.5 t-micro leading-snug ${HINWEIS_TEXT.ruhig}`}>- {NEURONS_CLOUD_REASON}- </div>- )}- {on && (- <div className="pb-1.5 flex items-start justify-between gap-2">- <span data-testid="plugins-neurons-line" className={`t-micro leading-snug ${HINWEIS_TEXT.ruhig}`}>{NEURONS_ON_LINE}</span>- <button- type="button"- onClick={(e) => { e.stopPropagation(); open() }}- data-testid="plugins-neurons-open"- className="shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded t-micro text-sky-600 dark:text-sky-400 hover:bg-sky-500/10"- >- <PanelRightOpen size={9} /> Open- </button>- </div>- )}- </div>+ </PluginRow>)}diff --git a/src/components/chat/PluginRow.tsx b/src/components/chat/PluginRow.tsxnew file mode 100644index 00000000..2f1a0527--- /dev/null+++ b/src/components/chat/PluginRow.tsx@@ -0,0 +1,131 @@+// One row of the Plugins menu (3.1.0, David 16.11.2026: "jedes Plugin+// bekommt den Lichtschalter wie Neurons"). Every plugin looks the same: its+// icon, its name and a short line, the switch at the far right. Off closes+// the row; on opens what the plugin has to set right under it. Rows are+// parted by hairlines from the menu (PluginsDropdown), never boxed.++import type { ReactNode } from 'react'+import type { LucideIcon } from 'lucide-react'+import { HINWEIS_TEXT } from '../../lib/hinweis'++/** The switch at the right end of every plugin row. One look for all. */+export function PluginSwitch({+ on,+ available = true,+ onToggle,+ label,+ title,+ testId,+}: {+ on: boolean+ available?: boolean+ onToggle: () => void+ label: string+ title?: string+ testId?: string+}) {+ return (+ <button+ type="button"+ onClick={(e) => { e.stopPropagation(); if (available) onToggle() }}+ disabled={!available}+ aria-pressed={on}+ aria-label={label}+ data-testid={testId}+ title={title}+ className={+ 'shrink-0 flex items-center w-7 h-3.5 rounded-full transition-colors '+ + (!available+ ? 'bg-gray-300/20 dark:bg-white/5 cursor-default justify-start'+ : on+ ? 'bg-sky-500/40 hover:bg-sky-500/55 justify-end'+ : 'bg-gray-300/30 dark:bg-white/10 hover:bg-gray-300/45 dark:hover:bg-white/15 justify-start')+ }+ >+ <span className={`w-3 h-3 rounded-full shadow-sm mx-px ${available ? 'bg-white' : 'bg-white/40'}`} />+ </button>+ )+}++/** The small calm dot that points at something new (no pulse, no number). */+export function HintDot({ testId, label }: { testId: string; label: string }) {+ return (+ <span+ data-testid={testId}+ aria-hidden="true"+ title={label}+ className="inline-block shrink-0 w-1.5 h-1.5 rounded-full bg-sky-400"+ />+ )+}++export function PluginRow({+ testId,+ icon: Icon,+ onColor,+ name,+ mark,+ line,+ on,+ available = true,+ reason,+ onToggle,+ switchLabel,+ switchTitle,+ switchTestId,+ hint,+ children,+}: {+ testId: string+ icon: LucideIcon+ /** Text colour of the icon while on, the plugin's colour in the trigger. */+ onColor: string+ name: string+ /** A mark after the name (Beta). */+ mark?: ReactNode+ /** The short grey line after the name. */+ line?: ReactNode+ on: boolean+ available?: boolean+ /** Why the switch is grey; shown under the row while it is. */+ reason?: string+ onToggle: () => void+ switchLabel: string+ switchTitle?: string+ switchTestId?: string+ /** A hint dot after the name. */+ hint?: ReactNode+ /** What opens under the row while the plugin is on. */+ children?: ReactNode+}) {+ return (+ <div className="px-2.5" data-testid={testId} data-on={on || undefined}>+ <div className="w-full flex items-center justify-between py-1.5 gap-2">+ <div className="flex items-center gap-1.5 min-w-0">+ <Icon size={10} className={`shrink-0 ${on ? onColor : 'text-gray-400'}`} />+ <span className="shrink-0 t-micro font-medium text-gray-600 dark:text-gray-300">{name}</span>+ {mark}+ {hint}+ {line != null && <span className="t-micro text-gray-400 truncate">{line}</span>}+ </div>+ <PluginSwitch+ on={on}+ available={available}+ onToggle={onToggle}+ label={switchLabel}+ title={!available ? reason : switchTitle}+ testId={switchTestId}+ />+ </div>+ {!available && reason && (+ // A reason, not an error: the calm grey of lib/hinweis.ts.+ <div data-testid={`${testId}-reason`} className={`pb-1.5 t-micro leading-snug ${HINWEIS_TEXT.ruhig}`}>+ {reason}+ </div>+ )}+ {on && available && children != null && (+ <div data-testid={`${testId}-body`} className="pb-1.5">{children}</div>+ )}+ </div>+ )+}diff --git a/src/components/chat/PluginsDropdown.tsx b/src/components/chat/PluginsDropdown.tsxindex d4da09ad..f87ca551 100644--- a/src/components/chat/PluginsDropdown.tsx+++ b/src/components/chat/PluginsDropdown.tsx@@ -2,6 +2,8 @@ import { lazy, Suspense, useRef, useState } from 'react'import { usePopoverPlatz } from '../../hooks/usePopoverPlatz'import { useDismissOnEscape } from '../../hooks/useDismissOnEscape'import { Plug, ChevronDown, ChevronUp, Bone, User, Users, Sparkles, X, GripVertical } from 'lucide-react'+import { PluginRow } from './PluginRow'+import { NEURONS_HINT_LABEL, neuronsHintDots, useNeuronsHint } from '../../lib/neurons-hint'import { useSettingsStore } from '../../stores/settingsStore'import { useChatStore } from '../../stores/chatStore'import { useModelStore } from '../../stores/modelStore'@@ -10,7 +12,6 @@ import { moveMember } from '../../lib/group-rounds'import { resolveChatPersona } from '../../lib/chat-persona'import type { CavemanMode } from '../../types/settings'import { displayModelName } from '../../api/providers/registry'-import { HINWEIS_TEXT } from '../../lib/hinweis'import { BetaMark } from '../ui/BetaMark'import { isTauri } from '../../api/backend'import { createChatLive, createInChatOf, createSupport, servedWindowOf } from '../../lib/create/chat-switch'@@ -29,8 +30,20 @@ export const CREATE_GROUP_REASON = 'Not available in a group chat.'// and texts stay out of every bundle a browser opens.const ReaPluginRow = lazy(() => import('./ReaPluginRow').then((m) => ({ default: m.ReaPluginRow })))-const CAVEMAN_MODES: { value: CavemanMode; label: string; desc: string }[] = [- { value: 'off', label: 'Off', desc: 'Normal responses' },+/** A persona switch without an open chat has nothing to hold its state. */+export const PERSONA_NO_CHAT_REASON = 'Open a chat first, the persona lives on the conversation.'+/** Group chat without an open chat, the same. */+export const GROUP_NO_CHAT_REASON = 'Open a chat first, the group lives on the conversation.'++type CavemanLevel = Exclude<CavemanMode, 'off'>++/** The level the Caveman switch turns on: the last one picked, else Lite. */+export function cavemanLevelOf(mode: CavemanMode | undefined, saved: unknown): CavemanLevel {+ if (mode === 'lite' || mode === 'full' || mode === 'ultra') return mode+ return saved === 'full' || saved === 'ultra' || saved === 'lite' ? saved : 'lite'+}++const CAVEMAN_MODES: { value: CavemanLevel; label: string; desc: string }[] = [{ value: 'lite', label: 'Lite', desc: 'Slightly shorter' },{ value: 'full', label: 'Full', desc: 'Very terse' },{ value: 'ultra', label: 'Ultra', desc: 'Maximum brevity' },@@ -55,12 +68,21 @@ export function PluginsDropdown({agentTools = false,}: { openUpward?: boolean; iconOnly?: boolean; agentTools?: boolean } = {}) {const [open, setOpen] = useState(false)- useDismissOnEscape(open, () => setOpen(false))+ // Group chat on with nobody picked yet: the switch is on, the list open,+ // and the conversation is not a group until a model is ticked. Closing the+ // menu without a pick turns it off again.+ const [groupArmed, setGroupArmed] = useState(false)+ const noteMenuOpened = useNeuronsHint((s) => s.noteMenuOpened)+ // Opening counts for the Neurons hint; an armed group without a pick does+ // not outlive the menu.+ const setMenuOpen = (next: boolean) => {+ setOpen(next)+ if (next) noteMenuOpened()+ else setGroupArmed(false)+ }+ useDismissOnEscape(open, () => setMenuOpen(false))const menuRef = useRef<HTMLDivElement>(null)const menu = usePopoverPlatz(menuRef, open, { bevorzugt: openUpward ? 'oben' : 'unten' })- const [cavemanOpen, setCavemanOpen] = useState(false)- const [personaOpen, setPersonaOpen] = useState(false)- const [groupOpen, setGroupOpen] = useState(false)// Which participant's persona list is open, by model name.const [personaFor, setPersonaFor] = useState<string | null>(null)// GH #200: the member being dragged in the speaking order, by index.@@ -69,6 +91,7 @@ export function PluginsDropdown({const activePersonaId = useSettingsStore((s) => s.activePersonaId)const allPersonas = useSettingsStore((s) => s.personas)const cavemanMode = useSettingsStore((s) => s.settings.cavemanMode)+ const cavemanSaved = useSettingsStore((s) => s.settings.cavemanLevel)const updateSettings = useSettingsStore((s) => s.updateSettings)// Create in chat: its own switch, global, remembered, off by default. Only// in Cloud mode, and only for an account the server has released; without@@ -135,7 +158,9 @@ export function PluginsDropdown({const isCavemanActive = cavemanMode && cavemanMode !== 'off'const isPersonaActive = personaEnabledOnChat &&(activePersona ? activePersona.id !== 'unrestricted' : chatPersona.prompt.trim() !== '')- const currentCaveman = CAVEMAN_MODES.find((m) => m.value === (cavemanMode || 'off'))+ const cavemanLevel = cavemanLevelOf(cavemanMode, cavemanSaved)+ const currentCaveman = CAVEMAN_MODES.find((m) => m.value === cavemanLevel)+ const groupOn = groupModels.length > 0 || groupArmed// REA (lib/plugins/rea.ts): a local process, so the desktop app only, and// only where its tools go: Agent and Code.@@ -147,11 +172,19 @@ export function PluginsDropdown({const neuronsOn = useSettingsStore((s) => s.settings.neuronsPluginEnabled === true && s.settings.appMode !== 'cloud') && neuronsShownconst anyPluginActive = !!(isCavemanActive || isPersonaActive || isGroupActive || createOn || reaOn || neuronsOn)+ // The Neurons hint of 3.1.0 (lib/neurons-hint.ts, remove in 3.1.1).+ const neuronsAvailable = useSettingsStore((s) => s.settings.appMode !== 'cloud') && neuronsShown+ const hintState = useNeuronsHint()+ const hint = neuronsHintDots(hintState, neuronsAvailable, neuronsOn)+ const triggerDot = hint.trigger+ ? <span data-testid="plugins-hint" aria-hidden="true" title={NEURONS_HINT_LABEL} className="absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-sky-400 pointer-events-none" />+ : null+return (<div className="relative">{iconOnly ? (<button- onClick={() => setOpen(!open)}+ onClick={() => setMenuOpen(!open)}title={anyPluginActive ? 'Plugins (active)' : 'Plugins'}aria-label="Plugins"data-testid="plugins-trigger-icon"@@ -164,17 +197,19 @@ export function PluginsDropdown({// `data-active`, weil „ein Plugin laeuft" kein Auf-/Zu-Zustand// des Menues ist und deshalb nicht in `aria-expanded` gehoert.data-active={anyPluginActive || undefined}- className="lu-control lu-control--icon"+ className="lu-control lu-control--icon relative"><Plug size={11} />+ {triggerDot}</button>) : (<button- onClick={() => setOpen(!open)}+ onClick={() => setMenuOpen(!open)}aria-expanded={open}data-active={anyPluginActive || undefined}- className="lu-control"+ className="lu-control relative">+ {triggerDot}<Plug size={10} /><span className="@max-[26rem]:sr-only">Plugins</span>{anyPluginActive && (@@ -197,197 +232,153 @@ export function PluginsDropdown({{open && (<>- <div className="fixed inset-0 z-40" onClick={() => setOpen(false)} />+ <div className="fixed inset-0 z-40" onClick={() => setMenuOpen(false)} /><div ref={menuRef} style={menu.style} className={`absolute right-0 z-50 w-56 rounded-lg lu-elevated py-1.5 overflow-y-auto scrollbar-thin ${menu.nachOben ? 'bottom-full mb-1' : 'top-full mt-1'}`}>{/* Chat Tools are always on since 3.0.7 (lib/chat-tools-reach.ts):- no switch here any more. */}- <div className="px-2.5">- {/* ── Create toggle ───────────────────────────── */}- {create.shown && (- <>- <div className="w-full flex items-center justify-between py-1.5 gap-2">- <div className="flex items-center gap-1.5 min-w-0">- <Sparkles size={10} className={`shrink-0 ${createOn ? 'text-lu-accent' : 'text-gray-400'}`} />- <span className="shrink-0 t-micro font-medium text-gray-600 dark:text-gray-300">Create</span>- <BetaMark feature="create-in-chat" />- <span className="t-micro text-gray-400 truncate">image · video · music · voice</span>- </div>- <button- onClick={(e) => { e.stopPropagation(); if (create.available) updateSettings({ createEnabled: !createSetting }) }}- disabled={!create.available}- aria-pressed={createOn}- aria-label="Create"- data-testid="plugins-create-switch"- title={!create.available ? create.reason : createOn ? 'Turn off Create in chat' : 'Images, video, music and voice in chat'}- className={- 'shrink-0 flex items-center w-7 h-3.5 rounded-full transition-colors ' +- (!create.available- ? 'bg-gray-300/20 dark:bg-white/5 cursor-default justify-start'- : createOn- ? 'bg-lu-accent/45 hover:bg-lu-accent/60 justify-end'- : 'bg-gray-300/30 dark:bg-white/10 hover:bg-gray-300/45 dark:hover:bg-white/15 justify-start')- }- >- <span className={`w-3 h-3 rounded-full shadow-sm mx-px ${create.available ? 'bg-white' : 'bg-white/40'}`} />- </button>- </div>- {!create.available && (- // A reason, not an error: the calm grey of lib/hinweis.ts,- // like the line under Chat Tools.- <div data-testid="plugins-create-reason" className={`pb-1.5 t-micro leading-snug ${HINWEIS_TEXT.ruhig}`}>- {create.reason}- </div>- )}- </>- )}- </div>+ no switch here any more. Every plugin is one row of the same+ look (PluginRow): switch at the right, off closes the row, on+ opens its settings under it; hairlines between the rows. */}+ <div className="divide-y divide-gray-200 dark:divide-white/[0.06]">++ {/* ── Create ──────────────────────────────────── */}+ {create.shown && (+ <PluginRow+ testId="plugins-create"+ icon={Sparkles}+ onColor="text-lu-accent"+ name="Create"+ mark={<BetaMark feature="create-in-chat" />}+ line="image · video · music · voice"+ on={createOn}+ available={create.available}+ reason={create.reason}+ onToggle={() => updateSettings({ createEnabled: !createSetting })}+ switchLabel="Create"+ switchTestId="plugins-create-switch"+ switchTitle={createOn ? 'Turn off Create in chat' : 'Images, video, music and voice in chat'}+ />+ )}{/* ── REA, reverse engineering for the agents ────── */}{reaShown && <Suspense fallback={null}><ReaPluginRow /></Suspense>}{/* ── Neurons, the neuron tweaker (3.1.0) ─────────── */}- {neuronsShown && <NeuronPluginRow onOpenWindow={() => setOpen(false)} />}-- <div className="border-t border-gray-200 dark:border-white/[0.06] my-1" />-- {/* ── Caveman Mode Dropdown ───────────────────── */}- <div className="px-2.5">- <button- onClick={() => { setCavemanOpen(!cavemanOpen); setPersonaOpen(false) }}- className="w-full flex items-center justify-between py-1.5 group"- >- <div className="flex items-center gap-1.5">- <Bone size={10} className={isCavemanActive ? 'text-pink-400' : 'text-gray-400'} />- <span className="t-micro font-medium text-gray-600 dark:text-gray-300">Caveman Mode</span>- </div>- <div className="flex items-center gap-1">- <span className={`text-[0.55rem] ${isCavemanActive ? 'text-pink-400' : 'text-gray-500'}`}>- {currentCaveman?.label || 'Off'}- </span>- <ChevronDown size={9} className={`text-gray-500 transition-transform ${cavemanOpen ? 'rotate-180' : ''}`} />- </div>- </button>+ {neuronsShown && <NeuronPluginRow hint={hint.row} onOpenWindow={() => setMenuOpen(false)} />}- {cavemanOpen && (- <div className="pb-1.5 space-y-0.5">- {CAVEMAN_MODES.map((mode) => {- const isActive = (cavemanMode || 'off') === mode.value- return (- <button- key={mode.value}- onClick={() => { updateSettings({ cavemanMode: mode.value }); setCavemanOpen(false) }}- className={`w-full flex items-center justify-between px-2 py-1 rounded text-left transition-colors ${- isActive- ? mode.value === 'off'- ? 'bg-gray-100 dark:bg-white/[0.06] text-gray-700 dark:text-gray-200'- : 'bg-pink-500/10 text-pink-600 dark:text-pink-400'- : 'text-gray-500 hover:bg-gray-50 dark:hover:bg-white/[0.04] hover:text-gray-700 dark:hover:text-gray-300'- }`}- >- <div className="flex items-center gap-1.5">- {isActive && <div className={`w-1 h-1 rounded-full shrink-0 ${mode.value === 'off' ? 'bg-gray-400' : 'bg-pink-400'}`} />}- <span className="text-[0.55rem] font-medium">{mode.label}</span>- </div>- <span className="text-[0.5rem] text-gray-400">{mode.desc}</span>- </button>- )- })}- </div>- )}- </div>-- <div className="border-t border-gray-200 dark:border-white/[0.06] my-1" />-- {/* ── Personas Dropdown ───────────────────────── */}- <div className="px-2.5">- <div className="w-full flex items-center justify-between py-1.5 gap-2">- <button- onClick={() => { setPersonaOpen(!personaOpen); setCavemanOpen(false) }}- className="flex items-center gap-1.5 flex-1 min-w-0 text-left"- >- <User size={10} className={isPersonaActive ? 'text-green-400' : 'text-gray-400'} />- <span className="t-micro font-medium text-gray-600 dark:text-gray-300">Persona</span>- <span className={`text-[0.55rem] truncate ${isPersonaActive ? 'text-green-400' : 'text-gray-500'}`}>- {personaLabel}- </span>- <ChevronDown size={9} className={`text-gray-500 transition-transform ${personaOpen ? 'rotate-180' : ''}`} />- </button>- {/* On/off toggle for THIS chat — Remote already had this- via `personaEnabled`; now Chat / Code / Agent match.- Always shown when a chat is open (the owner: "personas hat im- chat noch kein an/aus toggle" — it was hidden for the- default Unrestricted persona). */}- {activeConvId && (- <button- onClick={(e) => {- e.stopPropagation()- setConversationPersonaEnabled(activeConvId, !personaEnabledOnChat)- }}- title={personaEnabledOnChat ? 'Disable persona for this chat' : 'Enable persona for this chat'}- className={- 'shrink-0 flex items-center w-7 h-3.5 rounded-full transition-colors ' +- (personaEnabledOnChat- ? 'bg-green-500/40 hover:bg-green-500/55 justify-end'- : 'bg-gray-300/30 dark:bg-white/10 hover:bg-gray-300/45 dark:hover:bg-white/15 justify-start')- }- >- <span className="w-3 h-3 rounded-full bg-white shadow-sm mx-px" />- </button>- )}+ {/* ── Caveman Mode ────────────────────────────── */}+ <PluginRow+ testId="plugins-caveman"+ icon={Bone}+ onColor="text-pink-400"+ name="Caveman Mode"+ line={isCavemanActive ? currentCaveman?.label : 'shorter answers'}+ on={!!isCavemanActive}+ onToggle={() => updateSettings(isCavemanActive+ ? { cavemanMode: 'off', cavemanLevel }+ : { cavemanMode: cavemanLevel })}+ switchLabel="Caveman Mode"+ switchTestId="plugins-caveman-switch"+ switchTitle={isCavemanActive ? 'Turn off Caveman Mode: normal answers' : 'Caveman Mode: shorter, terser answers'}+ >+ <div className="space-y-0.5">+ {CAVEMAN_MODES.map((mode) => {+ const isActive = cavemanLevel === mode.value+ return (+ <button+ key={mode.value}+ onClick={() => updateSettings({ cavemanMode: mode.value, cavemanLevel: mode.value })}+ aria-pressed={isActive}+ data-testid={`plugins-caveman-${mode.value}`}+ className={`w-full flex items-center justify-between px-2 py-1 rounded text-left transition-colors ${+ isActive+ ? 'bg-pink-500/10 text-pink-600 dark:text-pink-400'+ : 'text-gray-500 hover:bg-gray-50 dark:hover:bg-white/[0.04] hover:text-gray-700 dark:hover:text-gray-300'+ }`}+ >+ <div className="flex items-center gap-1.5">+ {isActive && <div className="w-1 h-1 rounded-full shrink-0 bg-pink-400" />}+ <span className="text-[0.55rem] font-medium">{mode.label}</span>+ </div>+ <span className="text-[0.5rem] text-gray-400">{mode.desc}</span>+ </button>+ )+ })}</div>+ </PluginRow>- {personaOpen && (- <div className="pb-1.5 space-y-0.5 max-h-[180px] overflow-y-auto scrollbar-thin">- {allPersonas.map((p) => {- const isActive = p.id === activePersona?.id- return (- <button- key={p.id}- onClick={() => {- // The app wide pick stays the start of every new- // chat; the open chat takes the persona for itself.- setActivePersona(p.id)- if (activeConvId) setConversationPersona(activeConvId, p)- setPersonaOpen(false)- }}- className={`w-full flex items-center gap-1.5 px-2 py-1 rounded text-left transition-colors ${- isActive- ? 'bg-green-500/10 text-green-600 dark:text-green-400'- : 'text-gray-500 hover:bg-gray-50 dark:hover:bg-white/[0.04] hover:text-gray-700 dark:hover:text-gray-300'- }`}- >- {isActive && <div className="w-1 h-1 rounded-full bg-green-400 shrink-0" />}- <span className="text-[0.55rem] font-medium">{p.name}</span>- </button>- )- })}- </div>- )}- </div>-- <div className="border-t border-gray-200 dark:border-white/[0.06] my-1" />+ {/* ── Persona ─────────────────────────────────── */}+ {/* On/off for THIS chat (`personaEnabled`), as Remote has it. The+ switch says what the chat sends; the list under it picks which+ persona. Without an open chat there is nothing to hold it. */}+ <PluginRow+ testId="plugins-persona"+ icon={User}+ onColor="text-green-400"+ name="Persona"+ line={personaLabel}+ on={personaEnabledOnChat}+ available={!!activeConvId}+ reason={PERSONA_NO_CHAT_REASON}+ onToggle={() => { if (activeConvId) setConversationPersonaEnabled(activeConvId, !personaEnabledOnChat) }}+ switchLabel="Persona"+ switchTestId="plugins-persona-switch"+ switchTitle={personaEnabledOnChat ? 'Disable persona for this chat' : 'Enable persona for this chat'}+ >+ <div className="space-y-0.5 max-h-[180px] overflow-y-auto scrollbar-thin">+ {allPersonas.map((p) => {+ const isActive = p.id === activePersona?.id+ return (+ <button+ key={p.id}+ onClick={() => {+ // The app wide pick stays the start of every new+ // chat; the open chat takes the persona for itself.+ setActivePersona(p.id)+ if (activeConvId) setConversationPersona(activeConvId, p)+ }}+ aria-pressed={isActive}+ className={`w-full flex items-center gap-1.5 px-2 py-1 rounded text-left transition-colors ${+ isActive+ ? 'bg-green-500/10 text-green-600 dark:text-green-400'+ : 'text-gray-500 hover:bg-gray-50 dark:hover:bg-white/[0.04] hover:text-gray-700 dark:hover:text-gray-300'+ }`}+ >+ {isActive && <div className="w-1 h-1 rounded-full bg-green-400 shrink-0" />}+ <span className="text-[0.55rem] font-medium">{p.name}</span>+ </button>+ )+ })}+ </div>+ </PluginRow>{/* ── Group chat (v1) ─────────────────────────── */}- <div className="px-2.5">- <button- onClick={() => { setGroupOpen(!groupOpen); setCavemanOpen(false); setPersonaOpen(false) }}- className="w-full flex items-center justify-between py-1.5"- >- <div className="flex items-center gap-1.5">- <Users size={10} className={isGroupActive ? 'text-purple-400' : 'text-gray-400'} />- <span className="t-micro font-medium text-gray-600 dark:text-gray-300">Group chat</span>- <span data-testid="group-chat-count" className={`text-[0.55rem] ${isGroupActive ? 'text-purple-400' : 'text-gray-500'}`}>- {isGroupActive- ? `${answering} ${answering === 1 ? 'model' : 'models'}${unavailableCount > 0 ? `, ${unavailableCount} unavailable` : ''}`- : 'Off'}- </span>- </div>- <ChevronDown size={9} className={`text-gray-500 transition-transform ${groupOpen ? 'rotate-180' : ''}`} />- </button>-- {groupOpen && (activeConvId ? (- <div className="pb-1.5 space-y-0.5 max-h-[220px] overflow-y-auto scrollbar-thin">+ <PluginRow+ testId="plugins-group"+ icon={Users}+ onColor="text-purple-400"+ name="Group chat"+ line={+ <span data-testid="group-chat-count">+ {isGroupActive+ ? `${answering} ${answering === 1 ? 'model' : 'models'}${unavailableCount > 0 ? `, ${unavailableCount} unavailable` : ''}`+ : groupOn ? 'pick 2 or more' : 'several models in turn'}+ </span>+ }+ on={!!activeConvId && groupOn}+ available={!!activeConvId}+ reason={GROUP_NO_CHAT_REASON}+ onToggle={() => {+ if (!activeConvId) return+ if (groupOn) { setPersonaFor(null); setGroupArmed(false); setGroupModels(activeConvId, []) }+ else setGroupArmed(true)+ }}+ switchLabel="Group chat"+ switchTestId="plugins-group-switch"+ switchTitle={groupOn ? 'Turn off group chat for this chat' : 'Let several models answer in turn in this chat'}+ >+ {activeConvId && (+ <div className="space-y-0.5 max-h-[220px] overflow-y-auto scrollbar-thin"><p className="px-2 pb-0.5 text-[0.5rem] leading-snug text-gray-400">Pick 2 to {GROUP_CHAT_MAX} models. They answer in turn on every message, and each sees what the others said. Each one can speak as its own persona.</p>@@ -464,7 +455,9 @@ export function PluginsDropdown({<buttondisabled={full}onClick={() => {- if (on) setPersonaFor(null)+ // Unticking the last one keeps the list open: the+ // switch is what turns group chat off.+ if (on) { setPersonaFor(null); setGroupArmed(true) }setGroupModels(activeConvId,on ? groupModels.filter((x) => x !== m.name) : [...groupModels, m.name],@@ -564,18 +557,9 @@ export function PluginsDropdown({{groupModels.length === 1 && (<p className="px-2 text-[0.5rem] text-gray-400">One more model turns this into a group.</p>)}- {groupModels.length > 0 && (- <button- onClick={() => { setPersonaFor(null); setGroupModels(activeConvId, []) }}- className="w-full px-2 py-1 rounded text-left text-[0.55rem] text-gray-500 hover:bg-gray-50 dark:hover:bg-white/[0.04] hover:text-gray-700 dark:hover:text-gray-300 transition-colors"- >- Turn off- </button>- )}</div>- ) : (- <p className="pb-1.5 px-2 text-[0.5rem] text-gray-400">Open a chat first, the group lives on the conversation.</p>- ))}+ )}+ </PluginRow></div></div>diff --git a/src/components/chat/ReaPluginRow.tsx b/src/components/chat/ReaPluginRow.tsxindex cb793548..fe53ded0 100644--- a/src/components/chat/ReaPluginRow.tsx+++ b/src/components/chat/ReaPluginRow.tsx@@ -8,6 +8,7 @@ import { useSettingsStore } from '../../stores/settingsStore'import { useReaRuntime } from '../../lib/plugins/rea-runtime'import { REA_PLUGIN, REA_TOOLS_NOTE, reaGhidraLine } from '../../lib/plugins/rea'import { HINWEIS_TEXT } from '../../lib/hinweis'+import { PluginRow } from './PluginRow'/** The line under the switch for the step a start is at. */export function reaPhaseLine(phase: string, tools: number, error: string | null): string | null {@@ -28,45 +29,38 @@ export function ReaPluginRow() {// Only once REA runs: before that the row has its own step to tell.const ghidraLine = enabled && phase === 'on' ? reaGhidraLine(ghidra) : nullreturn (- <div className="px-2.5" data-testid="plugins-rea">- <div className="w-full flex items-center justify-between py-1.5 gap-2">- <div className="flex items-center gap-1.5 min-w-0">- <Microscope size={10} className={`shrink-0 ${enabled ? 'text-teal-400' : 'text-gray-400'}`} />- <span className="shrink-0 t-micro font-medium text-gray-600 dark:text-gray-300">{REA_PLUGIN.name}</span>- <span className="t-micro text-gray-400 truncate">reverse engineering</span>- </div>- <button- onClick={(e) => { e.stopPropagation(); updateSettings({ reaPluginEnabled: !enabled }) }}- aria-pressed={enabled}- aria-label={REA_PLUGIN.title}- data-testid="plugins-rea-switch"- title={enabled ? 'Stop REA' : `${REA_PLUGIN.title}: tools for Agent and Code that take apart apps and files (${REA_PLUGIN.license})`}- className={- 'shrink-0 flex items-center w-7 h-3.5 rounded-full transition-colors '- + (enabled- ? 'bg-teal-500/40 hover:bg-teal-500/55 justify-end'- : 'bg-gray-300/30 dark:bg-white/10 hover:bg-gray-300/45 dark:hover:bg-white/15 justify-start')- }- >- <span className="w-3 h-3 rounded-full shadow-sm mx-px bg-white" />- </button>- </div>- {line && (- <div- data-testid="plugins-rea-line"- className={`pb-1.5 t-micro leading-snug ${phase === 'error' ? 'text-red-400' : HINWEIS_TEXT.ruhig}`}- >- {line}- </div>- )}- {ghidraLine && (- <div- data-testid="plugins-rea-ghidra"- className={`pb-1.5 t-micro leading-snug break-words ${ghidra?.needsNatives ? HINWEIS_TEXT.fehler : HINWEIS_TEXT.ruhig}`}- >- {ghidraLine}- </div>- )}- </div>+ <PluginRow+ testId="plugins-rea"+ icon={Microscope}+ onColor="text-teal-400"+ name={REA_PLUGIN.name}+ line="reverse engineering"+ on={enabled}+ onToggle={() => updateSettings({ reaPluginEnabled: !enabled })}+ switchLabel={REA_PLUGIN.title}+ switchTestId="plugins-rea-switch"+ switchTitle={enabled ? 'Stop REA' : `${REA_PLUGIN.title}: tools for Agent and Code that take apart apps and files (${REA_PLUGIN.license})`}+ >+ {line || ghidraLine ? (+ <>+ {line && (+ <div+ data-testid="plugins-rea-line"+ className={`t-micro leading-snug ${phase === 'error' ? 'text-red-400' : HINWEIS_TEXT.ruhig}`}+ >+ {line}+ </div>+ )}+ {ghidraLine && (+ <div+ data-testid="plugins-rea-ghidra"+ className={`${line ? 'pt-1.5 ' : ''}t-micro leading-snug break-words ${ghidra?.needsNatives ? HINWEIS_TEXT.fehler : HINWEIS_TEXT.ruhig}`}+ >+ {ghidraLine}+ </div>+ )}+ </>+ ) : null}+ </PluginRow>)}diff --git a/src/components/chat/__tests__/every-plugin-has-its-switch.test.tsx b/src/components/chat/__tests__/every-plugin-has-its-switch.test.tsxnew file mode 100644index 00000000..bc706901--- /dev/null+++ b/src/components/chat/__tests__/every-plugin-has-its-switch.test.tsx@@ -0,0 +1,244 @@+/**+ * @vitest-environment jsdom+ *+ * 3.1.0, David 16.11.2026: every plugin under Plugins gets the switch Neurons+ * has, at the far right of its row, in Chat, Agent and Code. Off closes the+ * row; on opens what the plugin had in its dropdown right under it. What a+ * user had switched on before stays on: the switches read the same fields+ * the old dropdowns wrote, nothing is migrated away.+ *+ * And the Neurons hint: a small calm dot on the Plugins button until Plugins+ * was opened AND Neurons was on once, the same dot on the Neurons row until+ * it was on once. Remembered on this computer, gone with one constant in+ * 3.1.1 (lib/neurons-hint.ts).+ *+ * Run: npx vitest run src/components/chat/__tests__/every-plugin-has-its-switch.test.tsx+ */+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { cleanup, fireEvent, render, screen, within } from '@testing-library/react'+import { readFileSync } from 'node:fs'+import { join } from 'node:path'++vi.mock('../../../api/backend', async (orig) => ({ ...(await orig<typeof import('../../../api/backend')>()), isTauri: () => true }))++import { PluginsDropdown, PERSONA_NO_CHAT_REASON, GROUP_NO_CHAT_REASON, cavemanLevelOf } from '../PluginsDropdown'+import { useSettingsStore } from '../../../stores/settingsStore'+import { useChatStore } from '../../../stores/chatStore'+import { useModelStore } from '../../../stores/modelStore'+import { useNeuronWindow } from '../../../stores/neuronWindowStore'+import { BUILT_IN_PERSONAS, DEFAULT_SETTINGS } from '../../../lib/constants'+import { NEURONS_HINT_KEY, neuronsHintDots, useNeuronsHint } from '../../../lib/neurons-hint'+import type { AIModel } from '../../../types/models'++const SURFACES: { name: string; props: { openUpward?: boolean; iconOnly?: boolean; agentTools?: boolean } }[] = [+ { name: 'Chat', props: { openUpward: true } },+ { name: 'Agent', props: { openUpward: true, agentTools: true } },+ { name: 'Code', props: { iconOnly: true, agentTools: true } },+]++const textModel = (name: string): AIModel => ({ name, type: 'text' } as AIModel)++let convId = ''+beforeEach(() => {+ localStorage.clear()+ useNeuronsHint.setState({ menuOpened: false, neuronsOnce: false })+ useSettingsStore.setState({ settings: { ...DEFAULT_SETTINGS, appMode: 'local' }, personas: [...BUILT_IN_PERSONAS] })+ useModelStore.setState({ models: [textModel('walt'), textModel('baron')], activeModel: 'walt' })+ useChatStore.setState({ conversations: [], activeConversationId: null })+ convId = useChatStore.getState().createConversation('walt', '')+ useChatStore.getState().setActiveConversation(convId)+ useNeuronWindow.setState({ open: false, collapsed: false, pos: null })+})+afterEach(() => cleanup())++const openMenu = (props: object = { openUpward: true }) => {+ const r = render(<PluginsDropdown {...props} />)+ fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))+ return r+}+const row = (id: string) => screen.getByTestId(`plugins-${id}`)+const switchOf = (id: string) => screen.getByTestId(`plugins-${id}-switch`)+const body = (id: string) => screen.queryByTestId(`plugins-${id}-body`)+const conversation = () => useChatStore.getState().conversations.find((c) => c.id === convId)!++describe('every plugin row has the switch at its right end', () => {+ for (const s of SURFACES) {+ it(`${s.name}: every row, one look, all closed while off`, async () => {+ openMenu(s.props)+ const ids = ['neurons', 'caveman', 'persona', 'group', ...(s.props.agentTools ? ['rea'] : [])]+ if (s.props.agentTools) await screen.findByTestId('plugins-rea')+ const looks = new Set<string>()+ for (const id of ids) {+ const sw = switchOf(id)+ // The switch is the last control of the row's head, at the right.+ expect(sw.parentElement!.lastElementChild).toBe(sw)+ expect(sw.getAttribute('aria-pressed')).toBe('false')+ looks.add(sw.className)+ expect(body(id), `${id} is closed while off`).toBeNull()+ }+ expect(looks.size, 'every switch looks the same').toBe(1)+ })+ }++ it('the rows are parted by hairlines, not boxed', () => {+ openMenu()+ const list = row('caveman').parentElement!+ expect(list.className).toContain('divide-y')+ for (const id of ['neurons', 'caveman', 'persona', 'group']) {+ expect(row(id).className).not.toMatch(/\bborder\b|rounded|shadow/)+ }+ })++ it('Caveman: on opens the levels, a level is kept, off closes and remembers it', () => {+ openMenu()+ fireEvent.click(switchOf('caveman'))+ expect(useSettingsStore.getState().settings.cavemanMode).toBe('lite')+ expect(body('caveman')).not.toBeNull()+ fireEvent.click(screen.getByTestId('plugins-caveman-ultra'))+ expect(useSettingsStore.getState().settings.cavemanMode).toBe('ultra')+ fireEvent.click(switchOf('caveman'))+ expect(useSettingsStore.getState().settings.cavemanMode).toBe('off')+ expect(body('caveman')).toBeNull()+ fireEvent.click(switchOf('caveman'))+ expect(useSettingsStore.getState().settings.cavemanMode).toBe('ultra')+ })++ it('Persona: on is THIS chat on, the list opens under it and picks', () => {+ openMenu()+ fireEvent.click(switchOf('persona'))+ expect(conversation().personaEnabled).toBe(true)+ const list = body('persona')!+ const pick = BUILT_IN_PERSONAS.find((p) => p.id !== 'unrestricted')!+ fireEvent.click(within(list).getByRole('button', { name: pick.name }))+ expect(useSettingsStore.getState().activePersonaId).toBe(pick.id)+ fireEvent.click(switchOf('persona'))+ expect(conversation().personaEnabled).toBe(false)+ expect(body('persona')).toBeNull()+ })++ it('Persona and Group chat without an open chat: grey, with the reason', () => {+ useChatStore.setState({ activeConversationId: null })+ openMenu()+ expect((switchOf('persona') as HTMLButtonElement).disabled).toBe(true)+ expect(screen.getByTestId('plugins-persona-reason').textContent).toBe(PERSONA_NO_CHAT_REASON)+ expect((switchOf('group') as HTMLButtonElement).disabled).toBe(true)+ expect(screen.getByTestId('plugins-group-reason').textContent).toBe(GROUP_NO_CHAT_REASON)+ })++ it('Group chat: on opens the list, off ends the group', () => {+ openMenu()+ fireEvent.click(switchOf('group'))+ expect(screen.getAllByTestId('group-participant')).toHaveLength(2)+ for (const m of ['walt', 'baron']) fireEvent.click(within(body('group')!).getByRole('button', { name: m }))+ expect(conversation().groupModels).toEqual(['walt', 'baron'])+ fireEvent.click(switchOf('group'))+ expect(conversation().groupModels ?? []).toEqual([])+ expect(body('group')).toBeNull()+ })++ it('Group chat switched on with nobody picked is off again after the menu closed', () => {+ openMenu()+ fireEvent.click(switchOf('group'))+ expect(switchOf('group').getAttribute('aria-pressed')).toBe('true')+ fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))+ fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))+ expect(switchOf('group').getAttribute('aria-pressed')).toBe('false')+ })++ it('Neurons and REA open their lines under the row while on', async () => {+ useSettingsStore.getState().updateSettings({ neuronsPluginEnabled: true, reaPluginEnabled: true })+ openMenu({ openUpward: true, agentTools: true })+ expect(within(body('neurons')!).getByTestId('plugins-neurons-open')).toBeTruthy()+ await screen.findByTestId('plugins-rea')+ expect(switchOf('rea').getAttribute('aria-pressed')).toBe('true')+ })+})++describe('what users had on stays on (no migration loses anything)', () => {+ it('a stored Caveman level, a persona on in a chat, a group, Neurons and REA all show on', async () => {+ useSettingsStore.getState().updateSettings({ cavemanMode: 'full', neuronsPluginEnabled: true, reaPluginEnabled: true })+ useChatStore.getState().setConversationPersonaEnabled(convId, true)+ useChatStore.getState().setGroupModels(convId, ['walt', 'baron'])+ const before = JSON.stringify({ s: useSettingsStore.getState().settings, c: conversation() })+ openMenu({ openUpward: true, agentTools: true })+ await screen.findByTestId('plugins-rea')+ for (const id of ['caveman', 'persona', 'group', 'neurons', 'rea']) {+ expect(switchOf(id).getAttribute('aria-pressed'), id).toBe('true')+ }+ expect(screen.getByTestId('plugins-caveman-full').getAttribute('aria-pressed')).toBe('true')+ expect(screen.getAllByTestId('group-order-row')).toHaveLength(2)+ // Opening the menu wrote nothing.+ expect(JSON.stringify({ s: useSettingsStore.getState().settings, c: conversation() })).toBe(before)+ })++ it('the Caveman level reads defensively', () => {+ expect(cavemanLevelOf('full', undefined)).toBe('full')+ expect(cavemanLevelOf('off', 'ultra')).toBe('ultra')+ expect(cavemanLevelOf('off', 'loud')).toBe('lite')+ expect(cavemanLevelOf(undefined, undefined)).toBe('lite')+ })+})++describe('the Neurons hint (3.1.0, remove in 3.1.1)', () => {+ for (const s of SURFACES) {+ it(`${s.name}: dot on the button until Plugins was opened and Neurons on once`, () => {+ render(<PluginsDropdown {...s.props} />)+ expect(screen.getByTestId('plugins-hint')).toBeTruthy()+ fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))+ // Opened, but Neurons never on: both dots stay.+ expect(screen.getByTestId('plugins-hint')).toBeTruthy()+ expect(within(row('neurons')).getByTestId('plugins-neurons-hint')).toBeTruthy()+ // On opens the Neurons window and closes the menu.+ fireEvent.click(switchOf('neurons'))+ expect(useNeuronWindow.getState().open).toBe(true)+ expect(screen.queryByTestId('plugins-hint')).toBeNull()+ fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))+ expect(screen.queryByTestId('plugins-neurons-hint')).toBeNull()+ // Off again does not bring it back.+ fireEvent.click(switchOf('neurons'))+ expect(screen.queryByTestId('plugins-hint')).toBeNull()+ expect(screen.queryByTestId('plugins-neurons-hint')).toBeNull()+ })+ }++ it('Neurons on once without opening Plugins keeps the button dot only', () => {+ useNeuronsHint.setState({ neuronsOnce: true })+ render(<PluginsDropdown openUpward />)+ expect(screen.getByTestId('plugins-hint')).toBeTruthy()+ fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))+ expect(screen.queryByTestId('plugins-neurons-hint')).toBeNull()+ expect(screen.queryByTestId('plugins-hint')).toBeNull()+ })++ it('is remembered on this computer', () => {+ openMenu()+ fireEvent.click(switchOf('neurons'))+ const saved = JSON.parse(localStorage.getItem(NEURONS_HINT_KEY) ?? '{}')+ expect(saved.state).toEqual({ menuOpened: true, neuronsOnce: true })+ })++ it('is calm: no pulse, no number', () => {+ openMenu()+ for (const dot of [screen.getByTestId('plugins-hint'), screen.getByTestId('plugins-neurons-hint')]) {+ expect(dot.className).not.toMatch(/animate|ping|pulse/)+ expect(dot.textContent).toBe('')+ }+ })++ it('shows nowhere Neurons cannot be turned on, and not when switched off', () => {+ const fresh = { menuOpened: false, neuronsOnce: false }+ expect(neuronsHintDots(fresh, true, false)).toEqual({ trigger: true, row: true })+ expect(neuronsHintDots(fresh, false, false)).toEqual({ trigger: false, row: false })+ expect(neuronsHintDots(fresh, true, false, false)).toEqual({ trigger: false, row: false })+ expect(neuronsHintDots(fresh, true, true)).toEqual({ trigger: true, row: false })+ expect(neuronsHintDots({ menuOpened: true, neuronsOnce: false }, true, true)).toEqual({ trigger: false, row: false })+ useSettingsStore.getState().updateSettings({ appMode: 'cloud' })+ render(<PluginsDropdown openUpward />)+ expect(screen.queryByTestId('plugins-hint')).toBeNull()+ })++ it('hangs on one constant marked for 3.1.1', () => {+ const src = readFileSync(join(__dirname, '../../../lib/neurons-hint.ts'), 'utf8')+ expect(src).toMatch(/remove in 3\.1\.1 \*\/\nexport const NEURONS_HINT_ON = true/)+ })+})diff --git a/src/components/chat/__tests__/group-order-and-round-controls.test.tsx b/src/components/chat/__tests__/group-order-and-round-controls.test.tsxindex 45735134..3b0f5b78 100644--- a/src/components/chat/__tests__/group-order-and-round-controls.test.tsx+++ b/src/components/chat/__tests__/group-order-and-round-controls.test.tsx@@ -48,7 +48,8 @@ const orderShown = () => screen.getAllByTestId('group-order-row').map((r) => r.gfunction openGroupMenu() {render(<PluginsDropdown openUpward />)fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))- fireEvent.click(screen.getByRole('button', { name: /Group chat/ }))+ // A chat that is a group has its switch on, so the list is already open+ // (3.1.0, every plugin a row with a switch).}describe('GH #200: the speaking order in the group menu', () => {diff --git a/src/components/chat/__tests__/group-participants-pick-their-persona.test.tsx b/src/components/chat/__tests__/group-participants-pick-their-persona.test.tsxindex f7955202..b1f736ff 100644--- a/src/components/chat/__tests__/group-participants-pick-their-persona.test.tsx+++ b/src/components/chat/__tests__/group-participants-pick-their-persona.test.tsx@@ -44,7 +44,10 @@ const participant = (model: string) =>function openGroupMenu() {render(<PluginsDropdown openUpward />)fireEvent.click(screen.getByRole('button', { name: /Plugins/ }))- fireEvent.click(screen.getByRole('button', { name: /Group chat/ }))+ // 3.1.0: Group chat is a row with a switch. A chat that is a group has it+ // on already; otherwise the switch opens the list.+ const sw = screen.getByRole('button', { name: /Group chat/ })+ if (sw.getAttribute('aria-pressed') !== 'true') fireEvent.click(sw)}describe('the group menu', () => {diff --git a/src/lib/neurons-hint.ts b/src/lib/neurons-hint.tsnew file mode 100644index 00000000..c05acea3--- /dev/null+++ b/src/lib/neurons-hint.ts@@ -0,0 +1,58 @@+// The Neurons hint of 3.1.0 (David 16.11.2026): a small calm dot on the+// Plugins button until the user has opened Plugins AND turned Neurons on once,+// and the same dot on the Neurons row until it was on once. Kept on this+// computer only.+//+// remove in 3.1.1: set NEURONS_HINT_ON to false (or delete this file and the+// places that import it). Everything about the hint hangs on this one switch.++import { create } from 'zustand'+import { persist } from 'zustand/middleware'++/** remove in 3.1.1 */+export const NEURONS_HINT_ON = true+/** Its storage key names the release it belongs to (3.1.0; no version is+ * typed into the interface, lib/app-version.ts is the one source). */+export const NEURONS_HINT_KEY = 'lu-neurons-hint-310'++export const NEURONS_HINT_LABEL = 'New: Neurons'++interface NeuronsHintState {+ /** Plugins was opened at least once. */+ menuOpened: boolean+ /** Neurons was switched on at least once. */+ neuronsOnce: boolean+ noteMenuOpened: () => void+ noteNeuronsOn: () => void+}++export const useNeuronsHint = create<NeuronsHintState>()(+ persist(+ (set, get) => ({+ menuOpened: false,+ neuronsOnce: false,+ noteMenuOpened: () => { if (!get().menuOpened) set({ menuOpened: true }) },+ noteNeuronsOn: () => { if (!get().neuronsOnce) set({ neuronsOnce: true }) },+ }),+ {+ name: NEURONS_HINT_KEY,+ partialize: (s) => ({ menuOpened: s.menuOpened, neuronsOnce: s.neuronsOnce }),+ },+ ),+)++/**+ * Which dots show. `available` is whether Neurons can be turned on here at+ * all (desktop app, not Cloud mode): a dot that points at a grey switch would+ * only nag. A Neurons that is on right now counts as on once.+ */+export function neuronsHintDots(+ state: { menuOpened: boolean; neuronsOnce: boolean },+ available: boolean,+ neuronsOnNow: boolean,+ hintOn: boolean = NEURONS_HINT_ON,+): { trigger: boolean; row: boolean } {+ if (!hintOn || !available) return { trigger: false, row: false }+ const once = state.neuronsOnce || neuronsOnNow+ return { trigger: !(state.menuOpened && once), row: !once }+}diff --git a/src/lib/settings-catalog.ts b/src/lib/settings-catalog.tsindex 03d21c6c..48a8528f 100644--- a/src/lib/settings-catalog.ts+++ b/src/lib/settings-catalog.ts@@ -471,7 +471,7 @@ export const LOCK_RULES: readonly LockRule[] = [},{category: 'plugins', what: 'Plugins, MCP servers and custom nodes', where: 'Settings → Agent (MCP) and Plugins in the composer',- names: ['reaPluginEnabled', 'neuronsPluginEnabled', 'createEnabled', 'mcpServers', 'customNodes', 'plugins'],+ names: ['reaPluginEnabled', 'neuronsPluginEnabled', 'createEnabled', 'cavemanLevel', 'mcpServers', 'customNodes', 'plugins'],pattern: /plugin|mcp|customnode|extension|install|rea$/,},{diff --git a/src/types/settings.ts b/src/types/settings.tsindex 910d5a34..825dd75e 100644--- a/src/types/settings.ts+++ b/src/types/settings.ts@@ -154,6 +154,11 @@ export interface Settings {*/createEnabled?: booleancavemanMode: CavemanMode+ /**+ * The Caveman level the Plugins switch turns back on (3.1.0). Written when+ * the switch goes off or a level is picked; absent means Lite.+ */+ cavemanLevel?: Exclude<CavemanMode, 'off'>searchProvider: SearchProviderbraveApiKey: stringtavilyApiKey: string