Altinity / Altinity/altinity-sql-browser

A two-resource write (duplicate / remove panel) silently drops Full view

Open
#543 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

inbox
Dominant language
TypeScript
Stars
8
Forks
2
Avg merge
1h 34m
Merged PRs (30d)
6

Description

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 (rebuildRouteFromCommittedapp.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

  1. Open a Dashboard in Edit mode, pick Full view (G+F).
  2. Duplicate or remove any panel.
  3. 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tests/unit/dashboard.test.ts, especially the test named "remove still commits and persists while Full view is active," and trace the two-resource write through rebuildRouteFromCommitted and app.renderDashboard(). Reproduce duplicate and remove while Full view is active, then verify the transient render mode survives the rebuild without changing persisted style.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.