Altinity / Altinity/altinity-sql-browser
A two-resource write (duplicate / remove panel) silently drops Full view
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 8
- Fork
- 2
- Merge medio
- 1h 34m
- PR unite (30g)
- 6
Descrizione
Problem
Full view (#321) is a transient grafana-grid render mode held on the viewer
session, never persisted. Every two-resource workspace write rebuilds the
route from committed truth (rebuildRouteFromCommitted → app.renderDashboard()),
which constructs a fresh viewer session at the persisted style — so the user is
silently dropped back to Grid Tiles.
Two actions do this today:
- Duplicate panel (#535) — pre-existing since PR #538.
- Remove tile (#537) — joins it, because panel removal became a two-resource
write rather than a layout command.
Ordinary layout commands (widen, corner-drag resize, reorder) go through the
optimistic command queue instead and preserve Full view correctly; there is
already a test asserting that for reorder
(tests/unit/dashboard.test.ts, "reorder (drag) still dispatches move-tile and
persists while Full view is active").
Repro
- Open a Dashboard in Edit mode, pick Full view (G+F).
- Duplicate or remove any panel.
- The style picker reads Grid Tiles again.
Expected
A transient render mode should survive a rebuild caused by the user's own edit —
it is a view preference, not document state.
Notes
Asserted as-is rather than wished away, in
tests/unit/dashboard.test.ts → "remove still commits and persists while Full
view is active", which documents the current behaviour and will fail loudly when
it is fixed.
Same family as the other known cost of a two-resource write: the rebuild re-runs
every tile's query, so deleting one panel refetches the whole page. Worth
considering together — both would be addressed by making a queriesChanged
rebuild incremental, or by carrying the transient render mode across it.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in tests/unit/dashboard.test.ts, soprattutto con il test denominato "remove still commits and persists while Full view is active," e segui la scrittura di due risorse attraverso rebuildRouteFromCommitted e app.renderDashboard(). Riproduci la duplicazione e la rimozione mentre Full view è attiva, quindi verifica che la modalità di rendering transitoria sopravviva alla ricostruzione senza modificare lo stile persistito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100