Summary
A saved query explicitly configured with:
{
"name": "query_log",
"favorite": true,
"view": "table"
}
renders as an automatically selected chart when opened as a Dashboard tile.
The saved view: "table" choice must take precedence over automatic panel detection. autoPanel() should only run when no explicit presentation has been saved.
Found during manual testing on github.demo, build v0.6.1 (3415404).
Reproduction
- Create a query whose result is chartable.
- Select the Table result view.
- Save the query.
- Star it to add it to the Dashboard.
- Open the Dashboard.
Actual result
The tile renders an automatically selected line, area, bar, KPI, or Logs presentation depending on the result shape.
For the reported query, it rendered a line chart with a duplicate-X aggregation note.
Expected result
The tile renders a plain Table grid because the saved query explicitly contains:
Root cause
The Dashboard presentation resolver only reads spec.panel:
const spec = isObject(query) ? query.spec : undefined;
const basePanel =
isObject(spec) && isObject(spec.panel)
? cloneJson(spec.panel)
: {};
When the query has view: "table" but no panel.cfg, the resolver produces an empty panel object and discards the saved Table choice.
The empty object later reaches resolvePanel(). Because no explicit cfg exists, resolvePanel() calls autoPanel().
autoPanel() is working as designed for an unconfigured query: it attempts Logs, KPI, or a chart before using Table as the final fallback. The defect is that the explicit view: "table" signal was lost before automatic detection ran.
queryDashboardRole() defaulting an undeclared role to panel is expected behavior and is not part of this bug.
Required precedence
Dashboard presentation selection should follow:
Explicit panel configuration
>
Explicit saved view: "table"
>
Automatic panel detection
Automatic detection must not override an explicit Table selection.
Fix direction
Handle the compatibility form in the shared resolvePresentation() path.
When:
spec.panel?.cfg is absent; and
spec.view === "table"
use a Table base presentation equivalent to:
{
"cfg": {
"type": "table"
}
}
Conceptually:
const basePanel =
isObject(spec) && isObject(spec.panel)
? cloneJson(spec.panel)
: isObject(spec) && spec.view === 'table'
? { cfg: { type: 'table' } }
: {};
Explicit panel.cfg remains authoritative. Queries with neither an explicit panel nor an explicit Table view continue through autoPanel().
The fix belongs in the shared presentation resolver so Workbench preview, Dashboard viewing, import validation, variants, overrides, and future callers use the same base-presentation semantics.
Acceptance criteria
Attribution
The behavior predates the current filter work and is not caused by #364.
The Dashboard presentation resolver was introduced as part of the first-class Dashboard work. The underlying automatic-panel behavior is older and remains valid for genuinely unconfigured queries.
Summary
A saved query explicitly configured with:
{ "name": "query_log", "favorite": true, "view": "table" }renders as an automatically selected chart when opened as a Dashboard tile.
The saved
view: "table"choice must take precedence over automatic panel detection.autoPanel()should only run when no explicit presentation has been saved.Found during manual testing on
github.demo, buildv0.6.1 (3415404).Reproduction
Actual result
The tile renders an automatically selected line, area, bar, KPI, or Logs presentation depending on the result shape.
For the reported query, it rendered a line chart with a duplicate-X aggregation note.
Expected result
The tile renders a plain Table grid because the saved query explicitly contains:
{ "view": "table" }Root cause
The Dashboard presentation resolver only reads
spec.panel:When the query has
view: "table"but nopanel.cfg, the resolver produces an empty panel object and discards the saved Table choice.The empty object later reaches
resolvePanel(). Because no explicitcfgexists,resolvePanel()callsautoPanel().autoPanel()is working as designed for an unconfigured query: it attempts Logs, KPI, or a chart before using Table as the final fallback. The defect is that the explicitview: "table"signal was lost before automatic detection ran.queryDashboardRole()defaulting an undeclared role topanelis expected behavior and is not part of this bug.Required precedence
Dashboard presentation selection should follow:
Automatic detection must not override an explicit Table selection.
Fix direction
Handle the compatibility form in the shared
resolvePresentation()path.When:
spec.panel?.cfgis absent; andspec.view === "table"use a Table base presentation equivalent to:
{ "cfg": { "type": "table" } }Conceptually:
Explicit
panel.cfgremains authoritative. Queries with neither an explicit panel nor an explicit Table view continue throughautoPanel().The fix belongs in the shared presentation resolver so Workbench preview, Dashboard viewing, import validation, variants, overrides, and future callers use the same base-presentation semantics.
Acceptance criteria
view: "table"and nopanel.cfgrenders as a Table Dashboard tile.view: "table"renders as a plain Table, not Logs.view: "table"renders as a Table, not KPI.panel.cfgremains authoritative regardless ofspec.view.autoPanel().Attribution
The behavior predates the current filter work and is not caused by #364.
The Dashboard presentation resolver was introduced as part of the first-class Dashboard work. The underlying automatic-panel behavior is older and remains valid for genuinely unconfigured queries.