You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "aminghadersohi (via GitHub)" <gi...@apache.org> on 2026/10/01 21:45:28 UTC
[I] Save chart modal can create a duplicate dashboard when the typed title matches an existing one [superset]
aminghadersohi opened a new issue, #44873:
URL: https://github.com/apache/superset/issues/44873
### Bug description
In the Explore "Save chart" modal, the dashboard select (`AsyncSelect` with `allowNewOptions`) can show two rows with the same label when the typed text equals an existing dashboard title: the fetched existing dashboard and an optimistic "create new" entry. Picking the "create new" row silently creates an empty dashboard with a duplicate title and adds the chart to it instead of the existing dashboard.
How it happens (`superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx`):
1. `handleOnSearch` (debounced) adds an `isNewOption` entry `{ label: typed, value: typed }` when no loaded option has that label yet, e.g. the user types before the dashboard list has loaded, or the target dashboard is past the first page.
2. When the fetched options arrive, both `mergeData` and the page-0 search merge dedupe only by `value`. The new-option value is the typed string and dashboard values are numeric ids, so the `isNewOption` entry is never removed even though a fetched option now has the same label.
### Steps to reproduce
1. Have an existing dashboard titled `My dashboard` (more than one page of dashboards, or a slow dashboard-list response, makes this easier to hit).
2. Open a chart in Explore, click Save, choose "Save (Overwrite)".
3. Quickly type `My dashboard` in the dashboard select.
4. The dropdown shows two `My dashboard` rows. Select the one that is the "create new" entry and save.
5. A second, empty `My dashboard` is created and the chart is added to it.
Expected: once a fetched option has the same label as an `isNewOption` entry, the new-option entry should be dropped (or at least distinguishable).
### Superset version
master / latest-dev
### Python version
3.11
### Node version
Not applicable
### Browser
Chrome
### Additional context
Found while fixing a flaky Playwright spec in #44856, where the test typed the full title and could select the "create new" row. That PR works around it in the test only; the product behavior is unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Save chart modal can create a duplicate dashboard when the typed title matches an existing one [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #44873:
URL: https://github.com/apache/superset/issues/44873#issuecomment-6488597043
This is a real bug. There are two open PRs for it, #45168 (narrow dedupe by label) and #44894 (broader Select hardening). I'd lean toward the narrower one. @aminghadersohi do you have a preference?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Save chart modal can create a duplicate dashboard when the typed title matches an existing one [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi closed issue #44873: Save chart modal can create a duplicate dashboard when the typed title matches an existing one
URL: https://github.com/apache/superset/issues/44873
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org