feat(analytics): persisted auto-refresh interval for SQL dashboards#779
Draft
zuchka wants to merge 1 commit into
Draft
feat(analytics): persisted auto-refresh interval for SQL dashboards#779zuchka wants to merge 1 commit into
zuchka wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Adds a `refreshInterval?: number` field to `SqlDashboardConfig` that wires through to React Query's `refetchInterval` on every panel. A Select control in the filter row (Off / 0.5 s / 1 s / 5 s / 10 s / 30 s) lets users set the interval per-dashboard; the value is persisted to the dashboard config so it survives page reloads. When `refetchInterval` is active, `staleTime` is set to 0 so React Query always treats the cache as stale and fires every tick. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
f54c8ea to
e8da298
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Summary
refreshInterval?: numbertoSqlDashboardConfig— stored in the dashboard config, survives page reloadsSqlChartCard→SqlChart→useSqlQueryas React Query'srefetchIntervalstaleTime: 0whenrefetchIntervalis active so every tick fires a real fetchSelectcontrol to the filter row on every dashboard (Off / 0.5 s / 1 s / 5 s / 10 s / 30 s), saved via the existingpersist()pathrefreshIntervalset are completely unaffected (default Off)Files changed
app/pages/adhoc/sql-dashboard/types.tsrefreshInterval?: numbertoSqlDashboardConfigapp/lib/sql-query.tsstaleTime: 0whenrefetchIntervalis setapp/components/dashboard/SqlChart.tsxrefreshIntervaltouseSqlQueryapp/pages/adhoc/sql-dashboard/SqlChartCard.tsxrefreshIntervaltoSqlChartapp/pages/adhoc/sql-dashboard/index.tsxTest plan
"refreshInterval": 1000auto-sets the dropdown to 1 s on first load🤖 Generated with Claude Code