mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 00:19: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:
@@ -30,6 +30,8 @@ class ClaudemanApp {
|
||||
this.loadState();
|
||||
this.loadQuickStartCases();
|
||||
this.setupEventListeners();
|
||||
// Show monitor panel by default
|
||||
this.toggleMonitorPanel();
|
||||
}
|
||||
|
||||
initTerminal() {
|
||||
@@ -1361,6 +1363,7 @@ class ClaudemanApp {
|
||||
|
||||
async toggleMonitorPanel() {
|
||||
const panel = document.getElementById('monitorPanel');
|
||||
const toggleBtn = document.getElementById('monitorToggleBtn');
|
||||
panel.classList.toggle('open');
|
||||
|
||||
if (panel.classList.contains('open')) {
|
||||
@@ -1368,9 +1371,11 @@ class ClaudemanApp {
|
||||
await this.loadScreens();
|
||||
await fetch('/api/screens/stats/start', { method: 'POST' });
|
||||
this.renderTaskPanel();
|
||||
if (toggleBtn) toggleBtn.innerHTML = '▼'; // Down arrow when open
|
||||
} else {
|
||||
// Stop stats collection when panel is closed
|
||||
await fetch('/api/screens/stats/stop', { method: 'POST' });
|
||||
if (toggleBtn) toggleBtn.innerHTML = '▲'; // Up arrow when closed
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1487,7 +1492,7 @@ class ClaudemanApp {
|
||||
<div class="process-item">
|
||||
<span class="process-mode ${modeClass}">${screen.mode}</span>
|
||||
<div class="process-info">
|
||||
<div class="process-name">${this.escapeHtml(screen.screenName)}</div>
|
||||
<div class="process-name">${this.escapeHtml(screen.name || screen.screenName)}</div>
|
||||
<div class="process-meta">
|
||||
<span class="process-stat memory">${stats.memoryMB}MB</span>
|
||||
<span class="process-stat cpu">${stats.cpuPercent}%</span>
|
||||
|
||||
Reference in New Issue
Block a user