mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-04 14:39:42 +02:00
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:
+13
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user