Skip to content

feat(dashboards): allow interval selection similar to explore#108416

Merged
bcoe merged 10 commits intomasterfrom
dashboard-interval-selection
Feb 23, 2026
Merged

feat(dashboards): allow interval selection similar to explore#108416
bcoe merged 10 commits intomasterfrom
dashboard-interval-selection

Conversation

@bcoe
Copy link
Member

@bcoe bcoe commented Feb 18, 2026

Allows for interval selection similar to the behaviour of individual charts on the explore pages.

Screenshot 2026-02-17 at 7 33 52 PM

TODO:

  • More tests:
    • Behaviour when an interval is set in URL. ✅
    • Behaviour when interval in URL doesn't match options in interval selector. ✅
  • Get feedback on design.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 18, 2026
@bcoe bcoe marked this pull request as ready for review February 18, 2026 16:15
@bcoe bcoe requested a review from a team as a code owner February 18, 2026 16:15
Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense overall, just a few nits!

@narsaynorath wanted to ask you though, it looks like widgets (and maybe dashboards) can specify interval but we don't actually use it? Does that sound right? If yes we should maybe drop that column 🤔

Copy link
Contributor

@DominikB2014 DominikB2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I haven't played around with the ux, but based on the screenshot the interval selector looks like random text on the screen and not a clickable button. Perhaps a dropdown component makes more sense?

@bcoe bcoe force-pushed the dashboard-interval-selection branch from 95702f9 to db14124 Compare February 20, 2026 17:14
@gggritso
Copy link
Member

I added a Sentry dashboard to keep an eye on durations for API requests from Dashboards pages. Would be good to come back in a few weeks and see if there's been any effect! There probably won't be, but it's good to be sure.

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one nit about the test setup!

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount';
import {formatSort} from 'sentry/views/explore/contexts/pageParamsContext/sortBys';
import {DEFAULT_VISUALIZATION} from 'sentry/views/explore/contexts/pageParamsContext/visualizes';
import {useChartInterval} from 'sentry/views/explore/hooks/useChartInterval';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explore default interval may become too granular

Medium Severity

The shared useChartInterval defaults to USE_SMALLEST, and Explore now imports this hook. If the previous Explore-specific behavior defaulted to a coarser interval, this change can silently increase bucket count and query cost for Explore charts when interval is not set in the URL, potentially impacting latency and rate limits.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explore also used USE_SMALLEST so I do not believe this is an issue.

@bcoe bcoe merged commit 7400269 into master Feb 23, 2026
63 checks passed
@bcoe bcoe deleted the dashboard-interval-selection branch February 23, 2026 16:06
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
Allows for interval selection similar to the behaviour of individual charts in explore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-code-assisted Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants