Skip to content

Web UI: use a renamed tab's title as the window title - #122067

Merged
alexey-milovidov merged 1 commit into
masterfrom
play-window-title-from-tab-name
Sep 25, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
play-window-title-from-tab-name

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

In the Web UI (play.html), when a tab has been renamed (its title is not the default generated Query A, Query B, ...), the browser window title is now exactly the tab title, without the ClickHouse Query: prefix. This makes renamed tabs easy to find among browser windows and tabs. Tabs with default titles keep the previous window title: ClickHouse Query: followed by the query text.

Changelog category (leave one):

  • Improvement

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

In the Web UI, the browser window title of a renamed query tab is now exactly the tab's name.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/122067]

Version info

  • Merged into: 26.10.1.645-master (included in 26.10 and later)

If the tab title is not the default generated one (`Query A`, `Query B`, ...),
the window title is exactly the tab title, without the `ClickHouse Query: `
prefix. Tabs with default titles keep the previous behavior.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [925c788]

Summary: ✅


AI Review

Summary

This PR changes play.html so the browser window title uses the active tab name when a tab is considered renamed, while default-titled tabs keep the old ClickHouse Query: <query> form. The current implementation infers that state from the visible title text, which breaks the new contract for user-authored titles that happen to look like Query A, Query Z, or Query AA, so I would not merge it as-is.

Findings

⚠️ Majors

  • [programs/server/play.html:13320-13322] The new behavior is keyed on whether a tab was ever renamed, but isDefaultTabTitle infers that from the current string shape. Titles like Query Z are valid user-authored or imported names, and nextDefaultTitle already treats them as occupied, so such tabs still get the old ClickHouse Query: ... window title instead of their visible name. Track this explicitly in tab state (and persist/restore it), or otherwise distinguish generated titles from user-provided ones without relying on a regex.
Tests
  • No automated coverage accompanies this UI behavior change. play.html already documents that it lacks a browser-level test harness, so this needs at least manual verification for renamed/imported titles that match the default-title pattern.
Final Verdict

Request changes.

LLVM Coverage Report

Measured on commit 925c788.

Metric Baseline Current Δ
Lines 88.20% 88.10% -0.10%
Functions 91.80% 91.80% +0.00%
Branches 79.50% 79.50% +0.00%

Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage).

Newly covered: +240 lines in 86 files (-126 lines lost coverage) · Details

Full report

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Sep 24, 2026
Comment thread programs/server/play.html Resolved
@alexey-milovidov alexey-milovidov self-assigned this Sep 24, 2026

@alexey-milovidov alexey-milovidov left a comment

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.

Perfect.

@clickhouse-gh clickhouse-gh Bot added the comp-protocols Server wire protocols + request/response handling (native TCP, HTTP, MySQL/PostgreSQL wire protoc... label Sep 24, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 925c788e6 with master d6961de9e (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 61f8bd161; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline.

Job report

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 25, 2026
Merged via the queue into master with commit d43d606 Sep 25, 2026
339 of 341 checks passed
@alexey-milovidov
alexey-milovidov deleted the play-window-title-from-tab-name branch September 25, 2026 01:44
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 25, 2026
fm4v added a commit that referenced this pull request Sep 25, 2026
The snapshot query counted `uniqExact(test_name)` over the whole 14-day window of `checks_coverage_lines`: 3.5 billion rows and 57 GB, about 6 s on an idle server. Every targeted stateless job of every PR runs it, so while the per-test coverage export was inserting (2026-09-24 18:00-20:00 and 2026-09-25 02:00-04:00 UTC) it exceeded the 60 s timeout on all five attempts. 190 of the 199 "Failed to load test selection" errors since the selector was merged were this query, and as `Stateless tests (amd_asan_ubsan, db disk, distributed plan, targeted)` is a core blocking job, each of them skipped the rest of the PR pipeline. This is why #118223 was reverted in #122110.

Now the distinct `check_start_time` values of the window are listed first (only that column is read, about 0.3 s), and exported tests are counted for the newest three timestamps at a time, filtered by the primary key, until every shard has `coverage_run_count` healthy snapshots. On live CIDB data the result is identical to the old query at every cutoff tried, and it reads 6-10 GB of `test_name` instead of 57 GB, in 1.4-2.3 s instead of about 6 s.

Example failure: https://s3.amazonaws.com/clickhouse-test-reports/PRs/122067/925c788e633f3e3fd2f31f3cd68b916ceb728a3e/pr/stateless_tests_arm_asan_ubsan_targeted/job.log (#122067)
@clickhouse-gh clickhouse-gh Bot added comp-web-ui Web UI embedded in the server: Play, the dashboards, the merges and processors visualisers, the w... and removed comp-protocols Server wire protocols + request/response handling (native TCP, HTTP, MySQL/PostgreSQL wire protoc... labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-web-ui Web UI embedded in the server: Play, the dashboards, the merges and processors visualisers, the w... pr-improvement Pull request with some product improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants