Repository navigation
feat(admin): Reorganize the System Queries form into Where, What and How - #8550
Merged
Merged
Conversation
Opening /#system-queries?query=...&storage=...&host=host:port fills in the editor, storage and host, and shows a warning that whoever clicks Execute is responsible for the query. Nothing runs until the user clicks Execute, and sudo mode is never set from a link. Each history card also gets a "Share query" button that copies such a link for that query. This lets an agent point someone at a query to review and run, and makes it easier to share queries with teammates. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Pasting a share link while already on System Queries only changes the hash, so the page doesn't reload and the form ignored the new link. Remount the form when the hash changes to one with link params. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Split the form into labelled sections: storage and host (with the host-entry toggle), the query editor, and the mode toggle next to the Execute button. The on/off switches become two-option toggles so both choices are visible, and the mode toggle explains what user and sudo mode allow. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Use the home page's section heading style for the System Queries
headings (now shared via theme.tsx), with a smaller version for the
Where/What/How labels. Bootstrap's legend styles made those labels
oversized.
In sudo mode, highlight only the How section in red and make the
Execute button red ("Execute Sudo Query") instead of putting a thick
red border around the whole form.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Flag the next field needed before a query can run (storage, then host) with an orange outline and hint, and explain the disabled Execute button with a tooltip. Also put the host-entry toggle on the same line as storage and host, give the predefined query picker a proper label and smaller description, and move the share-link warning above the page heading. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ElioDiNino
approved these changes
Oct 15, 2026
Base automatically changed from
feat/admin-system-query-share-links
to
master
October 15, 2026 18:16
…ueries-sections # Conflicts: # snuba/admin/static/clickhouse_queries/query_display.tsx # snuba/admin/static/tests/clickhouse_queries/prefill.spec.tsx
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.
Reorganizes the System Queries form for readability. The aim is a clearer order of steps, not a visual redesign.
Before
After
Layout
The old on/off switches only showed the current state, so "Auto Populate Nodes" read like a label rather than one of two options. The toggles show both options.
Sudo mode
Only the How section turns red, and the button turns red and reads "Execute Sudo Query". The thick red border around the whole form is gone.
Missing fields
The next field needed before the query can run gets an orange outline and a hint: storage first, then host. Hovering the disabled Execute button shows a tooltip saying what's missing, including when the query is empty.
Styling
SECTION_HEADING_STYLEintheme.tsx. The Where/What/How labels use a smaller version of it, which also overrides Bootstrap's large, full-width legend styles.QueryEditor, so Querylog and the Outcomes Analyzer get the same look.Other changes
ExecuteButtontakes an optionalcolor. Other pages don't pass it, so they're unchanged.COLORS.WARNING(#b35c00) is added totheme.tsxfor the missing-field cue.Tests
New tests check the missing-host hint, the disabled button and its tooltip, and that the cue goes away once a host is set. Nothing tests the sudo styling yet.
🤖 Generated with Claude Code