@@ -8,7 +8,6 @@ import isEqual from 'lodash/isEqual';
88import isEqualWith from 'lodash/isEqualWith' ;
99import omit from 'lodash/omit' ;
1010import pick from 'lodash/pick' ;
11- import { createParser , useQueryState } from 'nuqs' ;
1211
1312import {
1413 createDashboard ,
@@ -1382,11 +1381,6 @@ const StyledPageHeader = styled('div')`
13821381 }
13831382` ;
13841383
1385- // 'auto' means "let widgets decide their own interval"; treat it as absent.
1386- const parseIntervalParam = createParser ( {
1387- parse : ( value : string ) : string | null => ( value === 'auto' ? null : value ) ,
1388- serialize : ( value : string ) => value ,
1389- } ) ;
13901384
13911385interface DashboardDetailWithInjectedPropsProps extends Omit <
13921386 Props ,
@@ -1412,16 +1406,15 @@ export default function DashboardDetailWithInjectedProps(
14121406 const params = useParams < RouteParams > ( ) ;
14131407 const router = useRouter ( ) ;
14141408 const [ chartInterval ] = useChartInterval ( ) ;
1415- const [ intervalParam ] = useQueryState ( 'interval' , parseIntervalParam ) ;
1416-
1417- // Validate the URL interval against the current page filter period so widgets
1418- // never make requests with an interval that is too granular (e.g. 1m over 30d).
1419- // intervalParam is null when absent or 'auto' (both mean "let widgets decide").
1420- const validatedWidgetInterval =
1421- organization . features . includes ( 'dashboards-interval-selection' ) &&
1422- intervalParam !== null
1423- ? chartInterval
1424- : undefined ;
1409+
1410+ // Always use the validated chart interval so the UI dropdown and widget
1411+ // requests stay in sync. chartInterval is validated against the current page
1412+ // filter period (e.g. won't return 1m for a 30d range) and always has a value.
1413+ const validatedWidgetInterval = organization . features . includes (
1414+ 'dashboards-interval-selection'
1415+ )
1416+ ? chartInterval
1417+ : undefined ;
14251418
14261419 return (
14271420 < DashboardDetail
0 commit comments