Skip to content

feat(erd): open diagram tables in the table browser, Open in SQL and Show relations (#1155) - #1202

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
issue/1155-erd-open-table
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 2 commits into
devfrom
issue/1155-erd-open-table

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1155

What was wrong

  • Double click opened SQL, not the table browser. In the Diagram tab, double click and "Open data" ran SELECT * … LIMIT 100 in a new SQL tab.
  • Tables of another schema failed. The name sales.orders was quoted as one identifier, "sales.orders".
  • The card menu had no Open in SQL and no Show relations.
  • Walking the graph did nothing. The table browser's Relations view never got a neighbour handler: no table view passed onOpenNeighbour, so a double click on a neighbour was a no-op.

Changes

  • ErdTableNames: a diagram name to a QueryaSchemaObject and to SELECT SQL, qualified and quoted per dialect. Only PostgreSQL names are split on the dot.
  • Diagram tab: double click and Open data open the table browser through QueryaCommandHost.onOpenSchemaObject (the Quick Switcher path). Without the app shell (tests) the rows open in a SQL tab as before, with correct quoting.
  • Card menu: Open in SQL, and Show relations (table browser in the Relations view). Actions without a handler are left out.
  • TableViewCommandBridge.requestViewForNextTable: the next table browser that opens starts in the requested view. The request expires after a few seconds.
  • Relations view: a double click on a neighbour opens it in the table browser, in Relations again. PostgreSQL and MySQL table views pass their database.
  • Tests: names and quoting for all three dialects; a table asked for Relations starts there (and a view ignores it); the card menu calls Open in SQL and Show relations and leaves out unhandled ones; a double click in the Diagram tab opens the table browser.

Not in this PR

  • "Open full diagram" from the table browser stays disabled: the shell has no hook to open the SQL workspace's Diagram tab.
  • An unqualified PostgreSQL name opens in schema public, as the Quick Switcher does; a server with another search_path would need the session's current schema.

…Show relations (#1155)

A double click or Open data on a card in the SQL workspace's Diagram tab opened
a SELECT in a new SQL tab, not the table browser, and quoted a table of another
schema as one identifier ("sales.orders"), so the query failed. It now opens
the table browser through the Quick Switcher path; without the app shell the
SELECT tab stays, with the name qualified per dialect ("sales"."orders").

The card menu gains Open in SQL and Show relations; Show relations opens the
table browser in its Relations view. A double click on a neighbour in the
Relations view did nothing, because no table browser passed a handler; it now
opens the neighbour, in the Relations view again, so the graph can be walked.
@github-actions github-actions Bot added enhancement New feature or request frontend Theme parser epic label: frontend ui User interface components and widgets ux User experience, keyboard shortcuts and interactions P2 Medium priority / Parity & Refactoring labels Oct 9, 2026
On the default test platform (Android) shadcn opens a context menu as a sheet,
which needs the app's drawer overlay; the desktop app shows a popover.
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Grid scroll benchmark

metric base PR change
p50 13.51 ms 13.72 ms +1.6%
p90 24.34 ms 28.24 ms +16.0% ⚠️
p99 46.07 ms 50.76 ms +10.2% ⚠️
stutters 278.00 267.00 -4.0%

Informational only (threshold 5%). Shared CI runners are noisy; re-run before trusting a single result.

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 305638b into dev Oct 9, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring ui User interface components and widgets ux User experience, keyboard shortcuts and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant