Repository navigation
Web UI: show single-value results with full height - #109245
Conversation
When a query result is exactly one row and one column (for example, the output of `SHOW CREATE TABLE`), the Web UI now shows the value with its full height instead of clamping the cell to three lines. This makes such results readable without having to select the cell to expand it. Multi-row or multi-column results keep the existing 3-line clamp.
|
Workflow [PR], commit [77a8c67] Summary: ✅
AI ReviewSummaryThis PR makes 1x1 table results in Findings
Final VerdictStatus: |
Address review (clickhouse-gh): the single-value full-height rule
`#data-table.single-value .cell-content` was more specific than
`.td-selected .cell-content`, so selecting a tall 1x1 result (e.g.
`SELECT repeat('line\n', 1000)`) dropped the selected-state
`max-height: 50vh` and internal scrolling while the cell kept
`position: absolute`, producing an unbounded overlay over the page.
Scope the unclamped rule to unselected cells
(`td:not(.td-selected)`) so a selected single-value cell falls back
to the bounded, internally-scrolling `.td-selected` behavior.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
@groeneai, what's with |
|
@alexey-milovidov Root cause of the flakiness: despite the name the test has no CIDB, last 180 days: all 18 timeout failures are on Fix in #109365: add |
pamarcos
left a comment
There was a problem hiding this comment.
It works
Before
After
But GPT-5.5 flagged that it might break existing behavior:
- [programs/server/play.html:1903-1913, 2863-2869, 4427-4429] The selected 1x1 cell can still become full-height. expandSingleValueIfNeeded runs before _changeTableLayout, so _changeTableLayout measures the unclamped value and freezes the row at full height. After selection, .td-selected .cell-content applies, but its min-height: calc(100% + 2px) refers to that already-huge cell height, so it defeats max-height: 50vh. This keeps the exact “bounded selected cell” behavior from the second commit from working for tall values like SELECT repeat('line\n', 1000).
Suggested fix: cap the selected-state min-height for single-value cells, for example after the selected rule:
#data-table.single-value .td-selected .cell-content
{
min-height: min(calc(100% + 2px), 50vh);
}Addresses review feedback from @pamarcos (via GPT-5.5): a single-value result is expanded to full height by `expandSingleValueIfNeeded` before `_changeTableLayout` freezes the row height, so a tall value (e.g. `SELECT repeat('line\n', 1000)`) freezes its row at full height. When that cell is then selected, the `min-height: calc(100% + 2px)` on `.td-selected .cell-content` resolves against the frozen full height and, because `min-height` takes precedence over `max-height`, defeats the `max-height: 50vh` bound, keeping the cell full-height instead of scrolling internally. Cap the selected-state `min-height` at `50vh` for single-value cells with `#data-table.single-value .td-selected .cell-content`, so a selected tall single-value cell falls back to the same bounded, internally-scrolling behavior as any other selected cell. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Thanks @pamarcos — good catch, that is a real edge case. Fixed in 0b591d0: since |
…lue cells
The `.single-value` unclamp rule set both `max-height: none` and
`overflow: visible`. The latter removed the base `.cell-content`
`overflow: hidden`, so with the inherited `white-space: pre` a long
single-line value (e.g. `SELECT repeat('x', 100000)` or a long line in
`SHOW CREATE TABLE`) painted past the `40vw` cell cap and across the page.
Drop only the vertical clamp: keep the base `overflow: hidden` so the
content is still clipped horizontally at the `40vw` cap. With
`max-height: none` the box grows to the full content height, so there is
no vertical overflow to clip and the whole value remains visible.
Addresses the `clickhouse-gh` AI review Major at programs/server/play.html:1718.
|
Updating the branch to fix the |
Address AI review (play.html:2098): a tall single-value result (e.g.
`SELECT repeat('line\n', 1000)`) is shown unclamped, so `_changeTableLayout`
froze its row at the full content height. Selecting the cell then moved
`.cell-content` to `position: absolute` and bounded it to `50vh`, but the row
stayed frozen at full height, leaving a large blank row with a `50vh` overlay
pinned at the top.
Fix the root cause: skip the row-height freeze for single-value tables in
`_changeTableLayout`. The freeze exists only to stop absolutely-positioned cell
content from reflowing the following rows, but a single-value table has one row
with nothing below it. With the freeze gone, selecting the value cell collapses
the row to the row-number cell's height (~1 line) and the overlay is bounded to
`50vh` with internal scrolling, matching the fallback behavior of any other cell.
This makes the previous `#data-table.single-value .td-selected .cell-content`
`min-height` cap redundant (the selected cell's `calc(100% + 2px)` now resolves
against the collapsed row-number height, well under `50vh`), so remove it.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…plate literal The single-value CSS comment was added inside the shadow-root style block, which lives in a JS template literal; the backticks in the comment terminated the literal and broke the page script. Found by test_play_reconcile_startup: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109245&sha=03660d963d8d083e14c4df7229909556e7004a85&name_0=PR Co-Authored-By: Claude Fable 5 <[email protected]>
|
@groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109245&sha=03660d963d8d083e14c4df7229909556e7004a85&name_0=PR&name_1=Integration%20tests%20%28amd_tsan%2C%203%2F6%29 ( |
|
A root-cause fix is already open: #111029 (Closes #110036). Root cause: #107491 (merged 2026-07-10, the regression onset) added #111029 reads the commit base with On #111029's own CI, |
…ull-height # Conflicts: # programs/server/play.html
|
The two CI failures on the previous head
I merged |
| else targetResultEl._pendingTranspose = true; | ||
| /// Content-only (toggles a class based on row/column counts, no measurement), | ||
| /// so it runs even for a hidden tab, like the totals/coloring passes above. | ||
| targetResultEl.expandSingleValueIfNeeded(); |
There was a problem hiding this comment.
expandSingleValueIfNeeded is only wired through the successful table paths. A response like meta + one row + {"exception": ...} takes the stream_exception branch at lines 6039-6044, where we render totals/coloring/transpose/layout but never set the single-value class; reopening the same failed snapshot misses it too via the restoreErrorSnapshot callers at lines 6590-6592 and 6887-6893. So a failed one-row/one-column result still falls back to the old 3-line clamp after this PR, even though restoreErrorSnapshot is supposed to mirror the live partial-result UI.
Please thread the new helper through those partial-result error paths as well. The smallest fix is usually to call expandSingleValueIfNeeded from restoreErrorSnapshot after applyColumnColors, plus the live stream_exception branch before _changeTableLayout, and add a focused regression for a meta + one row + {"exception": ...} response.
…e-full-height Web UI: show single-value results with full height
In the Web UI (
play.html), when a query result is exactly one row and one column (for example, the output ofSHOW CREATE TABLE), the value is now shown with its full height instead of being clamped to three lines. This makes such results readable at a glance without having to select the cell to expand it. Multi-row or multi-column results keep the existing 3-line clamp.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Web UI: show a single-value result (one row, one column, e.g.
SHOW CREATE TABLE) with full height instead of clamping it to three lines.Documentation entry for user-facing changes
🤖 Generated with Claude Code
Version info
26.7.1.1286(included in26.7and later)