mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 16:39:42 +02:00
fix: actually jump into restored session on reload, not just highlight tab
handleInit is called twice on page load (loadState + SSE init). The second call cleared terminal state but skipped selectSession because activeSessionId was still set from the first call. Now reset activeSessionId before re-selecting so the terminal buffer always gets reloaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ When user says "COM":
|
|||||||
1. Increment version in BOTH `package.json` AND `CLAUDE.md` (verify they match with `grep version package.json && grep Version CLAUDE.md`)
|
1. Increment version in BOTH `package.json` AND `CLAUDE.md` (verify they match with `grep version package.json && grep Version CLAUDE.md`)
|
||||||
2. Run: `git add -A && git commit -m "chore: bump version to X.XXXX" && git push && npm run build && systemctl --user restart claudeman-web`
|
2. Run: `git add -A && git commit -m "chore: bump version to X.XXXX" && git push && npm run build && systemctl --user restart claudeman-web`
|
||||||
|
|
||||||
**Version**: 0.1491 (must match `package.json` for npm publish)
|
**Version**: 0.1492 (must match `package.json` for npm publish)
|
||||||
|
|
||||||
## Project Overview
|
## Project Overview
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "claudeman",
|
"name": "claudeman",
|
||||||
"version": "0.1491",
|
"version": "0.1492",
|
||||||
"description": "The missing control plane for Claude Code - run 20 autonomous agents with real-time monitoring and session persistence",
|
"description": "The missing control plane for Claude Code - run 20 autonomous agents with real-time monitoring and session persistence",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
+11
-4
@@ -3211,10 +3211,17 @@ class ClaudemanApp {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore previously active session (survives page reload), or fall back to first
|
// Restore previously active session (survives page reload + SSE reconnect)
|
||||||
if (this.sessionOrder.length > 0 && !this.activeSessionId) {
|
// Must always re-select because handleInit clears terminal state above.
|
||||||
let restoreId = null;
|
// Reset activeSessionId so selectSession doesn't early-return.
|
||||||
try { restoreId = localStorage.getItem('claudeman-active-session'); } catch {}
|
const previousActiveId = this.activeSessionId;
|
||||||
|
this.activeSessionId = null;
|
||||||
|
if (this.sessionOrder.length > 0) {
|
||||||
|
// Priority: current active > localStorage > first session
|
||||||
|
let restoreId = previousActiveId;
|
||||||
|
if (!restoreId || !this.sessions.has(restoreId)) {
|
||||||
|
try { restoreId = localStorage.getItem('claudeman-active-session'); } catch {}
|
||||||
|
}
|
||||||
if (restoreId && this.sessions.has(restoreId)) {
|
if (restoreId && this.sessions.has(restoreId)) {
|
||||||
this.selectSession(restoreId);
|
this.selectSession(restoreId);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user