mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-03 14:09:42 +02:00
fix: persist session state after all restorations complete on restart
persistSessionState was called before the respawn controller was restored, so respawnEnabled was always saved as false during recovery. Moved the persist call to after all restorations (auto-compact, auto-clear, ralph, respawn) are applied. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -1990,7 +1990,6 @@ export class WebServer extends EventEmitter {
|
||||
}
|
||||
|
||||
this.sessions.set(session.id, session);
|
||||
this.persistSessionState(session);
|
||||
this.setupSessionListeners(session);
|
||||
|
||||
// Restore Ralph tracking state (Ralph Wiggum settings) if it was saved
|
||||
@@ -2043,6 +2042,9 @@ export class WebServer extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
// Persist full state after all restorations are applied
|
||||
this.persistSessionState(session);
|
||||
|
||||
// Mark it as restored (not started yet - user needs to attach)
|
||||
console.log(`[Server] Restored session ${session.id} from screen ${screen.screenName}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user