Skip to content

Replace the Dashboard-level Query button with per-tile “Open in Workbench” actions #471

Description

@BorisTyshkevich

Problem

The Dashboard header currently contains a global < Query button that switches from the Dashboard surface back to the Workbench.

This is the wrong interaction model:

  • it does not identify which Dashboard query the user wants to inspect or edit;
  • it behaves like generic back navigation rather than a query-specific action;
  • after viewing a tile, the user must separately locate the corresponding query in the Workbench;
  • it occupies primary Dashboard toolbar space without carrying useful context.

Required behaviour

Remove the Dashboard-level < Query button from the header.

Add an Open in Workbench icon action to every query-backed Dashboard tile.

Clicking the tile action must:

  1. resolve the exact query document represented by that tile;
  2. switch to the Workbench/Query surface;
  3. open that Dashboard query in the main SQL editor, or select its existing tab when already open;
  4. preserve the query's Dashboard provenance so Save continues to target the Dashboard copy rather than the Library source.

Tab identity must use stable document origin, such as dashboardId + dashboardQueryId/member ID, rather than the query name. This should integrate with the provenance and duplicate-name behaviour specified in #464.

Tile action UX

  • Place the icon in the tile's own chrome, preferably at the top-right alongside other tile actions.
  • Use a code/query or external-edit style icon with tooltip and accessible name: Open in Workbench.
  • The action may be visually subtle until tile hover/focus, but it must remain keyboard discoverable and operable.
  • Clicking it must not start tile drag, resize, selection, chart interaction, or other tile gestures.
  • Render the action consistently in Dashboard View and Edit modes.
  • For a genuinely queryless tile, omit or disable the action with an accurate explanation; do not open an unrelated query.

Navigation semantics

This is a document-opening action, not a generic Dashboard back button.

  • Opening the same tile query repeatedly selects the existing Workbench tab.
  • Different tiles that reference different Dashboard query documents open different tabs, even when their display names are equal.
  • The Dashboard's current filters, layout, scroll position, and view/edit state should not be mutated by opening the query.
  • Normal browser/history navigation may still be used to return to the Dashboard; no dedicated global < Query control is required.

Acceptance criteria

  • The Dashboard header no longer renders the < Query button.
  • Every query-backed tile exposes an Open in Workbench icon action.
  • The action opens/selects the exact tile query in the main SQL editor.
  • Tab reuse is based on stable Dashboard query origin, not display name.
  • Saving from the opened tab updates the Dashboard query copy, not a same-named Library query.
  • The action works in both Dashboard View and Edit modes.
  • Pointer activation does not trigger drag, resize, chart, selection, or tile-body actions.
  • Keyboard focus, activation, tooltip, and accessible naming are covered.
  • Queryless tiles do not navigate to an arbitrary Workbench document.
  • Tests cover two same-named queries in different Dashboards/tiles and reopening an already-open tile query.

Non-goals

  • Keeping a generic Dashboard-to-Workbench back button in another location.
  • Prefixing tab titles with full Dashboard names.
  • Opening the original Library query when the tile owns a Dashboard copy.
  • Changing tile query execution or Dashboard rendering behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions