Noticed while implementing #427; not fixed there.
src/dashboard/application/saved-query-mutation.ts (planSavedQueryMutation, suggestRepairs) has no production caller. Its own doc comment says so: "Note for the caller that eventually wires this up (it has no production caller yet)" (around line 195). The only references to it anywhere in src/ are doc comments in import-planner.ts, tile-membership.ts and layout-registry.ts.
Meanwhile src/state.ts's deleteSaved does not use it: it filters the query out and commits, so deleting a query a Dashboard tile still references is rejected outright by whole-workspace validation (dashboard-tile-query-missing) with no repair offered — exactly the case the planner's remove-affected-tiles / remap-query repairs exist for.
#427 added ownership rules to that planner (a remap may not create multiple owners; deleting an owned query without removing its owner is refused), so it is now ~220 lines of fully-covered code with no runtime path, and its guarantees cannot be integration-proven.
Why deferred
Wiring it up means designing the repair UI — "this query backs a panel on Sales; remove the panel, point it at another query, or cancel" — which is #429's territory (panel/filter removal plus exactly-owned query deletion). Doing it inside #427 would have meant inventing that dialog.
What to do
Either wire deleteSaved (and the role/variant-changing paths of commitSavedQuery) through planSavedQueryMutation as part of #429 and surface suggestRepairs in the UI, or — if #429's own atomic trash action makes the planner redundant — delete it rather than keep a second fully-covered module with no caller.
Noticed while implementing #427; not fixed there.
src/dashboard/application/saved-query-mutation.ts(planSavedQueryMutation,suggestRepairs) has no production caller. Its own doc comment says so: "Note for the caller that eventually wires this up (it has no production caller yet)" (around line 195). The only references to it anywhere insrc/are doc comments inimport-planner.ts,tile-membership.tsandlayout-registry.ts.Meanwhile
src/state.ts'sdeleteSaveddoes not use it: it filters the query out and commits, so deleting a query a Dashboard tile still references is rejected outright by whole-workspace validation (dashboard-tile-query-missing) with no repair offered — exactly the case the planner'sremove-affected-tiles/remap-queryrepairs exist for.#427 added ownership rules to that planner (a remap may not create multiple owners; deleting an owned query without removing its owner is refused), so it is now ~220 lines of fully-covered code with no runtime path, and its guarantees cannot be integration-proven.
Why deferred
Wiring it up means designing the repair UI — "this query backs a panel on Sales; remove the panel, point it at another query, or cancel" — which is #429's territory (panel/filter removal plus exactly-owned query deletion). Doing it inside #427 would have meant inventing that dialog.
What to do
Either wire
deleteSaved(and the role/variant-changing paths ofcommitSavedQuery) throughplanSavedQueryMutationas part of #429 and surfacesuggestRepairsin the UI, or — if #429's own atomic trash action makes the planner redundant — delete it rather than keep a second fully-covered module with no caller.