Skip to content

planSavedQueryMutation still has no production caller; deleteSaved rejects instead of offering its repairs #449

Description

@BorisTyshkevich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinboxFiled mid-task; not yet triaged into the roadmap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions