Merge pull request #692: feat(header): opt-in GPU and CPU clock readings after CPU and MEM

Conflict in config/test-suites.ts resolved by keeping both sides: #689's
header-divider and #692's header-host-sensors browser tests are both
listed in BROWSER_TEST_GLOBS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-24 15:25:02 +02:00
commit c7b6226cb0
19 files changed
+1389 -17

No files matched your search

+5 -10
View File
@@ -2435,8 +2435,6 @@ class CodemanApp {
if (data.parentSessionId) this.markConnectionLineEntering?.('lineage:' + data.id);
this.renderSessionTabs();
this.updateCost();
// Start stats polling when first session appears
if (this.sessions.size === 1) this.startSystemStatsPolling();
if (this._urlSessionId === data.id) this._selectUrlSession();
}
@@ -2492,8 +2490,8 @@ class CodemanApp {
this.renderSessionTabs();
this.renderRalphStatePanel(); // Update ralph panel after session deleted
this.renderProjectInsightsPanel(); // Update project insights panel after session deleted
// Stop stats polling when no sessions remain
if (this.sessions.size === 0) this.stopSystemStatsPolling();
// Stats polling keeps going with no session left: the header shows CPU, MEM and the opt-in readings
// regardless, and would sit at "--" otherwise.
}
// SSE wrappers — skip terminal events while WebSocket owns active terminal I/O.
@@ -5064,12 +5062,9 @@ class CodemanApp {
// survive reloads and SSE reconnects (methods in approvals-ui.js).
this.seedApprovals?.();
// Start/stop system stats polling based on session count
if (this.sessions.size > 0) {
this.startSystemStatsPolling();
} else {
this.stopSystemStatsPolling();
}
// Poll the header stats whether or not a session is open (fetchSystemStats skips the call while the
// stats pill is hidden); starting restarts the interval, so only start it once.
if (!this.systemStatsInterval) this.startSystemStatsPolling();
// CRITICAL: Clean up all floating windows before loading new subagents
// This prevents memory leaks from ResizeObservers, EventSources, and DOM elements