Skip to content

fix(erd): the Diagram reads the catalog on its own read-only session (#1218) - #1224

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
fix/1218-diagram-catalog-session
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
fix/1218-diagram-catalog-session

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Refs #1218

What was wrong

The Diagram tab read the catalog through the SQL editor's session:

Changes

  • The SQL workspaces pass a catalogDelegateFactory: the Diagram uses a read-only session of its own. On PostgreSQL it runs with autocommit, so there is no implicit BEGIN. Without a factory the diagram uses the editor's delegate, as before; no workspace relies on that path now, since extension workspaces hide the Diagram.
  • ErdCatalog asks for an explicit row limit, ErdCatalog.catalogRowLimit = 200 000, the same as MCP.
  • A catalog that is still cut is marked truncated, and the diagram shows a notice.
  • Tests: a catalog read asks for the limit; a cut catalog is marked truncated; a complete one is not; the Diagram reads through the catalog delegate and the editor's delegate sees no catalog query.

Not in this PR

Not verified locally

Tests were not run locally, per the project rule.

…1218)

The Diagram tab read the catalog through the SQL editor's session. On PostgreSQL
with manual commit that opened a transaction in the editor, an aborted editor
transaction broke the diagram, a long editor query delayed it, and the editor's
result limit silently cut large schemas at 5000 rows.

The workspaces now pass a catalog delegate factory: a read-only session of its
own, without the editor's implicit BEGIN. The catalog reads ask for an explicit
row limit of 200 000, and a catalog that is still cut is reported as truncated
with a notice on the diagram.
@github-actions github-actions Bot added bug Something isn't working editor Code/SQL editor connections Database connections, URI parsing, pools P1 High priority / Core capability labels Oct 9, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 71c0173 into dev Oct 9, 2026
14 checks passed
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Grid scroll benchmark

metric base PR change
p50 17.03 ms 16.29 ms -4.3%
p90 22.62 ms 23.99 ms +6.1% ⚠️
p99 51.60 ms 55.27 ms +7.1% ⚠️
stutters 296.00 281.00 -5.1%

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working connections Database connections, URI parsing, pools editor Code/SQL editor P1 High priority / Core capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant