Repository navigation
Web UI: group the digits of a long number with a gap, not an underline - #119839
Conversation
A long number in the result table was grouped by underlining one digit at each group-of-three boundary, mirroring `clickhouse-client`. In a proportional page - unlike a terminal - a gap reads better, and the classic typographic grouping is a thin space: `1 234 567`. A real separator character would be copied along with the number, so the groups are separated by an EMPTY element instead - `<span class="num-sep">`, an inline-block a quarter of a digit wide (`0.25ch`, which in the table's monospace font is exactly a quarter of a digit). The gap is painted, but the text of the cell is still nothing but the digits: selecting the number, or copying the cell, yields `1234567`. The same grouping is applied to the row-number column, whose numbers pass five digits on a later page of a large result. The digit groups in the query editor are left as they are: its backdrop must match the metrics of the textarea underneath it character for character, so the highlight cannot change the advance width of anything. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Workflow [PR], commit [43147b2] Summary: ✅
AI ReviewSummaryThis PR replaces the underlined digit grouping in the Web UI result table with empty separator elements and applies the same grouping to row numbers. The main rendering path looks consistent with the existing implementation, but one edge case still violates the new helper's digits-only contract: row numbers are grouped by string length alone, so scientific-notation offsets can be split in the middle of the exponent. Findings💡 Nits
Final VerdictLeft one non-blocking inline comment on the row-number grouping edge case; otherwise the change looks sound. LLVM Coverage ReportMeasured on commit 43147b2.
Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage). Newly covered: +185 lines in 56 files (-135 lines lost coverage) · Details |
Build profile diff (arm_release)Commit See the job log for details. |
The number 05210 has been taken by many tests that landed on master while this branch was waiting, so the Web UI digit-grouping test moves to the next free number. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Both are pre-existing, and neither can come from this PR. 1.
|
2.
|
|
🕵 @groeneai, investigate the failures and provide a fix in a separate PR (link it here if one is already in progress):
Both are in refreshable materialized views, and this pull request changes only 1.
|
|
Both signatures already have a fix PR in flight. 1.
|
|
🕵 Thanks @groeneai — noted #111928 (STID 2508-49e2) and #121037 (STID 1805-2619) as the in-flight fixes. Master was merged into this branch on 2026-09-26 (head |
| /// Numbered within the whole result, not within the page (see `_rowNumberOffset`). | ||
| td.appendChild(document.createTextNode(this._rowNumberOffset() + this._row_idx)); | ||
| const row_number = String(this._rowNumberOffset() + this._row_idx); | ||
| if (row_number.length >= 5) { td.innerHTML = digitGroupsHTML(row_number); } |
There was a problem hiding this comment.
digitGroupsHTML documents a digits-only input, but this path only checks length. sanitizePagination / _goToPage accept any finite page value, so once String(this._rowNumberOffset() + this._row_idx) flips to scientific notation (1e+21 and above), this renders as 1e<span class="num-sep"></span>+21. Could we gate row numbers with the same ^\d{5,}$ check as _renderCell, or otherwise normalize them before calling digitGroupsHTML?
Each query copied only 5 million rows and finished in ~20 ms, so the performance comparison measured memory-bandwidth jitter: query ClickHouse#4 (`FixedString` verbatim copy) was flagged as a confirmed slowdown on `master` itself (2026-09-17) and on unrelated pull requests (ClickHouse#119839, ClickHouse#110613), and queries ClickHouse#2..ClickHouse#4 moved 11-17% together in one run. Process 20 million rows, so each query takes ~100 ms. Report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=110613&sha=dbef7b1548eb9998ee9556d003008cd13d3bffee&name_0=PR&name_1=Performance%20Comparison%20%28arm_release%2C%20master_head%2C%204%2F6%29 PR: ClickHouse#110613 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
In the Web UI, a long number in the result table was grouped by underlining one digit at each group-of-three boundary, mirroring
clickhouse-client. On a proportional page — unlike in a terminal — a gap reads better, and the classic typographic grouping of digits is a thin space:1 234 567.A real separator character would be copied along with the number, so the groups are separated by an empty element instead:
<span class="num-sep"></span>, an inline-block a quarter of a digit wide (0.25ch, which in the table's monospace font is exactly a quarter of a digit). The gap is painted, but the text of the cell is still nothing but the digits — selecting the number, or copying the cell, yields1234567.The same grouping is now applied to the row-number column, whose numbers pass five digits on a later page of a large result.
The digit groups in the query editor are left as they were: its backdrop must match the metrics of the textarea underneath it character for character, so the highlight there cannot change the advance width of anything.
Verified in a browser against a locally built server: the separator measures exactly 0.25 of a digit, the digit columns of a right-aligned number still line up, a selection over a grouped number returns the bare digits, and the grouping also holds in the selected (inverted, wrapping) cell overlay and in the dark theme.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
In the Web UI, the digits of a long number in the result table are now grouped by a thin gap, as in
1 234 567, instead of an underline. The gap is an empty element, so selecting or copying the number still yields the digits alone.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/119839]
Version info
26.10.1.773-master(included in26.10and later)