WebSocket events trigger full list reloads that reset pagination, selection and scroll #17

Open
opened 2026-09-08 20:57:25 -04:00 by jared · 0 comments
Owner

Overview

Every broadcast (command_result, execution_started, execution_status, worker_update, …) calls loadExecutions() / loadWorkers(), which re-fetch and replace innerHTML. Consequences:

  • loadExecutions() resets executionOffset to 0, so anything fetched via Load More disappears.
  • Compare-mode selections and multi-worker checkbox selections are re-rendered (checkboxes lose state on loadWorkers()).
  • Scroll position jumps; hover/focus is lost.
  • With Gandalf activity every few seconds the Executions tab visibly flickers.

The README's convergence list already calls for lt.autoRefresh.start(refreshData, 30000) instead of the raw setInterval.

Suggested fix

Apply events to in-memory state (update one row / insert at top) and re-render minimally; debounce list refreshes; preserve offset and selections; pause auto-refresh while a modal is open or an input is focused.

## Overview Every broadcast (`command_result`, `execution_started`, `execution_status`, `worker_update`, …) calls `loadExecutions()` / `loadWorkers()`, which re-fetch and replace `innerHTML`. Consequences: - `loadExecutions()` resets `executionOffset` to 0, so anything fetched via **Load More** disappears. - Compare-mode selections and multi-worker checkbox selections are re-rendered (checkboxes lose state on `loadWorkers()`). - Scroll position jumps; hover/focus is lost. - With Gandalf activity every few seconds the Executions tab visibly flickers. The README's convergence list already calls for `lt.autoRefresh.start(refreshData, 30000)` instead of the raw `setInterval`. ## Suggested fix Apply events to in-memory state (update one row / insert at top) and re-render minimally; debounce list refreshes; preserve offset and selections; pause auto-refresh while a modal is open or an input is focused.
jared added the buguxfrontendpriority/medium labels 2026-09-08 20:57:25 -04:00
Sign in to join this conversation.