Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(ui): the panel says whose memory it is, and the confirm says the node goes too
enesc0ec191db7b7
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex 2f90b27dc..ec118d819 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -6541,7 +6541,13 @@ export function Canvas() {const closeSession = useCallback((projectId: string, id: string, alsoOnConfirm?: () => void) => {setConfirm({- message: 'End this session? This stops its tmux session.',+ // Both halves, because this does both: the tmux session ends AND the node is removed from+ // its canvas (either branch below). The wording came from the sessions sidebar, where the+ // node going too is the obvious intent — but the session-memory panel reuses this path, and+ // there the user's intent is reclaiming RAM, for which killing the node is a side effect+ // they have to be told about. (Keeping the node would need a second destroy path, which is+ // deliberately NOT what this is.)+ message: 'End this session? This stops its tmux session and removes the node from its canvas.',confirmLabel: 'End session',danger: true,onConfirm: () => {@@ -6602,9 +6608,12 @@ export function Canvas() {return}setConfirm({+ // The orphan wording stays as it is: there is no node to remove, which is the whole point+ // of the row. The other branch is a node the sweep saw but this click could not resolve an+ // owner for, so it says what the owner path says.message: orphan? 'End this session? It has no node on any canvas — this stops its tmux session.'- : 'End this session? This stops its tmux session.',+ : 'End this session? This stops its tmux session and removes the node from its canvas.',confirmLabel: 'End session',danger: true,onConfirm: () => {diff --git a/src/renderer/canvas/canvas-chrome.test.tsx b/src/renderer/canvas/canvas-wiring.test.tsxsimilarity index 79%rename from src/renderer/canvas/canvas-chrome.test.tsxrename to src/renderer/canvas/canvas-wiring.test.tsxindex 936127c92..0eee01391 100644--- a/src/renderer/canvas/canvas-chrome.test.tsx+++ b/src/renderer/canvas/canvas-wiring.test.tsx@@ -77,3 +77,20 @@ describe('the session-memory panel is the one caller that fans a kill across socexpect(CANVAS_SRC).toContain('.killSessions(id, nodeIds)')})})++describe('the end-session confirm describes both things it does', () => {+ // `closeSession` stops the tmux session AND deletes the canvas node. The wording is inherited+ // from the sessions sidebar, where deleting the node is the obvious intent — but the+ // session-memory panel reuses the same path, and there the user came to reclaim RAM. Saying only+ // "this stops its tmux session" makes the node's removal a surprise on the one surface whose+ // purpose invites it. (Keeping the node would need a SECOND destroy path; deliberately not built.)+ it('says the node goes too, on every owned-session confirm', () => {+ const owned = CANVAS_SRC.match(/End this session\?[^']*/g) ?? []+ expect(owned.length).toBeGreaterThanOrEqual(3)+ for (const m of owned) {+ // The orphan row is the one exception, and it is honest: there is no node to remove.+ if (m.includes('no node on any canvas')) continue+ expect(m).toContain('removes the node from its canvas')+ }+ })+})diff --git a/src/renderer/components/SessionMemoryPanel.test.tsx b/src/renderer/components/SessionMemoryPanel.test.tsxindex d7745d6ad..7702419ab 100644--- a/src/renderer/components/SessionMemoryPanel.test.tsx+++ b/src/renderer/components/SessionMemoryPanel.test.tsx@@ -325,6 +325,24 @@ describe('SessionMemoryPanel', () => {expect(host.querySelector('.sessmem-panel__count')?.textContent).toBe('4 sessions')})+ // The feature's own premise: the user who prompted it blamed nodeterm for memory that is the+ // agent CLI's own V8 heap. Numbers rendered inside nodeterm's chrome with nothing said about+ // whose they are let this panel repeat the mistake it exists to correct, and that fact lived only+ // in the docs.+ it('says whose memory it is showing', () => {+ mount()+ const attrib = host.querySelector('.sessmem-panel__attrib')?.textContent ?? ''+ expect(attrib).toMatch(/not nodeterm/i)+ })++ it('says it in EVERY state, including a failed sweep', () => {+ // A failed measurement is exactly when a user is most likely to be blaming the wrong process,+ // so the line must not hang off the rows.+ mount({ ok: false, rows: [] })+ expect(host.querySelector('.sessmem-panel__note')?.textContent).toContain('Could not measure')+ expect(host.querySelector('.sessmem-panel__attrib')?.textContent ?? '').toMatch(/not nodeterm/i)+ })+it('never touches the host poll — the pill owns that timer', () => {// `timer` and `activeScope` in the store are MODULE singletons. A `stopHostPoll` here would// clear the pill's interval on close with nothing left to restart it, and the pill's numberdiff --git a/src/renderer/components/SessionMemoryPanel.tsx b/src/renderer/components/SessionMemoryPanel.tsxindex f2f4a8cfc..5e6b0a2d4 100644--- a/src/renderer/components/SessionMemoryPanel.tsx+++ b/src/renderer/components/SessionMemoryPanel.tsx@@ -190,6 +190,17 @@ export function SessionMemoryPanel({{body}+ {/* Whose memory this is. The feature exists because a user reported "Claude terminals are+ killing my memory" — their NUMBER was right and their attribution was wrong: it is the+ agent CLI's own V8 heap, and nodeterm allocates none of it. Showing those numbers inside+ nodeterm's chrome with nothing said about it lets the panel repeat the mistake it was+ built to correct. One line, no figures: the measurements vary per machine and per model,+ and quoting one here would age into a lie (docs/session-memory.md §1 has them). */}+ <div className="sessmem-panel__attrib">+ Memory held by each session's own processes — the agent CLI and what it spawned, not+ nodeterm itself.+ </div>+<div className="sessmem-panel__foot"><span className="sessmem-panel__count">{measured ? `${views.length} session${views.length === 1 ? '' : 's'}` : ''}diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex f64ea3494..90b32d374 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -5808,6 +5808,14 @@ body,color: rgba(var(--tint-rgb), 0.45);font-variant-numeric: tabular-nums;}+/* The attribution line: quieter than a row, above the foot rule, and rendered in EVERY state — a+ failed sweep is exactly when a user is most likely to be blaming the wrong process. */+.sessmem-panel__attrib {+ margin-top: 10px;+ font-size: 11px;+ line-height: 1.4;+ color: rgba(var(--tint-rgb), 0.45);+}.sessmem-panel__foot {display: flex;align-items: center;