Skip to content

Web UI: show platform-specific run shortcut hint - #108957

Merged
alexey-milovidov merged 3 commits into
masterfrom
play-html-platform-shortcut-hint
Jul 1, 2026
Merged

alexey-milovidov merged 3 commits into
masterfrom
play-html-platform-shortcut-hint

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

The Web UI (play.html) showed the run shortcut hint as Ctrl/Cmd+Enter. This change detects the user's platform and shows only the relevant modifier: Cmd+Enter on Mac and Ctrl+Enter everywhere else.

Changelog category (leave one):

  • Improvement

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

Web UI: the run shortcut hint now shows Cmd+Enter on Mac and Ctrl+Enter on other platforms instead of always showing Ctrl/Cmd+Enter.

Version info

  • Merged into: 26.7.1.392 (included in 26.7 and later)

The Web UI (play.html) showed the run hint as "Ctrl/Cmd+Enter". Now it
shows only the modifier relevant to the user's platform: "Cmd+Enter" on
Mac and "Ctrl+Enter" elsewhere.

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

clickhouse-gh Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [6ed8683]

Summary: ✅


AI Review

Summary

The PR updates programs/server/play.html so the run shortcut hint shows Cmd+Enter on Mac-like platforms and Ctrl+Enter elsewhere. The earlier navigator.userAgentData.platform case-sensitivity issue is fixed in the current code, and I found no remaining correctness, safety, or user-facing regressions in this small UI-only change.

Final Verdict

✅ Approve

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

Copy link
Copy Markdown
Member Author

@groeneai, fix 01451_dist_logs.

@groeneai

Copy link
Copy Markdown
Collaborator

@alexey-milovidov 01451_dist_logs does not need its own fix. The code-102 it hit here is the #108630 desync regression, which your open #108854 already fixes.

Same mechanism as the (expected TablesStatusResponse, got ProfileInfo) family: the test's remote('127.{2,3}', ...) LIMIT 1 early-cancels, RemoteQueryExecutor::finish() returns on the was_cancelled path without draining or disconnecting, and #108630 (b681776, 2026-06-29) lets that out-of-sync connection back into the pool. The next loop iteration's getTablesStatus then reads the stale packet and throws UNEXPECTED_PACKET_FROM_SERVER. This PR's base (fbd128b842b) contains b681776 but not #108854.

Validated on a debug build using #108854's own unexpected_packet_in_table_status_response fail point (it injects exactly this desync):

The establisher-level soft-retry on UNEXPECTED_PACKET_FROM_SERVER also covers any residual desync window, not just the cancel leak, so no separate hardening of 01451_dist_logs is needed. Merging #108854 closes this.

Failing run: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108957&sha=fbd128b842b917d10e26f11ba7ac6f42162d4370&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29

Happy to look into the stress-test checks currently blocking #108854 if that helps land it.

The platform detector for the run shortcut hint used a case-sensitive
regexp `/Mac|iPhone|iPad|iPod/`, but `navigator.userAgentData.platform`
reports macOS as the literal string `macOS` (lowercase `m`) and iOS as
`iOS`. On Chromium-based browsers on macOS - the main case this change
is meant to fix - the case-sensitive regexp did not match, so `isMac`
was false and the hint still showed `Ctrl+Enter`. The legacy
`navigator.platform` fallback (`MacIntel`) only matched because it is
reached just when `userAgentData` is absent (Firefox/Safari).

Match the platform string case-insensitively and also accept the UA
Client Hints `iOS` value, so the hint correctly shows `Cmd+Enter` on
Mac across all browsers.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

Addressed the AI Review Request changes verdict in b04a1edd13f.

Fix: the platform detector used a case-sensitive regexp /Mac|iPhone|iPad|iPod/, but navigator.userAgentData.platform reports macOS as the literal macOS (lowercase m) and iOS as iOS, so on Chromium-based browsers on macOS — the main case this PR targets — isMac was false and the hint still showed Ctrl+Enter. The regexp is now case-insensitive and also accepts the UA Client Hints iOS value: /mac|iphone|ipad|ipod|ios/i. Verified against the platform-string set (macOS, MacIntel, iOS, iPhone/iPad/iPod → Mac; Windows, Win32, Linux, Android, Chrome OS, Chromium OS, `` → not Mac). The inline thread is resolved.

