fix(dashboards): Populate linked dashboard in widget builder edit modal#111085
Merged
DominikB2014 merged 3 commits intomasterfrom Mar 19, 2026
Conversation
Fetch the linked dashboard separately when opening the link modal, since the dashboard list endpoint may not include it. Also carry linkedDashboards through the widget-to-builder-state conversion so editing a widget preserves existing links. Fix duplicate linked dashboard entries when re-saving an unchanged link by replacing instead of appending. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The spread of remaining state params passed unserialized LinkedDashboard[] where string[] was expected, causing a type error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If the linked dashboard has been deleted or is inaccessible, fetchDashboard rejects and breaks the Promise.all, preventing the dashboard list from loading. Catch the rejection so the modal remains functional. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.
gggritso
approved these changes
Mar 19, 2026
Member
gggritso
left a comment
There was a problem hiding this comment.
The data fetching story is getting messy, but this makes sense!
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.

Fix the "Link to Dashboard" modal not populating with the pre-existing linked dashboard when editing a widget.
Three issues were addressed:
Linked dashboard not found in list: The
fetchDashboardsendpoint returns a paginated/sorted list that may not include the currently linked dashboard. Now fetches the linked dashboard separately (in parallel) and merges it into the list if missing.Linked dashboards lost on edit:
convertWidgetToQueryParamsdidn't carrylinkedDashboardsfrom the widget query to the builder state, so opening the widget builder for editing always started with empty links. Added serialization oflinkedDashboardsin the conversion and handling in theSET_STATEaction.Duplicate linked dashboard entries: Re-saving an unchanged link appended a duplicate entry because
onLinkalways spread the existing array and added a new item. Now filters out the existing entry for the same field before adding.Fixes BROWSE-450