Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (claude): test Processing badge + eviction countdown + id normalization
[._.]/ Adam Eivy2b86d23fd83e
diff --git a/client/src/pages/LocalLlmPlayground.jsx b/client/src/pages/LocalLlmPlayground.jsxindex 81bca1f58f..53776b3800 100644--- a/client/src/pages/LocalLlmPlayground.jsx+++ b/client/src/pages/LocalLlmPlayground.jsx@@ -350,7 +350,9 @@ export default function LocalLlmPlayground() {const selectedKeys = useMemo(() => new Set(selectedTargets.map(localLlmTargetKey)), [selectedTargets]);// `/api/ps` reports what's resident but not which model is mid-generation, so// derive the "processing" flag from our own in-flight run: the streaming chat- // target, or every target in a busy comparison.+ // target, or every target in a busy comparison. Intentionally backend-agnostic+ // — an LM Studio model driven by a comparison shows "Processing" too (the+ // memory-residency badges above it stay Ollama-only since `/api/ps` is).const runningKeys = useMemo(() => {if (!busy) return new Set();if (activeMode === 'chat') return streamingChat ? new Set([localLlmTargetKey(streamingChat)]) : new Set();diff --git a/client/src/pages/LocalLlmPlayground.test.jsx b/client/src/pages/LocalLlmPlayground.test.jsxindex 486c340d34..71b9b6c934 100644--- a/client/src/pages/LocalLlmPlayground.test.jsx+++ b/client/src/pages/LocalLlmPlayground.test.jsx@@ -72,23 +72,54 @@ describe('LocalLlmPlayground', () => {expect(screen.getByText('Multilingual')).toBeTruthy();});- it('flags a model that is resident in memory with its VRAM size', async () => {+ it('flags a resident model with VRAM size + eviction countdown, reconciling a case/tag-mismatched id', async () => {getLoadedLlmModels.mockResolvedValue({ollama: [- // Ollama's /api/ps reports the tagged name and VRAM footprint; the- // sidebar should reconcile it to the installed row and show "In memory".- { id: 'command-r-plus:104b', name: 'command-r-plus:104b', size: 59 * 1024 ** 3, sizeVram: 60 * 1024 ** 3, expiresAt: null },+ // /api/ps reports a differently-cased id than the installed row+ // (COMMAND-R-PLUS vs command-r-plus); normalizeCatalogId must reconcile+ // them, or the badge never matches. Also carries VRAM + a future+ // eviction time so the "frees in" countdown branch runs.+ {+ id: 'COMMAND-R-PLUS:104B',+ name: 'COMMAND-R-PLUS:104B',+ size: 59 * 1024 ** 3,+ sizeVram: 60 * 1024 ** 3,+ expiresAt: new Date(Date.now() + 90 * 60 * 1000).toISOString(),+ },],});renderPlayground();- // The badge reports residency AND the model's VRAM footprint (60 GB), and- // the header chip summarizes the count.+ // The badge reports residency AND the model's VRAM footprint (60 GB), the+ // countdown renders ("frees in 1h"), and the header chip counts it.await waitFor(() => expect(screen.getByText(/In memory · 60 GB/)).toBeTruthy());+ expect(screen.getByText(/frees in 1h/)).toBeTruthy();expect(screen.getByText(/1 in memory/)).toBeTruthy();});+ it('marks the model row "Processing" (not "In memory") while a chat run is in flight', async () => {+ // No model is resident (default mock), but the in-flight run drives the+ // selected model — the row should show the run-derived "Processing" badge,+ // not residency. Hold the run open so the badge stays mounted while asserting.+ let releaseRun;+ const runGate = new Promise((resolve) => { releaseRun = resolve; });+ streamLocalLlmTest.mockImplementation(async () => {+ await runGate;+ return { backend: 'ollama', modelId: 'command-r-plus:104b', text: 'ok', runId: 'r1', timings: {} };+ });++ renderPlayground();+ await waitFor(() => expect(screen.getAllByText('command-r-plus:104b').length).toBeGreaterThan(0));++ fireEvent.click(screen.getByText('Run chat'));++ await waitFor(() => expect(screen.getByText('Processing')).toBeTruthy());+ expect(screen.queryByText(/In memory/)).toBeNull();++ releaseRun();+ });+it('renders a live "Thinking" block for streamed reasoning, separate from the answer', async () => {// Drive reasoning tokens then a content token through the streaming callback,// mirroring a reasoning model (deepseek-r1, qwq) that emits its chain-of-thought