mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Remove unnecessary snapshot refresh from session cards
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
edc2450ab8
commit
b6d45e6c75
1 changed files with 0 additions and 14 deletions
|
|
@ -29,13 +29,11 @@ export class SessionCard extends LitElement {
|
||||||
@state() private killing = false;
|
@state() private killing = false;
|
||||||
@state() private killingFrame = 0;
|
@state() private killingFrame = 0;
|
||||||
|
|
||||||
private refreshInterval: number | null = null;
|
|
||||||
private killingInterval: number | null = null;
|
private killingInterval: number | null = null;
|
||||||
|
|
||||||
firstUpdated(changedProperties: PropertyValues) {
|
firstUpdated(changedProperties: PropertyValues) {
|
||||||
super.firstUpdated(changedProperties);
|
super.firstUpdated(changedProperties);
|
||||||
this.setupTerminal();
|
this.setupTerminal();
|
||||||
this.startRefresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updated(changedProperties: PropertyValues) {
|
updated(changedProperties: PropertyValues) {
|
||||||
|
|
@ -52,9 +50,6 @@ export class SessionCard extends LitElement {
|
||||||
|
|
||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
super.disconnectedCallback();
|
super.disconnectedCallback();
|
||||||
if (this.refreshInterval) {
|
|
||||||
clearInterval(this.refreshInterval);
|
|
||||||
}
|
|
||||||
if (this.killingInterval) {
|
if (this.killingInterval) {
|
||||||
clearInterval(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() {
|
private handleCardClick() {
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new CustomEvent('session-select', {
|
new CustomEvent('session-select', {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue