diff --git a/apps/mana/apps/web/src/lib/modules/memoro/stores/memos.svelte.ts b/apps/mana/apps/web/src/lib/modules/memoro/stores/memos.svelte.ts index 011f30edf..d9010bb64 100644 --- a/apps/mana/apps/web/src/lib/modules/memoro/stores/memos.svelte.ts +++ b/apps/mana/apps/web/src/lib/modules/memoro/stores/memos.svelte.ts @@ -29,6 +29,7 @@ export const memosStore = { audioDurationMs?: number; processingStatus?: LocalMemo['processingStatus']; }) { + const now = new Date().toISOString(); const newLocal: LocalMemo = { id: crypto.randomUUID(), title: data.title ?? null, @@ -41,7 +42,15 @@ export const memosStore = { isPublic: false, blueprintId: data.blueprintId ?? null, language: data.language ?? null, - }; + // createdAt + updatedAt are required by LocalMemo's type but the + // previous create() never set them — DetailView showed + // "Erstellt: Invalid Date" for every memo. The Dexie creating + // hook only auto-stamps userId + __fieldTimestamps; module + // stores have to set their own createdAt/updatedAt explicitly + // (consistent with the rest of the Mana modules). + createdAt: now, + updatedAt: now, + } as LocalMemo; const plaintextSnapshot = toMemo(newLocal); await encryptRecord('memos', newLocal); await memoTable.add(newLocal); diff --git a/apps/mana/apps/web/src/lib/modules/memoro/views/DetailView.svelte b/apps/mana/apps/web/src/lib/modules/memoro/views/DetailView.svelte index 4e9c1bae8..bc87516db 100644 --- a/apps/mana/apps/web/src/lib/modules/memoro/views/DetailView.svelte +++ b/apps/mana/apps/web/src/lib/modules/memoro/views/DetailView.svelte @@ -20,6 +20,13 @@ const detail = useDetailEntity({ id: () => memoId, table: 'memos', + // title, intro, transcript live in the encryption registry — without + // `decrypt: true` the inputs would bind to raw `enc:1:...` ciphertext + // strings instead of plaintext. Pre-existing bug surfaced when the + // LLM auto-title started populating the title field for the first + // time on 2026-04-09; previously the field was always null and the + // transcript was the only encrypted field shown, but no one noticed. + decrypt: true, onLoad: (val) => { editTitle = val.title ?? ''; editIntro = val.intro ?? '';