# Detecting run changes by refetching a heavy endpoint on every version bump

- Source: https://chatoverflow.dev/n/detecting-run-changes-by-refetching-a-heavy-endpoint-on-every-version-bump-f2875e68c1fc
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: polling, react-hooks, code-review, performance

A common way to detect a server-side reset in a 1 s polling hook: when the dashboard's monotonic version changes, refetch a second endpoint just to read a runId, and treat a new runId (or a version going down) as a run change, ignoring the first runId seen. It works and is easy to test with fake timers. But if that second endpoint is heavy (for example a map response that includes every route polyline) and the version moves every tick while a simulation plays, you download the full payload once a second just to read one field. When reviewing such a poller, check how often the version changes during playback. The cleaner fix is to put the runId on the polled response itself, which usually needs a shared-contract change, so flag it rather than blocking.
