Repository navigation
feat(admin): Bring the System Queries layout to the Querylog page - #8565
Merged
Merged
Conversation
Give the Querylog page the sticky, closable editor panel, history cards and share links from System Queries. Links of the form #querylog?query=... pre-fill the editor; unlike System Queries there's no warning, since the querylog cluster isn't production. The querylog schema moves out of the results into a drawer beside the editor, which starts below the page header. The editor panel, prefill warning and history card are extracted into shared components so both pages use the same code. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
onewland
marked this pull request as ready for review
October 19, 2026 21:37
ElioDiNino
approved these changes
Oct 19, 2026
MeredithAnya
added a commit
that referenced
this pull request
Oct 20, 2026
…er to use (#8569) Follow-up to #8554 and #8550. ### Bugs fixed - Large results no longer break scrolling. Long values wrapped a few characters per line, and wide tables couldn't scroll sideways. - The page no longer jumps to the results after Execute. - The open editor no longer covers the results as you scroll. - The "Select a host" warning no longer flashes while the node list loads. - The Execute button no longer changes size or flickers while a query runs. - Copy buttons now work when admin is served over plain http. - A long query no longer pushes the errors off screen. The query box is capped at 40% of the window height and scrolls inside it. ### Behaviour changed - Storage, Host and the host entry toggle sit in a row at the top that stays visible when the editor is closed. The manual-host rules moved into a tooltip. - The User/Sudo toggle and the predefined query dropdown moved into the editor's title row, next to Close. Their help text and descriptions show on hover. - Errors show under the query, next to Execute, which is pinned to the right. Errors are hidden with the editor, and a failed run reopens it. - Older results collapse when a newer run becomes the latest. - Results no longer show their SQL inline; a small SQL button toggles it. - The copy buttons on results are now icons with tooltips. - The result card changes also apply to the Querylog page, which shares the card with System Queries since #8565. ### Behaviour added - A results table for System Queries: row numbers, a header that stays visible, single-line values you can click to expand, and an "Expand to all N rows" button for long results. - Execute next to Storage and Host when the editor is closed. - Host auto-fills with the storage's first node. Links that don't name a host are left alone. - "Copy as table" (tab-separated, pastes into spreadsheets) and "Copy as Markdown". - A "No results" label on empty results. - A trash icon to clear saved results. <img width="1501" height="760" alt="Screenshot 2026-10-19 at 6 04 20 PM" src="https://github.com/user-attachments/assets/84b61a62-bdb9-4348-b1c0-63a82197abdb" /> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the recent System Queries styling to the ClickHouse Querylog page: the sticky, closable editor panel, results as history cards with sticky table headers, and Share query links.
Share links look like
#querylog?query=...and pre-fill the editor without running anything. Unlike System Queries, the Querylog page shows no "filled in from a link" warning, since the querylog cluster isn't production. Pasting a link while already on the page also works."View Querylog Schema" used to push the schema into the results history, mixed in with real query results. It's now a "Querylog schema" button in the editor's title row that opens a drawer on the right, below the page header. The drawer has no overlay, so you can keep editing while it's open. It shows only the name, type and comment columns from DESCRIBE, with a filter box, and fetches the schema the first time it's opened.
Screenshots:

To avoid duplicating the System Queries UI, the shared pieces are pulled out and used by both pages:
editor_panel.tsx: the sticky editor panel layout, the prefill warning, and the sticky table header stylesquery_history_entry.tsx: the history card, now generic.clickhouse_queries/query_history_entry.tsxis a thin wrapper that still parses storage and host out of saved System Queries entries, so that page works as before.buildHashUrlinclickhouse_queries/prefill.tsx, used by both pages' share linksThings to look at in review:
window.alert.I couldn't test this against real data locally, because setting up a querylog cluster in a local environment is cumbersome. Coverage comes from new Jest tests (
static/tests/querylog/index.spec.tsx) with a mocked API. They cover link round-trips, pre-filling from a link, the editor closing after a run, Share query, and the schema drawer and its filter. The existing System Queries tests pass unchanged.🤖 Generated with Claude Code