dosubot[bot] commented on issue #40511: URL: https://github.com/apache/superset/issues/40511#issuecomment-4571401142
<!-- Greeting --> Hi @shelkesays! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> Good analysis. I can confirm the behavior you're describing and add some detail from the code. In `fetchCharts` [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/actions/dashboardState.js#L540-L545), the unstaggered branch looks like this: ```ts if (!interval) { chartList.forEach(chartKey => dispatch(refreshChart(chartKey, force, dashboardId)), ); return; } ``` The manual refresh button in the header explicitly passes `interval=0` [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/Header/index.jsx#L391): ```ts return boundActionCreators.onRefresh(chartIds, true, 0, dashboardInfo.id); ``` This causes the early return, completely skipping the staggered branch that reads `stagger_time` and `stagger_refresh` from dashboard metadata [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/actions/dashboardState.js#L547-L563). A minimal fix would be to pass a non-zero interval (e.g., the dashboard's `stagger_time` metadata, defaulting to 5000ms) from the `forceRefresh` callback instead of hardcoding `0`. That would route manual refresh through the same staggered branch that auto-refresh uses. Something like: ```ts const forceRefresh = useCallback(() => { if (!isLoading) { const interval = dashboardInfo.metadata?.stagger_time || 5000; return boundActionCreators.onRefresh(chartIds, true, interval, dashboardInfo.id); } return false; }, [boundActionCreators, chartIds, dashboardInfo, isLoading]); ``` Alternatively, the staggering logic in `fetchCharts` itself could be refactored so the branch decision isn't solely based on `interval` — e.g., always check `stagger_refresh` metadata regardless of the interval value, and use `stagger_time` for the delay calculation when interval is 0. Worth noting: the `stagger_refresh` and `stagger_time` values are configurable via the dashboard's JSON Metadata editor [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/faq.mdx#L115-L122), so users already have per-dashboard control over whether staggering is enabled and how long it spans. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=88dab223-549e-423b-84da-5a04369912a5) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
