honor pause for query refresh#584
Merged
Merged
Conversation
Paused live updates stopped scheduled polling, but React Query still used its default focus and reconnect refetch behavior. On workflow detail pages, that could make wait data refresh when the browser regained focus even though the page-wide interval was paused. Centralize the query refresh options derived from the global interval and use them anywhere route queries already honor that setting. A paused interval now disables scheduled, focus, and reconnect refetches, while a nonzero interval preserves the existing automatic refresh behavior. Add focused coverage for the paused and enabled focus-refresh cases so the pause semantics stay tied to data fetching rather than display-only timer updates.
01271f2 to
44be8ad
Compare
brandur
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working through some screenshots of the new workflow v2 UI updates, I realized parts of the screen refreshed even though I had disabled live updates. The reason is that although paused live updates stopped the scheduled polling interval, React Query still used its default focus and reconnect refetch behavior. That meant a paused workflow detail page could still refresh workflow wait data when the browser regained focus or reconnected.
This centralizes the query refresh options derived from the global live update interval and applies them to the routes that already honor that setting. A paused interval now disables scheduled polling, focus refetches, and reconnect refetches; nonzero intervals keep the existing automatic refresh behavior.
The change includes focused regression coverage for focus-driven refetches so the pause semantics are asserted against data fetching rather than display-only timer updates.