feat(dashboards): Add legendType field and support field links for breakdown charts#110420
Merged
DominikB2014 merged 6 commits intomasterfrom Mar 11, 2026
Conversation
…eakdown charts Add a `legendType` field to dashboard widgets, stored in the existing `detail` JSON field. This enables line and bar charts with breakdown legends to use field links (previously only supported for table widgets). Also removes the `dashboards-drilldown-flow` feature flag gate from the field link save path so the flag only controls UI visibility, and adds validation to reject duplicate fields in linked dashboards. Refs LINEAR-BROWSE-420 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
edwardgou-sentry
approved these changes
Mar 11, 2026
The dashboard widget schema now requires legendType, but the example fixture used by GET, PUT, and POST dashboard API doc tests was missing it, causing api docs test failures. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
Contributor
There was a problem hiding this comment.
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.
The `is` operator relies on CPython's small-integer caching, which is an implementation detail. Use `==` for value comparison, consistent with every other display type check in the file. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
…board-with-widgets-that-show-legends-as-table
When linkedDashboards is explicitly null in the request payload, the key exists so the guard check passes but .get() returns None instead of the default empty list, causing a TypeError on len(None). Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
3 tasks
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.
Add a
legendTypefield to dashboard widgets and allow line/bar charts with breakdown legends to use field links.Changes
DashboardWidgetLegendTypeenum — newstrenum ("default","breakdown") indashboard_widget.py, used for validation and type hintslegendTypestored indetailJSON field — no migration needed, follows the same pattern aslayoutandaxisRangelegendType: "breakdown"can now save linked dashboards (previously only table widgets)dashboards-drilldown-flowfeature flag from the field link save path — the flag now only controls UI visibilityRefs LINEAR-BROWSE-420