CI reds (all on the prior commit fbd128b8, all unrelated to a play.html-only client-side change — none can affect server-side tests; a fresh run is now triggered by the new commit):

  • 01451_dist_logs (Stateless arm_binary) — the #108630 TablesStatusResponse desync regression, fixed by open #108854 (per @groeneai above), not this PR.
  • Hung check failed, possible deadlock found (Stress amd_tsan) — #107941.
  • Logical error: Bad cast from type A to B (STID: 1499-32c3) (Stress arm_msan) — known AST-fuzzer/stress Bad cast family (#108931, #107598, #103814, ...).
  • test_dictionaries_postgresql/test.py::test_invalidate_query (Integration) — timing race in the PostgreSQL dictionary invalidate test (assert '2\n' == '1\n').

@alexey-milovidov

Copy link
Copy Markdown
Member Author

Merged current master into the branch (now 6ed8683812b). master had evolved programs/server/play.html since the merge base — including a functional fix (Fix broken Web UI caused by backticks inside a template literal, #108941) — so re-merging validates this play.html-only change against the current file and starts a fresh CI run. The merge was conflict-free and the change is unchanged (#hint-modifier span + the isMac case-insensitive detector, matching the resolved AI-Review thread). AI Review verdict is ✅ Approve.

Both reds on the previous commit b04a1edd13f were unrelated to a client-side play.html change (no server-side test can be affected by it):

  • Hung check failed, possible deadlock found (Stress arm_asan_ubsan, s3) — chronic flake Hung check failed, possible deadlock found #107941; stacks are executeASTFuzzerQueries / TCPHandler::run, no client frames.
  • Error message in clickhouse-server.log (Upgrade check amd_release) — the deliberate FUNCTION_THROW_IF_VALUE_IS_NON_ZERO from t_failed_mutation_part_log landing in the log during the upgrade window. This is a master-wide upgrade-check flake: 40 failures across 39 distinct PRs in the last 60 days (onset ~2026-06-26), with no tracking issue yet.

@groeneai, could you investigate the upgrade-check flake (Error message in clickhouse-server.log → FUNCTION_THROW_IF_VALUE_IS_NON_ZERO from t_failed_mutation_part_log) and provide a fix in a separate PR? It is hitting many unrelated PRs. If a fix is already in progress, please link it here.

@groeneai

groeneai commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Done — fix in a separate PR: #109009.

Root cause: test 04341_broken_mutation_part_log_flush runs ALTER ... UPDATE x = x + throwIf(1), intentionally failing a plain-MergeTree mutation. Under upgrade-stress the broken mutation can still be queued at the restart, so the new server replays it and logs code 395 (FUNCTION_THROW_IF_VALUE_IS_NON_ZERO) at <Error>, tripping the server.log assertion. New member of the #39174 family (the plain-MergeTree sibling of the already-allow-listed replicated MutateFromLogEntryTask / CANNOT_PARSE_TEXT cases).

CIDB confirms your numbers: 40 failures / 39 distinct PRs / 0 on master in 60d, onset 2026-06-26. All 40 carry the exact plus(x, throwIf expression and the MutatePlainMergeTreeTask executor (0 replicated), so the fix allow-lists two <Error> line shapes, each requiring the mutation-executor context AND code 395 together — a genuine regression surfaces as a different code and is not masked.

No prior tracking issue existed. Both reds on b04a1edd13f were indeed unrelated to the play.html change.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

The fresh CI run for 6ed8683812b has one remaining red: AST fuzzer (amd_debug), failing with Logical error: Block structure mismatch in A stream: different columns: (STID: 0993-27f0).

This is the known flake tracked in #108142, unrelated to this HTML-only change:

  • The crash is in UnionStep::updateOutputHeader during query-plan optimization — nothing this PR (a programs/server/play.html-only change, +7/-1) can reach.
  • Per CIDB it fires on master (PR=0) and dozens of unrelated PRs almost daily (5 hits on 2026-07-01, 29 on 2026-06-30).
  • All other AST fuzzer variants on this same commit passed: AST fuzzer (arm_asan_ubsan), AST fuzzer (amd_tsan), AST fuzzer (amd_msan), and AST fuzzer (amd_debug, targeted) — a real regression would have failed across variants.

The remaining in-progress jobs (Stateless tests, Performance Comparison, SQLLogic) likewise cannot be affected by a play.html-only change. The failed job just needs a rerun once the workflow finishes; no code change is required.

@groeneai

groeneai commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Update on the fix link: consolidated onto #108651 ("Match benign mutation parse errors by class in the Upgrade check") instead of #109009.

#108651 is already approved and MERGEABLE, and its error-CLASS regex already covers this exact FUNCTION_THROW_IF_VALUE_IS_NON_ZERO signature on the background-mutation executors:

(MutatePlainMergeTreeTask|MutateFromLogEntryTask|MergeTreeBackgroundExecutor).*(Cannot parse string .* as .*CANNOT_PARSE_TEXT|FUNCTION_THROW_IF_VALUE_IS_NON_ZERO)

#109009 was a narrower subset editing the same lines of tests/docker_scripts/upgrade_runner.sh, so I closed it to avoid a merge conflict. This 04341_broken_mutation_part_log_flush / t_failed_mutation_part_log flake (#39174 family) is owned by #108651.

@alexey-milovidov alexey-milovidov self-assigned this Jul 1, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 1, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 1, 2026
Merged via the queue into master with commit 51b7151 Jul 1, 2026
343 of 344 checks passed
@alexey-milovidov
alexey-milovidov deleted the play-html-platform-shortcut-hint branch July 1, 2026 22:12
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 1, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…rm-shortcut-hint

Web UI: show platform-specific run shortcut hint
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 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.

3 participants