Skip to content

feat: show table/column COMMENTs across schema views + compression size %#119

Merged
BorisTyshkevich merged 2 commits into
mainfrom
feat/schema-comments
Jul 1, 2026
Merged

feat: show table/column COMMENTs across schema views + compression size %#119
BorisTyshkevich merged 2 commits into
mainfrom
feat/schema-comments

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

Summary

  • Table COMMENTs now show as a native hover tooltip on the node in both the compact inline schema-lineage graph and the fullscreen rich-card graph, and in the table-info panel's header next to the kind badge.
  • Column comments get their own column in the table-info panel's columns table (2x wider than the initial cut, MAX_COL_COMMENT 40 → 80 chars).
  • The panel's "uncompressed" byte column is replaced by "size %" — the percentage of the original (uncompressed) size still on disk after compression (e.g. a well-compressed column reads 1%, not "99% saved" — deliberately "how much is left," not "how much was saved").
  • Fullscreen card's own comment row is capped for width but carries the full text via a hover tooltip too (was previously silently truncated with no way to see the rest without opening the panel).

Also fixes (from code review of the initial cut)

  • truncate()'s off-by-one: truncate('abc', 0) returned 'ab…' (longer than max) instead of clamping.
  • Deduped 4 pre-existing copies of the same slice+ellipsis logic (clampType, inferQueryName, firstRowPreview, results-grid cell tooltip) onto the shared truncate() helper.
  • Normalized comment handling across schema-graph.js's node()/external() factories (trimming, consistent '' default).

Test plan

  • npm test — 1317/1317 passing, 100% stmt/line coverage maintained on every touched file
  • Verified live against the real antalya demo ClickHouse cluster (ontime.dim_airports_bts_full, ontime.fact_ontime — 231M rows / 6.88GB): table/column comments render with correct capping + full-text tooltips in all three surfaces, size % computes correctly (e.g. Reporting_Airline1%; alias columns with no physical storage → )

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xwt1KZ3rmKfM26jvyZQD2t

BorisTyshkevich and others added 2 commits July 1, 2026 18:54
…n size %

Table COMMENTs now surface as a native hover tooltip on both the compact
inline schema-lineage graph and the fullscreen rich-card graph, and in the
table-info panel's header. Column comments get their own (2x wider) column in
that panel's table, replacing the "uncompressed" byte count with "size %" —
the percentage of the original size still on disk after compression.

Also fixes issues surfaced by code review: truncate()'s off-by-one for
max<=0, deduped 4 pre-existing copies of the same slice+ellipsis logic onto
the shared truncate() helper, and normalized comment handling across
schema-graph.js's node()/external() factories.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwt1KZ3rmKfM26jvyZQD2t
…t cap

Matches the compact inline graph's behavior for consistency: the table
comment never occupies a line on the fullscreen card, only a <title> tooltip
on the whole card — so it can't affect card height/width. The table-info
panel's header comment cap grows 80 -> 120 (the header row has ~1.5x the
room the columns table's comment cells do).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwt1KZ3rmKfM26jvyZQD2t
@BorisTyshkevich BorisTyshkevich merged commit 901784a into main Jul 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant