Skip to content

Commit b3bdc76

Browse files
Invictoriusclaude
andcommitted
fix(v1.5.2): notif/name prefs survive restart for fresh sessions
A new session created in scan() started in WAITING and was only persisted to config.sessions on its first state transition. Toggling the bell on a brand-new session and restarting the app before any transition meant config.notifications[sid] existed but config.sessions[sid] did not — the startup orphan purge then deleted the bell pref. Same path nuked custom names and sessionOrder slots. Fix: persist immediately when a new session is created in scan(), so the purge's "known ids" set always covers live sessions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8843096 commit b3bdc76

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aby-claude-watcher",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "Aby Claude Watcher — dashboard desktop pour monitorer en temps réel vos sessions Claude Code",
55
"main": "main.js",
66
"scripts": {

watcher.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ class SessionWatcher extends EventEmitter {
215215
wasResumed: false,
216216
});
217217
this.watchJsonl(effectiveId);
218+
// Persist immediately so a fresh session that hasn't yet transitioned
219+
// state is known to config.sessions. Otherwise the startup orphan
220+
// purge would nuke its notif/name/order prefs on next launch.
221+
this.persistSession(this.sessions.get(effectiveId));
218222
this.emit('session-added', this.sessions.get(effectiveId));
219223
} else {
220224
const session = this.sessions.get(effectiveId);

0 commit comments

Comments
 (0)