Skip to content

fix(dashboards): Guard getTimeseriesSortOptions call in widget builder#113467

Merged
edwardgou-sentry merged 1 commit intomasterfrom
edwardgou/dain-1510-widget-builder-partially-crashes-due-to-missing-time-series
Apr 21, 2026
Merged

fix(dashboards): Guard getTimeseriesSortOptions call in widget builder#113467
edwardgou-sentry merged 1 commit intomasterfrom
edwardgou/dain-1510-widget-builder-partially-crashes-due-to-missing-time-series

Conversation

@edwardgou-sentry
Copy link
Copy Markdown
Contributor

@edwardgou-sentry edwardgou-sentry commented Apr 20, 2026

Fixes DAIN-1510

  • The issues dataset config did not implement getTimeseriesSortOptions, causing a N.getTimeseriesSortOptions is not a function crash in the widget builder's sort-by selector.
  • Adds a no-op implementation (() => ({})) to the issues config.
  • Makes getTimeseriesSortOptions required on the DatasetConfig interface so missing implementations are caught at compile time instead of crashing at runtime.

@edwardgou-sentry edwardgou-sentry requested a review from a team as a code owner April 20, 2026 19:27
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 20, 2026

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 20, 2026
Copy link
Copy Markdown
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.

🤔 I'm wondering if it'd be better for Issues to specify that getTimeseriesSortOptions always return [], and then the types could be simplified. We'd say that getTimeseriesSortOptions is required and could remove all the checks?

The issues dataset config did not implement getTimeseriesSortOptions,
causing a runtime crash in the widget builder sort-by selector. Add
a no-op implementation returning an empty record to the issues config
and make the method required on the DatasetConfig interface so this
class of error is caught at compile time.
@edwardgou-sentry edwardgou-sentry force-pushed the edwardgou/dain-1510-widget-builder-partially-crashes-due-to-missing-time-series branch from 31ed0e7 to 69421f9 Compare April 20, 2026 23:22
Comment thread static/app/views/dashboards/datasetConfig/issues.tsx
@edwardgou-sentry edwardgou-sentry merged commit 5bd3d66 into master Apr 21, 2026
67 checks passed
@edwardgou-sentry edwardgou-sentry deleted the edwardgou/dain-1510-widget-builder-partially-crashes-due-to-missing-time-series branch April 21, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants