You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though the number of displayed indexes is capped, the resulting text line can still be very long. Card width is calculated from the widest rendered line, so long index names and types inflate the whole card and distort the graph layout.
This causes several UX problems:
a table with indexes becomes much wider than a table with the same columns but no indexes;
a few long index names dominate graph spacing;
related nodes are pushed far apart;
the inline text is too dense to scan;
only a capped subset is shown;
the bottom detail drawer does not currently provide a structured index view.
The graph card is an overview surface. A flattened index list is detailed metadata and does not belong in card geometry.
Proposed behavior
Schema graph card
Remove the index list from the card entirely.
A card should contain only:
table/view title;
engine, row count, and size summary;
visible columns;
key-role badges;
the existing +N more column overflow row.
Indexes must not affect:
card width;
card height;
graph layout;
node spacing.
No index-count badge is required for the first version. The detail drawer is the place for index metadata after selecting the card.
Optional fields, if already available without expanding scope:
creation: explicit or implicit;
compressed size;
uncompressed size;
marks size.
The section should be omitted when the table has no data-skipping indexes.
Data source
Use structured rows from system.data_skipping_indices.
Relevant fields include:
name
expr
type
type_full
granularity
creation
data_compressed_bytes
data_uncompressed_bytes
marks_bytes
The graph-loading path already retrieves skipping-index rows for card construction. Reuse those rows for the detail drawer where practical.
Do not issue an additional metadata query when the selected graph node already carries the required index data.
If the current detail-loading path independently fetches table details, extending that existing query is acceptable only when reuse from the graph payload would create worse coupling. The implementation should still avoid duplicate fetches for the same open detail view.
Rendering rules
The drawer is a detail surface, but index fields can still contain long values.
For index table cells:
keep rows single-line;
cap column widths;
use ellipsis for overflow;
expose the complete value through title;
allow the drawer body to scroll normally;
do not truncate the number of index rows.
The Expression and Type columns should receive most of the available width.
Suggested column behavior:
Column
Width behavior
Name
medium, ellipsis
Expression
flexible, ellipsis
Type
flexible, ellipsis
Granularity
narrow, numeric
Creation
narrow, optional
Size fields
narrow, numeric, optional
Implementation outline
src/core/schema-cards.js
Remove index-derived display state from the card model:
remove MAX_IDX;
remove idxOverflow;
remove skipLine;
remove index text from cardSize();
stop accepting skipIndices in buildCardModel() if they are no longer needed there.
If index rows must remain attached to graph nodes for the drawer, keep them as structured metadata outside the visual card model:
This is a separate follow-up to the compact type representation work.
#177 addresses oversized type strings in narrow UI surfaces. This issue addresses misplaced structured metadata: even compacted index text remains unsuitable for schema graph cards because the list itself changes card geometry and is incomplete.
Suggested title
Move data-skipping indexes from schema graph cards to the detail drawer
Goal
Keep expanded schema graph cards compact and predictable by removing the inline data-skipping-index list from each card.
Show the complete index metadata in a dedicated section of the bottom detail drawer instead.
Problem
Expanded schema graph cards currently render visible column rows and then append a single inline index line:
Even though the number of displayed indexes is capped, the resulting text line can still be very long. Card width is calculated from the widest rendered line, so long index names and types inflate the whole card and distort the graph layout.
This causes several UX problems:
The graph card is an overview surface. A flattened index list is detailed metadata and does not belong in card geometry.
Proposed behavior
Schema graph card
Remove the index list from the card entirely.
A card should contain only:
+N morecolumn overflow row.Indexes must not affect:
No index-count badge is required for the first version. The detail drawer is the place for index metadata after selecting the card.
Bottom detail drawer
Add a dedicated section after Columns:
The section should show every index for the selected table.
Required fields:
Use
type_fullwhen available so parameterized index types remain distinguishable:Optional fields, if already available without expanding scope:
The section should be omitted when the table has no data-skipping indexes.
Data source
Use structured rows from
system.data_skipping_indices.Relevant fields include:
The graph-loading path already retrieves skipping-index rows for card construction. Reuse those rows for the detail drawer where practical.
Do not issue an additional metadata query when the selected graph node already carries the required index data.
If the current detail-loading path independently fetches table details, extending that existing query is acceptable only when reuse from the graph payload would create worse coupling. The implementation should still avoid duplicate fetches for the same open detail view.
Rendering rules
The drawer is a detail surface, but index fields can still contain long values.
For index table cells:
title;The Expression and Type columns should receive most of the available width.
Suggested column behavior:
Implementation outline
src/core/schema-cards.jsRemove index-derived display state from the card model:
MAX_IDX;idxOverflow;skipLine;cardSize();skipIndicesinbuildCardModel()if they are no longer needed there.If index rows must remain attached to graph nodes for the drawer, keep them as structured metadata outside the visual card model:
Do not flatten them into display text.
src/ui/explain-graph.jsRemove rendering of:
Remove any
.eg-skipidxlayout assumptions.Ensure card height and width are unchanged by index count or index-name length.
When a node is selected, pass its structured index rows into the detail-opening path.
src/ui/schema-detail.jsAdd a
Data-skipping indexes (N)section.Render a table with the required fields.
Use existing formatting helpers for byte counts if size columns are included.
Add native full-value tooltips for capped Name, Expression, and Type cells.
src/net/ch-client.js/ app detail loadingEnsure the detail data shape includes:
Prefer
indexesas a clear public field name in the detail model, even if the underlying query usessystem.data_skipping_indices.Avoid fetching the same index data twice for one detail-open operation.
Acceptance criteria
Data-skipping indexes (N)section in the bottom drawer.type_fullwhen available.Tests
Card model
skipLine.Graph rendering
.eg-skipidxelement is rendered.Detail drawer
Data-skipping indexes (N).type_fullis preferred over the basetype.title.Network/data integration
system.data_skipping_indicesmap correctly into the detail model.Non-goals
EXPLAIN.Relationship to #177
This is a separate follow-up to the compact type representation work.
#177 addresses oversized type strings in narrow UI surfaces. This issue addresses misplaced structured metadata: even compacted index text remains unsuitable for schema graph cards because the list itself changes card geometry and is incomplete.
Suggested title