Skip to content

feat(erd): table and column comments from the database as notes (#1279) - #1291

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1279-erd-comments
Oct 10, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1279-erd-comments

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

First issue of stage 2 of the ERD epic (#1286). Comments written in the database are its documentation; the diagram now shows them.

  • Catalog: PostgreSQL col_description / obj_description, MySQL column_comment / table_comment; SQLite has none. Old catalog rows without them still read.
  • Card: a note icon in the header of a table with a comment, the comment as its tooltip; a small note icon on a commented column and a Note: line in the row's tooltip. Cards are measured with the icons.
  • MCP: describe_table reports comment for the table and its columns. That is often what tells a model what a table is for.

Checked on the live PostgreSQL databases through MCP: the query runs (both functions resolve). Neither database has comments, so nothing changes visually there.

Not done: showing the table note under the header when the card is selected (it would change the card's height and the layout); the tooltip carries it instead.

Tests: comments parsed (table, column, empty, short rows, a FK keeps its comment); each dialect's SQL; header and row notes on a card with their tooltips.

Closes #1279

Test plan

  • CI: all test sections pass (no local runs, per team rule)
  • By hand: COMMENT ON TABLE ... / COLUMN ... in PostgreSQL or COMMENT '...' in MySQL, then Refresh the diagram

The catalog reads COMMENT ON TABLE / COLUMN (PostgreSQL col_description and
obj_description, MySQL column_comment and table_comment; SQLite has none).
A table with a comment gets a note icon in its header whose tooltip is the
comment; a column with one gets a small note icon and a 'Note:' line in its
row tooltip. Cards are measured with the icons. MCP describe_table reports
the comments, which tell a model what a table is for.
@github-actions github-actions Bot added enhancement New feature or request frontend Theme parser epic label: frontend core Core library logic and services P3 Low priority / Polish & Enhancements labels Oct 10, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit fa2c6d1 into dev Oct 10, 2026
15 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1279-erd-comments 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

core Core library logic and services enhancement New feature or request frontend Theme parser epic label: frontend P3 Low priority / Polish & Enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant