Skip to content

feat(admin): Put the System Queries editor in a sticky, closable panel - #8554

Merged
onewland merged 3 commits into
masterfrom
feat/admin-system-queries-sticky-editor
Oct 16, 2026
Merged

onewland merged 3 commits into
masterfrom
feat/admin-system-queries-sticky-editor

Conversation

@onewland

@onewland onewland commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

On a laptop screen, the System Queries form took up the whole viewport, so you had to scroll to see any results. The editor now sits in a panel that sticks just below the header. You can close it to a one-line bar that shows the storage, host and query. Clicking anywhere on that bar reopens the editor, from any point in the results.

The column headers of tabular results stick just below the editor pane, open or closed. You can scroll down a long result and still see both the editor and what each column is.

  • The panel closes after a successful run and scrolls to the new result. It stays open if the query fails, so you can fix it.
  • Closing only hides the editor, so the predefined-query choice and parameter values are kept.
  • The Where / What / How boxes are gone; spacing separates the rows. Sudo mode still puts a red frame around the execute row, because sudo queries can change data.
  • The close button is now a red "Close" button instead of a small grey X.
  • The mode explainer sits on the same row as the mode toggle and Execute.

Notes for review:

  • Sticky headers don't work inside an element that scrolls or uses overflow: hidden. So the result card now uses overflow: clip, and result tables no longer scroll sideways. Wide results wrap to fit instead.
  • The predefined-query label now sits beside its picker. This is in the shared query_editor.tsx, so it also changes Querylog, Tracing, Outcomes Analyzer and Snuba Explain.

Before:
Screenshot 2026-10-16 at 12 09 04 PM

After:
Screenshot 2026-10-16 at 12 07 18 PM
Screenshot 2026-10-16 at 12 07 13 PM

Editor open to query results where it wouldn't have been possible to look at both before (you would have had to scroll past it):
Screenshot 2026-10-16 at 12 12 13 PM

🤖 Generated with Claude Code

onewland and others added 3 commits October 16, 2026 12:05
The editor took up most of a laptop screen, pushing results below the
fold. It now sits in a panel that sticks below the header and closes to
a one-line bar showing the storage, host and query, so it can be
reopened from anywhere in the results. The whole bar opens it.

The panel closes after a successful run and scrolls to the results. It
stays open on error so the query can be fixed. The editor is hidden
rather than unmounted, so its state survives closing.

Also add space above the results heading.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The Where, What and How boxes added space without helping, so the rows
are now separated by spacing only. Sudo mode keeps a red frame around the
execute row, since it can change data.

Also make the editor's close button a clearly labelled red button, put the
predefined query label beside its picker, and put the mode explainer on
the same line as the mode toggle and Execute.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Result table headers now stick just below the editor pane, open or
closed, so a long result can be scrolled with the editor still on
screen. The pane's height is measured and passed down as a CSS variable.

Sticky positioning breaks under a scrolling or overflow: hidden
ancestor, so the result card clips with overflow: clip and the table no
longer scrolls sideways. Wide results wrap instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@onewland
onewland marked this pull request as ready for review October 16, 2026 19:17
@onewland
onewland requested a review from a team as a code owner October 16, 2026 19:17
@onewland
onewland merged commit b7e150b into master Oct 16, 2026
69 checks passed
@onewland
onewland deleted the feat/admin-system-queries-sticky-editor branch October 16, 2026 20:13
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants