From 232af1d4a5343da55423d09cd87bf4e70289aa2b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 06:42:30 +0100 Subject: [PATCH] refactor: align dreaming status with sqlite labels --- ui/src/ui/controllers/dreaming.test.ts | 4 ++++ ui/src/ui/controllers/dreaming.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ui/src/ui/controllers/dreaming.test.ts b/ui/src/ui/controllers/dreaming.test.ts index 1f7e38f7f27..3be69b3e803 100644 --- a/ui/src/ui/controllers/dreaming.test.ts +++ b/ui/src/ui/controllers/dreaming.test.ts @@ -76,6 +76,8 @@ describe("dreaming controller", () => { remPhaseHitCount: 4, promotedTotal: 21, promotedToday: 2, + storeLabel: "sqlite:plugin_state_entries/memory-core/dreaming.short-term-recall", + phaseSignalLabel: "sqlite:plugin_state_entries/memory-core/dreaming.phase-signals", shortTermEntries: [ { key: "memory:memory/2026-04-05.md:1:2", @@ -171,6 +173,8 @@ describe("dreaming controller", () => { totalSignalCount: 20, phaseSignalCount: 11, promotedToday: 2, + storeLabel: "sqlite:plugin_state_entries/memory-core/dreaming.short-term-recall", + phaseSignalLabel: "sqlite:plugin_state_entries/memory-core/dreaming.phase-signals", shortTermEntries: [ expect.objectContaining({ snippet: "Emma prefers shorter, lower-pressure check-ins.", diff --git a/ui/src/ui/controllers/dreaming.ts b/ui/src/ui/controllers/dreaming.ts index 099cb67ba18..3fb010ee1d8 100644 --- a/ui/src/ui/controllers/dreaming.ts +++ b/ui/src/ui/controllers/dreaming.ts @@ -67,8 +67,8 @@ export type DreamingStatus = { remPhaseHitCount: number; promotedTotal: number; promotedToday: number; - storePath?: string; - phaseSignalPath?: string; + storeLabel?: string; + phaseSignalLabel?: string; storeError?: string; phaseSignalError?: string; shortTermEntries: DreamingEntry[]; @@ -683,8 +683,8 @@ function normalizeDreamingStatus(raw: unknown): DreamingStatus | null { } : undefined; const timezone = normalizeTrimmedString(record.timezone); - const storePath = normalizeTrimmedString(record.storePath); - const phaseSignalPath = normalizeTrimmedString(record.phaseSignalPath); + const storeLabel = normalizeTrimmedString(record.storeLabel); + const phaseSignalLabel = normalizeTrimmedString(record.phaseSignalLabel); const storeError = normalizeTrimmedString(record.storeError); const phaseSignalError = normalizeTrimmedString(record.phaseSignalError); @@ -704,8 +704,8 @@ function normalizeDreamingStatus(raw: unknown): DreamingStatus | null { remPhaseHitCount: normalizeFiniteInt(record.remPhaseHitCount, 0), promotedTotal: normalizeFiniteInt(record.promotedTotal, 0), promotedToday: normalizeFiniteInt(record.promotedToday, 0), - ...(storePath ? { storePath } : {}), - ...(phaseSignalPath ? { phaseSignalPath } : {}), + ...(storeLabel ? { storeLabel } : {}), + ...(phaseSignalLabel ? { phaseSignalLabel } : {}), ...(storeError ? { storeError } : {}), ...(phaseSignalError ? { phaseSignalError } : {}), shortTermEntries: normalizeDreamingEntries(record.shortTermEntries),