Skip to content

Add engine-specific icons and improve table list in Play UI#101134

Open
alexey-milovidov wants to merge 30 commits intomasterfrom
fix-play-table-icons
Open

Add engine-specific icons and improve table list in Play UI#101134
alexey-milovidov wants to merge 30 commits intomasterfrom
fix-play-table-icons

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Mar 29, 2026

Add inline SVG icons next to table names in the Play UI sidebar, reflecting the table engine:

  • MergeTree family: table grid icon
  • SummingMergeTree/AggregatingMergeTree: capital sigma (Σ)
  • Memory: microchip
  • View: eye
  • MaterializedView: eye over table lines
  • Merge: three overlaid tables
  • Distributed: fanout (box with arrows to three boxes)
  • Proxy: arrow between two boxes

Additional improvements:

  • Balloon only appears when hovering over the table name, not the entire row
  • Balloon has a 0.1s delay before showing to avoid flicker
  • Balloon background is changed
  • Database panel limited to 25em max width; long table names truncate with ellipsis
  • Tables starting with .inner are sorted last
  • Icons are 50% opaque

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Add engine-specific icons and improve table list UX in the Play UI sidebar.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

alexey-milovidov and others added 16 commits March 29, 2026 23:12
…y UI

Previously the balloon appeared when hovering anywhere on the row, including
the empty space after the table name. Now it only appears when the pointer
is over the table name button itself, using the CSS adjacent sibling combinator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each table in the sidebar now shows an SVG icon to the left of its name,
reflecting the table engine:
- MergeTree family: table grid icon
- `SummingMergeTree`/`AggregatingMergeTree`: capital sigma (Σ)
- `Memory`: microchip
- `View`: eye
- `MaterializedView`: eye over table lines
- `Merge`: three overlaid tables
- `Distributed`: fanout (box with arrows to three boxes)
- `Proxy`: arrow between two boxes

Replicated and Shared prefixes are stripped before matching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Sigma: fix direction to match Σ (left-to-right-to-left zigzag)
- Microchip: make body square (12x12 instead of 12x16)
- Fanout: center source box vertically to make arrows symmetric
- Merge: shadow tables offset to bottom-right instead of top-right

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The front table with the header line is drawn last (on top) at the
top-left, and the two shadow copies peek out behind it toward the
bottom-right.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each of the three layers is now a closed rectangle with a header line.
The tables use background-color fill so the front table properly
occludes the ones behind it, creating a clean stacked appearance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ames

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The block display made the button take full row width, pushing the
absolutely-positioned balloon to the far right. With inline-block
the button is only as wide as its text, so the balloon appears
right after the table name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses a CSS animation with a delay so the balloon does not flash
when quickly moving the pointer across the table list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Mar 29, 2026

Workflow [PR], commit [a675c79]

Summary:

job_name test_name status info comment
Integration tests (amd_llvm_coverage, 2/5) failure
test_overcommit_tracker/test.py::test_user_overcommit FAIL cidb
Stress test (arm_debug) failure
Logical error: Shard number is greater than shard count: shard_num=A shard_count=B cluster=C (STID: 5066-457d) FAIL cidb
Stress test (arm_msan) failure
MemorySanitizer: use-of-uninitialized-value (STID: 1003-358c) FAIL cidb, issue
Stress test (arm_ubsan) failure
Logical error: Shard number is greater than shard count: shard_num=A shard_count=B cluster=C (STID: 5066-457d) FAIL cidb

AI Review

Summary

This PR adds engine icons and table-list UX polish in play.html. I found one correctness issue: the new icon mapping for StorageProxy is unreachable because the code checks Proxy while system.tables.engine returns StorageProxy. That breaks the declared engine-specific icon behavior for proxy-backed tables.

Missing context
  • ⚠️ No CI logs or browser compatibility matrix were provided for this UI change.
Findings

❌ Blockers

  • [programs/server/play.html:2224] getTableIcon checks if (e === 'Proxy'), but the engine exposed by StorageProxy::getName is StorageProxy. As a result, proxy-backed tables fall through to the default icon, so the new engine-specific mapping is incorrect.
    • Suggested fix: match StorageProxy (or both aliases for safety), e.g. if (e === 'StorageProxy' || e === 'Proxy').
ClickHouse Rules
Item Status Notes
Deletion logging
Serialization versioning
Core-area scrutiny
No test removal
Experimental gate
No magic constants
Backward compatibility
SettingsChangesHistory.cpp
PR metadata quality
Safe rollout
Compilation time
Final Verdict
  • Status: ⚠️ Request changes
  • Minimum required action: fix the StorageProxy icon condition in getTableIcon so proxy-backed tables receive the intended icon.

@clickhouse-gh clickhouse-gh bot added the pr-improvement Pull request with some product improvements label Mar 29, 2026
Replace display toggling and keyframe animation with opacity and
pointer-events transitions. Both showing and hiding now have a
0.1s delay, preventing flicker when moving the pointer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
virtual StoragePtr getNested() const = 0;

String getName() const override { return "StorageProxy"; }
String getName() const override { return "Proxy"; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StorageProxy::getName is used as the system.tables.engine value for table-function-backed tables, and changing it from StorageProxy to Proxy breaks existing behavior and tests.

Concrete evidence in this PR branch:

  • tests/queries/0_stateless/02888_system_tables_with_inaccessible_table_function.reference expects StorageProxy.
  • tests/queries/0_stateless/00076_system_columns_bytes.sql filters on engine = 'StorageProxy'.

This change will regress compatibility for users/scripts that rely on the current engine name. Please keep StorageProxy here, and if you need Play UI icon mapping, handle it purely in UI mapping logic.

…e_function`

The test expected `StorageProxy` as the engine name, but the PR renamed it to `Proxy`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Mar 30, 2026

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.20% +0.10%
Functions 90.90% 90.90% +0.00%
Branches 76.70% 76.70% +0.00%

Changed lines: 66.67% (2/3) · Uncovered code

Full report · Diff report

alexey-milovidov and others added 3 commits March 30, 2026 08:02
…instead

Address review feedback: keep `StorageProxy` as the engine name in
`system.tables` to preserve backward compatibility. The Play UI icon
mapping now matches on `StorageProxy` instead of `Proxy`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
}

/// StorageProxy - arrow between two boxes
if (e === 'StorageProxy')
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just "Proxy", as we renamed it.

Copy link
Copy Markdown
Member Author

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect.

@pamarcos pamarcos self-assigned this Mar 31, 2026
}

/// StorageProxy - arrow between two boxes
if (e === 'Proxy')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw you reverted the rename from StorageProxy -> Proxy in 85c4338, so I don't understand why we're still looking for Proxy here instead of StorageProxy

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (e === 'Proxy')
if (e === 'StorageProxy')

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's not meant to be reverted. The name will be Proxy.

Copy link
Copy Markdown
Member

@pamarcos pamarcos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before

Image

After

Image

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

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants