feat: improve Monitor panel UX and preserve session names

- Monitor panel now opens by default on webapp start
- Replace "Reconcile" button with refresh icon (↻)
- Change close button to toggle (▼/▲) for collapse/expand
- Preserve session display names when saving screen info
- Use stored name when restoring sessions (no more "Restored:" prefix)
- Show session name in Monitor panel instead of screen name
- Kill screen session when closing a tab

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-19 04:22:41 +01:00
co-authored by Claude Opus 4.5
parent 34c86488dd
commit ea9618e281
7 changed files with 55 additions and 8 deletions
+13 -2
View File
@@ -306,7 +306,7 @@ export class Session extends EventEmitter {
// If screen wrapping is enabled, create a screen session first
if (this._useScreen && this._screenManager) {
try {
this._screenSession = await this._screenManager.createScreen(this.id, this.workingDir, 'claude');
this._screenSession = await this._screenManager.createScreen(this.id, this.workingDir, 'claude', this._name);
console.log('[Session] Created screen session:', this._screenSession.screenName);
// Wait a moment for screen to fully start
@@ -424,7 +424,7 @@ export class Session extends EventEmitter {
// If screen wrapping is enabled, create a screen session first
if (this._useScreen && this._screenManager) {
try {
this._screenSession = await this._screenManager.createScreen(this.id, this.workingDir, 'shell');
this._screenSession = await this._screenManager.createScreen(this.id, this.workingDir, 'shell', this._name);
console.log('[Session] Created screen session:', this._screenSession.screenName);
// Wait a moment for screen to fully start
@@ -767,6 +767,17 @@ export class Session extends EventEmitter {
this._status = 'stopped';
this._currentTaskId = null;
// Kill the associated screen session if any
if (this._screenSession && this._screenManager) {
try {
await this._screenManager.killScreen(this.id);
console.log('[Session] Killed screen session:', this._screenSession.screenName);
} catch (err) {
console.error('[Session] Failed to kill screen session:', err);
}
this._screenSession = null;
}
if (this.rejectPromise) {
this.rejectPromise(new Error('Session stopped'));
this.resolvePromise = null;