Altinity / Altinity/altinity-sql-browser
A tile whose owned query is missing or shared cannot be removed from any surface
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 2
- Avg merge
- 1h 34m
- Merged PRs (30d)
- 6
Description
Problem
removeDashboardPanel proves ownership before deleting anything and refuses
ownership-unproven when the tile's queryId names no query in
workspace.queries, or names one with more than one owner
(src/dashboard/application/dashboard-removal.ts:128-131). Both the Dashboards
tree and — since #537 — the tile header route their delete through it.
That is the correct fail-closed behaviour #494/#537 specify. The consequence is
that a tile whose query is missing (a dangling queryId) or shared by a
second tile now has no removal path from any surface:
- the Dashboards-tree trash is disabled with a reason;
- the tile header's
⋯→ Remove tile row is disabled with the same reason; - and #537 deleted the last escape hatch — the tile head's old document-only
remove-tiledispatch, which removed such a tile without touchingqueries.
How to reach it
A queries-only bundle import (#448) or a corrupt aggregate can produce a tile
pointing at an id no query carries. A legacy or hand-edited workspace can carry
two tiles referencing one query, which #427 forbids reaching but does not
retroactively repair.
Why it was deferred
#537's acceptance criteria require exactly this fail-closed behaviour, so the
alternative belongs in its own decision rather than smuggled into that change.
Options
- A separate, explicitly-labelled "Remove tile only" action, offered only
when removal is refused because the query is missing — a dangling reference has
no second resource to be atomic about. Would keep theremove-tilecommand,
which currently has no UI dispatcher left. - Give
removeDashboardPanelan explicit tile-only arm for the missing-query
case, so one path still covers it. - Accept it, and handle these workspaces through Import/Replace only.
Option 1 or 2 seems right for the missing-query case; a shared query arguably
should stay unremovable, since either tile still renders it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/dashboard/application/dashboard-removal.ts:128-131, then trace the Dashboards-tree trash and tile-header Remove tile routes, including the existing remove-tile command. Decide which documented option applies for missing queries while preserving the refusal for shared queries. Done means a chosen removal path works for dangling tiles from the relevant surface without deleting a query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100