Skip to content

feat(table): Data | Relations view for tables (#1149) - #1185

Merged
ZhuchkaTriplesix merged 5 commits into
devfrom
issue/1149-table-relations-view-v2
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 5 commits into
devfrom
issue/1149-table-relations-view-v2

Conversation

@ZhuchkaTriplesix

@ZhuchkaTriplesix ZhuchkaTriplesix commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Refs #1149

Changes

  • Table toolbar: a Data | Relations switch for tables of PostgreSQL, MySQL and SQLite. Views, materialized views and extension tables get no switch.
  • Relations draws the table's neighbourhood with the table focused and centred, using the table browser's own read-only session through TableDataSqlAdapter (a SqlExecutionDelegate over loadCustomSql).
  • Depth 1 / 2 buttons; the neighbourhood loads when first opened and stays until the view is rebuilt.
  • The grid stays alive in an IndexedStack, so staged edits, page and filter survive Data → Relations → Data.
  • A table without foreign keys shows No foreign keys to or from <table> with Open full diagram.
  • Double click on a neighbour calls onOpenNeighbour.
  • Tests: the switch on tables, not on views, not on extension tables, and the Relations view opening with depth switching.

Not in this PR

  • Double click on a neighbour is wired to the callback only; the table browser's callers do not pass one yet, so the neighbour does not open the browser. The Quick Switcher path (onOpenSchemaObject) still needs to be connected.
  • The ERD's own toolbar (Auto layout, Export, Refresh) still shows below the depth row: two toolbar rows instead of one.
  • Command palette entries Table: Show relations / Table: Show data are not added.
  • The staged-edits-survive check is not covered by a widget test yet.

🤖 Generated with Claude Code

Tables with a diagram source get a Data | Relations switch in the table
toolbar, for PostgreSQL, MySQL and SQLite. Relations draws the table's
neighbourhood (depth 1 or 2) with the table focused, using the table
browser's own read-only session through a SqlExecutionDelegate adapter. The
grid stays alive in an IndexedStack, so staged edits, page and filter survive
the switch. Views and extension tables get no switch. A table without foreign
keys shows its empty state with Open full diagram.
@github-actions github-actions Bot added enhancement New feature or request frontend Theme parser epic label: frontend ui User interface components and widgets P2 Medium priority / Parity & Refactoring labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Grid scroll benchmark

metric base PR change
p50 17.34 ms 14.12 ms -18.6%
p90 23.80 ms 25.53 ms +7.3% ⚠️
p99 47.07 ms 56.36 ms +19.7% ⚠️
stutters 284.00 270.00 -4.9%

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

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Grid scroll benchmark

metric base PR change
p50 6.73 ms 7.40 ms +10.0% ⚠️
p90 14.79 ms 16.98 ms +14.8% ⚠️
p99 29.79 ms 30.98 ms +4.0%
stutters 341.00 334.00 -2.1%

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

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 47d9e74 into dev Oct 9, 2026
14 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1149-table-relations-view-v2 branch October 11, 2026 15:02
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant