Skip to content

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.

fix(canvas): let the session-memory and usage popovers scroll with wheel zoom on

enes8c2240654b0d
diff --git a/src/renderer/components/SessionMemoryPanel.test.tsx b/src/renderer/components/SessionMemoryPanel.test.tsx
index 3f7081909..deece9003 100644
--- a/src/renderer/components/SessionMemoryPanel.test.tsx
+++ b/src/renderer/components/SessionMemoryPanel.test.tsx
@@ -126,6 +126,15 @@ afterEach(() => {
})
describe('SessionMemoryPanel', () => {
+ it('owns the wheel, so a plain wheel scrolls its list instead of zooming the canvas', () => {
+ // The panel is mounted inside `.flow-wrap`, whose capture-phase wheel listener (Canvas.tsx)
+ // zooms every plain wheel when Settings → "Scroll wheel zooms" is on, unless the target sits
+ // under `.nowheel`. Without the class, the row list could not be scrolled at all.
+ mount()
+ expect(host.querySelector('.sessmem-panel')?.closest('.nowheel')).not.toBeNull()
+ expect(host.querySelector('.sessmem-panel__rows')?.closest('.nowheel')).not.toBeNull()
+ })
+
it('renders every row in the order core sorted them', () => {
mount()
// No re-sort here: core already sorted by total descending, and a second sort would let the
diff --git a/src/renderer/components/SessionMemoryPanel.tsx b/src/renderer/components/SessionMemoryPanel.tsx
index 99268f8ae..c422267aa 100644
--- a/src/renderer/components/SessionMemoryPanel.tsx
+++ b/src/renderer/components/SessionMemoryPanel.tsx
@@ -253,7 +253,9 @@ export function SessionMemoryPanel({
}
return (
- <div className="sessmem-panel" id="sessmem-panel" role="region" aria-label="Session memory">
+ // `nowheel`: the panel sits inside `.flow-wrap`, whose capture-phase wheel listener zooms the
+ // canvas on a plain wheel when "Scroll wheel zooms" is on — the row list could not scroll.
+ <div className="sessmem-panel nowheel" id="sessmem-panel" role="region" aria-label="Session memory">
<div className="sessmem-panel__head">
<span className="sessmem-panel__title">Session memory</span>
{/* Which machine these numbers describe. The SSH panel is visually identical to the local
diff --git a/src/renderer/components/UsageIndicator.test.tsx b/src/renderer/components/UsageIndicator.test.tsx
index 7da82b1ce..af33f8d4a 100644
--- a/src/renderer/components/UsageIndicator.test.tsx
+++ b/src/renderer/components/UsageIndicator.test.tsx
@@ -122,3 +122,13 @@ describe('Claude usage failure readout', () => {
expect(host.querySelector('.usage-popover__empty')).toBeNull()
})
})
+
+describe('Usage popover wheel', () => {
+ it('owns the wheel, so a plain wheel scrolls the account list instead of zooming the canvas', async () => {
+ // Mounted inside `.flow-wrap`, whose capture-phase wheel listener (Canvas.tsx) zooms every
+ // plain wheel when Settings → "Scroll wheel zooms" is on, unless the target is under `.nowheel`.
+ await open(snapshot('ok', [limit]))
+ expect(host.querySelector('.usage-popover')?.closest('.nowheel')).not.toBeNull()
+ expect(host.querySelector('.usage-popover__body')?.closest('.nowheel')).not.toBeNull()
+ })
+})
diff --git a/src/renderer/components/UsageIndicator.tsx b/src/renderer/components/UsageIndicator.tsx
index 240ffa96e..fbe0cd7d3 100644
--- a/src/renderer/components/UsageIndicator.tsx
+++ b/src/renderer/components/UsageIndicator.tsx
@@ -777,7 +777,9 @@ export function UsageIndicator({
onMouseLeave={closeSoon}
>
{open && (
- <div className="usage-popover">
+ // `nowheel`: same reason as the session-memory panel — inside `.flow-wrap`, a plain wheel
+ // would zoom the canvas ("Scroll wheel zooms") instead of scrolling the account list.
+ <div className="usage-popover nowheel">
<div className="usage-popover__head">
<span className="usage-popover__title">✦ Usage</span>
{/* Tracks whichever snapshot the panel is actually showing — the local poll's, or