Symptom
After a soft reload of a session, feed-debug entries stop reaching disk until the ring's ids climb past the pre-reload cursor; nothing is logged.
Mechanism
src/renderer/src/workspace/hook/actions/session.ts (~142-186) replaces the runtime with emptyRuntime() fields, so feedDebugNextId restarts at 1, while refs.persistedFeedDebugIdRef (and main's process-local lastWrittenFeedDebugId in src/main/storage/feedDebugLog.ts) keep the old, larger cursor. selectFeedDebugAppendBatch filters entry.id > lastPersistedId, so every new entry is "already persisted" until the counter passes the old value; main would drop them for the same reason.
Expected
A reload must reset (or namespace) both cursors for that session — e.g. delete the renderer's persisted/in-flight cursor entries on reload and have main key lastWrittenFeedDebugId by an epoch carried in the batch — so the reloaded session's timeline is written from its first entry.
Evidence
Found during the review of #750 (pre-existing, identical before and after that PR).
Refs #748, #750, #722.
Symptom
After a soft reload of a session, feed-debug entries stop reaching disk until the ring's ids climb past the pre-reload cursor; nothing is logged.
Mechanism
src/renderer/src/workspace/hook/actions/session.ts(~142-186) replaces the runtime withemptyRuntime()fields, sofeedDebugNextIdrestarts at 1, whilerefs.persistedFeedDebugIdRef(and main's process-locallastWrittenFeedDebugIdinsrc/main/storage/feedDebugLog.ts) keep the old, larger cursor.selectFeedDebugAppendBatchfiltersentry.id > lastPersistedId, so every new entry is "already persisted" until the counter passes the old value; main would drop them for the same reason.Expected
A reload must reset (or namespace) both cursors for that session — e.g. delete the renderer's persisted/in-flight cursor entries on reload and have main key
lastWrittenFeedDebugIdby an epoch carried in the batch — so the reloaded session's timeline is written from its first entry.Evidence
Found during the review of #750 (pre-existing, identical before and after that PR).
Refs #748, #750, #722.