Skip to content

ref(dashboards): Remove old prebuilt General dashboard#113608

Merged
gggritso merged 4 commits intomasterfrom
georgegritsouk/dain-1562-remove-old-prebuilt-dashboards-backend-code
Apr 28, 2026
Merged

ref(dashboards): Remove old prebuilt General dashboard#113608
gggritso merged 4 commits intomasterfrom
georgegritsouk/dain-1562-remove-old-prebuilt-dashboards-backend-code

Conversation

@gggritso
Copy link
Copy Markdown
Member

@gggritso gggritso commented Apr 21, 2026

Follow-up to #113758, see more context there!

tl;dr we have a new pre-built dashboard system, where pre-built dashboards are stored as database stubs, with the full dashboard config living in JSON. Therefore, I am getting rid of the last vestiges of the previous prebuilt dashboard system. Right now there is just one single old pre-built dashboard called "General". This PR removes it, so it never comes back in the UI. According to the access logs, single digits users per months are looking at it, and I think they might be us.

Here, I remove get_prebuilt_dashboards() and the surrounding default-overview prebuilt dashboard system, which returned a hardcoded widget configuration as a plain Python dict injected into API responses.

Notable changes:

  • types that used Dashboard | dict... are gone now, because only real Dashboard objects are passed around
  • specs that counted dashboards are all decremented by one, since the "General" dashboard is gone
  • there are bits of odd code where one dashboard must be left remaining, due to the "General" dashboard. I left it for now, and I'll remove it (and the front-end counterparts) in the next PR
  • The DashboardTombstone model is kept for now and will be removed in a follow-up PR along with the DB table drop.

Refs DAIN-1562

Remove `get_prebuilt_dashboards()` and the surrounding `default-overview`
prebuilt dashboard system, which returned a hardcoded widget configuration
as a plain Python dict injected into API responses. The new system (gated
behind `dashboards-prebuilt-insights-dashboards`) syncs real `Dashboard`
DB records with a `prebuilt_id` field, making this code dead.

The `DashboardTombstone` model is kept for now and will be removed in a
follow-up PR.

Refs DAIN-1562
Co-Authored-By: Claude <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 21, 2026

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 21, 2026
…-1562-remove-old-prebuilt-dashboards-backend-code

; Conflicts:
;	src/sentry/dashboards/endpoints/organization_dashboard_details.py
…-1562-remove-old-prebuilt-dashboards-backend-code

; Conflicts:
;	src/sentry/dashboards/endpoints/organization_dashboard_details.py
;	tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py
Remove the `num_dashboards > 1` guard in the dashboard delete endpoint.
Blocking deletion of the last dashboard left users unable to delete a
custom dashboard they created themselves. The check existed because the
hardcoded `default-overview` prebuilt dashboard used to act as a fallback
so the UI always had something to render — now that prebuilt dashboards
are real DB rows, the guard isn't needed.

Co-Authored-By: Claude <noreply@anthropic.com>
@gggritso gggritso changed the title ref(dashboards): Remove old prebuilt dashboard system ref(dashboards): Remove old prebuilt General dashboard Apr 23, 2026
@gggritso gggritso marked this pull request as ready for review April 23, 2026 15:19
@gggritso gggritso requested review from a team as code owners April 23, 2026 15:19
Comment thread src/sentry/dashboards/endpoints/organization_dashboard_details.py Outdated
@gggritso gggritso merged commit 64dbfec into master Apr 28, 2026
56 of 57 checks passed
@gggritso gggritso deleted the georgegritsouk/dain-1562-remove-old-prebuilt-dashboards-backend-code branch April 28, 2026 18:34
gggritso added a commit that referenced this pull request Apr 30, 2026
…dling (#114249)

In #113608 I removed the
"General" dashboard (AKA `"default-overview"`) that the backend
returned. That is all fine and well, but there's still some FE handling
for it. Some is explicit (e.g., checking if something is the "General"
dashboard before allowing to star it) and some is implicit (forbidding
the removal of the final dashboard because it's the "General"
dashboard).

This PR removes those, which removes all FE knowledge of this old
pre-built dashboard.

---------

Co-authored-by: Claude <noreply@anthropic.com>
cleptric pushed a commit that referenced this pull request May 5, 2026
Follow-up to #113758, see more
context there!

tl;dr we have a new pre-built dashboard system, where pre-built
dashboards are stored as database stubs, with the full dashboard config
living in JSON. Therefore, I am getting rid of the last vestiges of the
_previous_ prebuilt dashboard system. Right now there is just one single
old pre-built dashboard called "General". This PR removes it, so it
never comes back in the UI. According to the access logs, single digits
users per months are looking at it, and I think they might be _us_.

Here, I remove `get_prebuilt_dashboards()` and the surrounding
`default-overview` prebuilt dashboard system, which returned a hardcoded
widget configuration as a plain Python dict injected into API responses.

Notable changes:

- types that used `Dashboard | dict...` are gone now, because only
_real_ `Dashboard` objects are passed around
- specs that counted dashboards are all decremented by one, since the
"General" dashboard is gone
- there are bits of odd code where one dashboard must be left remaining,
due to the "General" dashboard. I left it for now, and I'll remove it
(and the front-end counterparts) in the next PR
- The `DashboardTombstone` model is kept for now and will be removed in
a follow-up PR along with the DB table drop.

Refs DAIN-1562

---------

Co-authored-by: Claude <noreply@anthropic.com>
cleptric pushed a commit that referenced this pull request May 5, 2026
…dling (#114249)

In #113608 I removed the
"General" dashboard (AKA `"default-overview"`) that the backend
returned. That is all fine and well, but there's still some FE handling
for it. Some is explicit (e.g., checking if something is the "General"
dashboard before allowing to star it) and some is implicit (forbidding
the removal of the final dashboard because it's the "General"
dashboard).

This PR removes those, which removes all FE knowledge of this old
pre-built dashboard.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants