Skip to content

Commit a1f06ba

Browse files
committed
fix(app): gate Status polling to Status-tab-active only
CodeRabbit review: when the right panel is open but the user is on the Files / Review / Terminal tab, SessionStatusConnections still polls checkServerHealth every 10 seconds, wasting work on a tab nobody is looking at. Narrow the shown gate to require both open AND sidePanelTab() === "status". The reconcile-to-empty branch in the polling effect already handles the transition, so polling stops as soon as the user switches away from Status.
1 parent ced4b44 commit a1f06ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/app/src/pages/session/session-side-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export function SessionSidePanel(props: {
269269
</Tabs.List>
270270

271271
<Tabs.Content value="status" class="min-h-0 flex-1 overflow-hidden">
272-
<SessionStatusPanel shown={open} />
272+
<SessionStatusPanel shown={() => open() && sidePanelTab() === "status"} />
273273
</Tabs.Content>
274274

275275
<Tabs.Content value="files" class="min-h-0 flex-1 overflow-hidden">

0 commit comments

Comments
 (0)