Relationships
#3450 Dashboard: an idle, visible tab keeps counting runs that have aged out of a preset time range
Opened by hammz · 10/14/2026
Description
Follow-up to #3444. That change stops the dashboard re-sending run queries every minute. A preset range is now sent as a relative duration (since: 7d), and a run summary is re-read only on run activity from the health snapshot (a run starting or finishing) or when the tab comes back into view, at most once per 30 s.
The old minute-by-minute re-key had one side effect that is now gone: a short preset aged out old runs. On Last 1h, a run started 61 minutes ago dropped out of the counts within a minute. Now a tab that stays visible with no run activity keeps counting it, until a run starts or finishes, the tab is hidden and shown again, or the page is reloaded. This affects the Overview stats and chart (whose axis still rolls with the minute while its data stays put), the Workflows totals, Executions and Approvals, and the schedule and webhook summaries.
The schedule and webhook run lists (useTriggerRuns, a run search returning rows and a total) have the same gap.
Steps to reproduce
- Run a workflow once, then leave the Overview or Workflows page open and visible on the Last 1h preset, with no other runs.
- After an hour, the run is still counted.
Proposed fix
- Serve:
summarizeWorkflowRuns(src/libswamp/workflows/run_summary.ts) adds an optionaloldestStartedAt: the start time of the oldest counted run. - Dashboard: for a preset range,
useRunSummaryschedules one refetch at the moment that run leaves the window. The delay is oldestStartedAt minus the summary's echoed since, both from serve's clock, so client clock skew does not matter. It goes through the existing run-activity throttle (30 s, held while hidden). Each answer sets the next deadline. Custom and all-time ranges do not move and need nothing. - Older serves without the field schedule nothing, the same as today.
- Request volume then follows runs ageing out of the window, not how long a tab stays open. A window with no runs costs nothing.
- Trigger run lists: they need their own approach, for example the oldest row's start time when the page holds every match, or a field like the one above on the run search.
Related: #3444.
In Progress
Click a lifecycle step above to view its details.
Sign in to post a ripple.