Problem
Saved dashboard views support Create, Update, and List in the UI (trpc.dashboard.createView and updateView in src/components/dashboard/view-builder-dialog.tsx + custom-view.tsx; listViews query), but Delete is missing.
dashboard.deleteView (src/server/routers/dashboard.ts:772) — withTeamAccess("VIEWER"), audited (dashboard.delete_view) — has no client caller, so users can accumulate saved views with no way to remove them.
Proposed solution
Add a Delete affordance to the saved-views UI (src/components/dashboard/custom-view.tsx):
- A per-view delete control (menu item or trash icon) calling
dashboard.deleteView with { environmentId, id }.
- Confirm before delete; on success invalidate the
["dashboard","listViews"] query (same pattern the create/update mutations already use).
Alternatives considered
- Leave deletion to a future bulk-management screen — overkill; the gap is one missing verb in an otherwise-complete CRUD surface.
Additional context
Completes CRUD for saved views. Input: { environmentId, id }. Mirror the onSuccess cache-invalidation already in view-builder-dialog.tsx.
Part of #431
Problem
Saved dashboard views support Create, Update, and List in the UI (
trpc.dashboard.createViewandupdateViewinsrc/components/dashboard/view-builder-dialog.tsx+custom-view.tsx;listViewsquery), but Delete is missing.dashboard.deleteView(src/server/routers/dashboard.ts:772) —withTeamAccess("VIEWER"), audited (dashboard.delete_view) — has no client caller, so users can accumulate saved views with no way to remove them.Proposed solution
Add a Delete affordance to the saved-views UI (
src/components/dashboard/custom-view.tsx):dashboard.deleteViewwith{ environmentId, id }.["dashboard","listViews"]query (same pattern the create/update mutations already use).Alternatives considered
Additional context
Completes CRUD for saved views. Input:
{ environmentId, id }. Mirror theonSuccesscache-invalidation already inview-builder-dialog.tsx.Part of #431