Skip to content

Improve Dashboard Webpage - #115019

Merged
Michicosun merged 3 commits into
masterfrom
dashboard_patch
Aug 17, 2026
Merged

Michicosun merged 3 commits into
masterfrom
dashboard_patch

Conversation

@Michicosun

@Michicosun Michicosun commented Aug 16, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

This patch:

  1. Removes the global error screen (blue screen) and replaces it with a note above the dashboards. In this approach, on any error, already fetched graphs will not be hidden.
  2. Dashboard now opens the graphs view immediately.
  3. Reload button and any other button can be pressed during runtime refresh - this will cancel all in-flight queries and start a new refresh with the new configuration immediately.
  4. Newly added graphs do not trigger a full page refresh; only new graphs will be fetched.

Version info

  • Merged into: 26.8.1.1553 (included in 26.8 and later)
  • Backported to: 26.7.5.12, 26.6.3.59, 26.5.8.10, 26.3.21.8

@clickhouse-gh

clickhouse-gh Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7be817c]

Summary: ❌

job_name test_name status info comment
AST fuzzer (amd_tsan) FAIL
Logical error: 'std::exception. Code: 1001, type: std::out_of_range, e.what() = bitset set argument out of range (version 26.8.1.1), Stack trace: (STID: 2508-34fb) FAIL cidb

AI Review

Summary

This PR improves the dashboard UI by keeping charts visible during errors, exposing the graph view immediately, and trying to make reloads cancellable. The current implementation still has two state-management bugs in the new refresh model: failed or superseded dashboard searches can leave the visible charts detached from the saved/dashboard state, and the incremental “add charts from metrics” path can corrupt chart indexing if it runs while an older refresh is still in flight.

Findings

⚠️ Majors

  • [programs/server/dashboard.html:1666] The new “keep old charts visible” behavior breaks the dashboard model when a search refresh fails or is superseded. queries is cleared before searchQueries succeeds, so the old chart DOM remains visible while queries, customized, and the saved URL state already describe an empty dashboard. Suggested fix: fetch the next dashboard into a temporary array/object and only replace queries plus saveState after the search has completed successfully.

  • [programs/server/dashboard.html:1203] The incremental prepend path for metric-generated charts does not cancel an in-flight refresh before shifting queries and plots. Older draw(i, chart, ...) completions still use the pre-insert indices and can overwrite the new front slots in plots, leaving plots, queries, and DOM order inconsistent for later operations. Suggested fix: cancel/supersede the current refresh generation before mutating chart order, or guard every draw completion with a generation token.

Final Verdict

Request changes.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Aug 16, 2026
@azat azat self-assigned this Aug 16, 2026
async function reloadAll(do_search) {
disableButtons();
const epoch = ++reload_epoch;
cancelQueries();

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.

Because the page now keeps the old charts visible, clearing queries before searchQueries succeeds leaves the UI and the saved state out of sync whenever that search fails or gets superseded. The old chart DOM and plots stay on screen, but queries, customized, and the hash already describe an empty dashboard, so the next edit/reload runs against queries.length == 0 even though the user still sees the previous charts. Please stage the search result in a local array and only swap queries/saveState after the new dashboard has been fetched successfully.

/// Insert and draw only the new charts; the existing ones are not reloaded.
new_charts.forEach(q => findParamsInQuery(q.query, params));
buildParams();
plots.unshift(...new_charts.map(() => null));

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.

This incremental prepend path needs to supersede any in-flight refresh before it mutates queries and plots. If an older drawAll is still waiting on draw(0, old_chart_0) / draw(1, old_chart_1), the unshift plus insertChart(i) calls move those charts back, but the stale completions still write into plots[0] / plots[1]. That overwrites the new front slots and leaves plots, queries, and DOM order inconsistent for later resize, delete, or edit actions. At minimum this path should cancelQueries (or bump a generation token) before shifting the arrays.

@clickhouse-gh

clickhouse-gh Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 7be817c59 with master 369e1aafb (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 694.62 MiB 691.60 MiB -3.02 MiB (-0.43%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

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

@Michicosun
Michicosun added this pull request to the merge queue Aug 17, 2026
Merged via the queue into master with commit 67811d8 Aug 17, 2026
179 of 181 checks passed
@Michicosun
Michicosun deleted the dashboard_patch branch August 17, 2026 08:18
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 17, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Aug 18, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Aug 18, 2026
clickhouse-gh Bot pushed a commit that referenced this pull request Aug 18, 2026
clickhouse-gh Bot added a commit that referenced this pull request Aug 18, 2026
Backport #115019 to 26.6: Improve Dashboard Webpage
Michicosun added a commit that referenced this pull request Aug 21, 2026
Backport #115019 to 26.3: Improve Dashboard Webpage
Michicosun added a commit that referenced this pull request Aug 21, 2026
Backport #115019 to 26.5: Improve Dashboard Webpage
Michicosun added a commit that referenced this pull request Aug 21, 2026
Backport #115019 to 26.7: Improve Dashboard Webpage
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Aug 24, 2026
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo v26.2-must-backport v26.4-must-backport v26.6-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants