From b6d45e6c75ec3d2f5cff325f476fbb5e807b9893 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 18 Jun 2025 06:26:59 +0200 Subject: [PATCH] Remove unnecessary snapshot refresh from session cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed 10-second refresh interval that was fetching new snapshots continuously - Initial snapshot load is sufficient for session card preview - Reduces server load and unnecessary network requests - Session cards now load once and display static snapshot content - Interactive session view still provides real-time updates via streaming 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- web/src/client/components/session-card.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/web/src/client/components/session-card.ts b/web/src/client/components/session-card.ts index 203b749b..dbf6e6cf 100644 --- a/web/src/client/components/session-card.ts +++ b/web/src/client/components/session-card.ts @@ -29,13 +29,11 @@ export class SessionCard extends LitElement { @state() private killing = false; @state() private killingFrame = 0; - private refreshInterval: number | null = null; private killingInterval: number | null = null; firstUpdated(changedProperties: PropertyValues) { super.firstUpdated(changedProperties); this.setupTerminal(); - this.startRefresh(); } updated(changedProperties: PropertyValues) { @@ -52,9 +50,6 @@ export class SessionCard extends LitElement { disconnectedCallback() { super.disconnectedCallback(); - if (this.refreshInterval) { - clearInterval(this.refreshInterval); - } if (this.killingInterval) { clearInterval(this.killingInterval); } @@ -117,15 +112,6 @@ export class SessionCard extends LitElement { } } - private startRefresh() { - this.refreshInterval = window.setInterval(async () => { - if (this.terminal) { - const url = `/api/sessions/${this.session.id}/snapshot`; - await this.loadSnapshot(url); - } - }, 10000); // Refresh every 10 seconds - } - private handleCardClick() { this.dispatchEvent( new CustomEvent('session-select', {