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(memory): Ort der 3.0.1-Zeile korrigiert und Rendertest gegen den Chip

purple8f8895be355d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 31733ec5..de14be2a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -136,9 +136,10 @@ installs stop losing environment variables to it.
shows.
- **ltx-2 LoRA renders in the desktop app now carry a credit cost**, matching
the web catalog, instead of pricing as free.
-- **The "Memory sources" note under every AI answer is gone.** The purple
- brain icon in the top bar already shows when memory is active, so repeating
- it under each reply only added clutter.
+- **The "Memory sources" chip under every AI answer is gone.** The purple
+ brain icon in the session strip below the transcript, right above the
+ composer, still opens Memory, so repeating it under each reply only added
+ clutter.
## [3.0.0] - 2026-09-13
diff --git a/src/components/chat/__tests__/memory-sources-chip-is-gone.test.ts b/src/components/chat/__tests__/memory-sources-chip-is-gone.test.ts
new file mode 100644
index 00000000..d367ac3c
--- /dev/null
+++ b/src/components/chat/__tests__/memory-sources-chip-is-gone.test.ts
@@ -0,0 +1,131 @@
+/**
+ * @vitest-environment jsdom
+ *
+ * Auflage C2 (Abnahme 19.09.2026, review-ui-flashchip-memchips.md): the
+ * regression guard in e2e/memory-hook-sources.spec.ts only checked for the
+ * literal text "Memory sources". A reply renamed to something like "Sources
+ * from memory" would still pass that check. This file adds a real render
+ * test instead: it mounts the actual ChatView with an assistant message,
+ * including one that still carries the retired `memorySources` field from an
+ * old saved chat (see chatStore-migration.test.ts), and asserts no chip and
+ * no <details>/<summary> element renders under the answer.
+ *
+ * NEGATIVE CONTROL for the query itself: a separate describe block mounts a
+ * plain stand-in `<details><summary>Memory sources (1)</summary>...</details>`
+ * markup (not the deleted component, which no longer exists) and proves the
+ * same assertions used above WOULD fail against it. That is the evidence the
+ * checks below are not vacuously true.
+ *
+ * Run: npx vitest run src/components/chat/__tests__/memory-sources-chip-is-gone.test.ts
+ */
+import { describe, it, expect, beforeEach, afterEach } from 'vitest'
+import { createElement } from 'react'
+import { render, screen, cleanup } from '@testing-library/react'
+import { ChatView } from '../ChatView'
+import { useChatStore } from '../../../stores/chatStore'
+import { useModelStore } from '../../../stores/modelStore'
+import { useUIStore } from '../../../stores/uiStore'
+import { useCompareStore } from '../../../stores/compareStore'
+import { useMemoryStore } from '../../../stores/memoryStore'
+import type { Conversation, Message } from '../../../types/chat'
+import type { MemoryFile } from '../../../types/agent-mode'
+
+const NOW = Date.UTC(2026, 8, 19, 12, 0, 0)
+const MODEL = 'openai::Qwen3-4B-Q4_K_M'
+
+/** An entry the retired MemorySources chip would have matched and shown. */
+const memoryEntry: MemoryFile = {
+ id: 'old-1',
+ type: 'user',
+ title: 'A remembered fact',
+ description: 'test entry',
+ content: 'SOURCEPROOF content',
+ tags: [],
+ createdAt: NOW - 5000,
+ updatedAt: NOW - 5000,
+ source: 'manual',
+ scope: 'legacy',
+}
+
+/** An assistant answer still carrying the field an older build persisted.
+ * `Message` no longer declares `memorySources`; the cast mirrors what an
+ * old saved chat looks like once loaded, same shape as
+ * chatStore-migration.test.ts. */
+function legacyAnswer(): Message {
+ return {
+ id: 'm2',
+ role: 'assistant',
+ content: 'the answer',
+ timestamp: NOW - 1000,
+ modelId: MODEL,
+ memorySources: { ids: ['old-1'], scope: 'legacy', owner: 'A' },
+ } as unknown as Message
+}
+
+const conversation = (assistant: Message): Conversation => ({
+ id: 'c1',
+ title: 'MEMCHIP-TEST',
+ messages: [
+ { id: 'm1', role: 'user', content: 'q', timestamp: NOW - 2000 },
+ assistant,
+ ],
+ model: MODEL,
+ systemPrompt: '',
+ mode: 'lu',
+ createdAt: NOW - 3000,
+ updatedAt: NOW - 1000,
+} as Conversation)
+
+function show(conv: Conversation) {
+ useChatStore.setState({ conversations: [conv], activeConversationId: conv.id })
+ useModelStore.setState({ activeModel: MODEL, models: [] })
+ render(createElement(ChatView))
+}
+
+beforeEach(() => {
+ useUIStore.setState({ currentView: 'chat', sidebarOpen: false })
+ useCompareStore.setState({ isComparing: false })
+ useMemoryStore.setState({ entries: [memoryEntry], activeMemoryOwner: 'A' })
+})
+
+afterEach(() => {
+ cleanup()
+})
+
+describe('no per-answer memory chip renders, real component, real store', () => {
+ it('an ordinary assistant answer shows no "Memory sources" text', () => {
+ show(conversation({ id: 'm2', role: 'assistant', content: 'the answer', timestamp: NOW - 1000, modelId: MODEL }))
+ expect(screen.queryByText(/Memory sources/i)).toBeNull()
+ })
+
+ it('an ordinary assistant answer has no <details>/<summary> under it', () => {
+ show(conversation({ id: 'm2', role: 'assistant', content: 'the answer', timestamp: NOW - 1000, modelId: MODEL }))
+ expect(document.querySelectorAll('details, summary')).toHaveLength(0)
+ })
+
+ it('an OLD message carrying the retired memorySources field renders the same: nothing', () => {
+ // The matching entry is in the store (memoryEntry, owner 'A') on purpose:
+ // if MessageBubble still read message.memorySources, this is exactly the
+ // input that would have produced "Memory sources (1)".
+ show(conversation(legacyAnswer()))
+ expect(screen.queryByText(/Memory sources/i)).toBeNull()
+ expect(document.querySelectorAll('details, summary')).toHaveLength(0)
+ expect(screen.getByText('the answer')).not.toBeNull()
+ })
+})
+
+describe('NEGATIVE CONTROL: the assertions above are not vacuous', () => {
+ function ChipStandIn() {
+ // Mirrors the shape of the deleted MemorySources.tsx output, not the
+ // component itself (which no longer exists). Only proves the queries
+ // used above can find a chip when one is actually there.
+ return createElement('details', { className: 'mt-2 text-xs' },
+ createElement('summary', null, 'Memory sources (1)'))
+ }
+
+ it('the same queries DO find a chip when one is rendered', () => {
+ render(createElement(ChipStandIn))
+ expect(screen.queryByText(/Memory sources/i)).not.toBeNull()
+ expect(document.querySelectorAll('details, summary')).toHaveLength(2)
+ })
+})
diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts
index fc1760e0..d0e94133 100644
--- a/src/lib/release-notes.ts
+++ b/src/lib/release-notes.ts
@@ -158,7 +158,7 @@ export const RELEASE_NOTES: ReleaseNote[] = [
'Dismissing the stale model notice in the chat header now actually dismisses it, instead of it reappearing on the very next update.',
'The reason the Coding Agent will not let go of its current folder is now shown as a visible line, instead of only a tooltip a disabled button never shows.',
'ltx-2 LoRA renders in the desktop app now carry a credit cost, matching the web catalog, instead of pricing as free.',
- 'The Memory sources note under every AI answer is gone; the purple brain icon in the top bar already shows when memory is active.',
+ 'The Memory sources chip under every AI answer is gone; the purple brain icon in the session strip below the transcript, right above the composer, still opens Memory.',
],
},
],
diff --git a/src/stores/__tests__/chatStore-migration.test.ts b/src/stores/__tests__/chatStore-migration.test.ts
index f720fed0..15b8ba16 100644
--- a/src/stores/__tests__/chatStore-migration.test.ts
+++ b/src/stores/__tests__/chatStore-migration.test.ts
@@ -160,8 +160,9 @@ describe('chatStore — migratePersistedChat', () => {
})
// The per-answer "Memory sources" chip (and the field feeding it) was
- // removed 2026-09-19: the purple brain icon in the top bar already shows
- // when memory is active, so repeating it under every reply was dropped.
+ // removed 2026-09-19: the purple brain icon in the session strip below
+ // the transcript still opens Memory, so repeating it under every reply
+ // was dropped.
// A conversation saved by an older build can still carry `memorySources`
// on its messages. There is no migration for it, it is simply ignored.
it('loads an old message carrying the retired memorySources field without breaking', () => {