Skip to content

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

Description

@BorisTyshkevich

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    inboxFiled 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