Repository navigation
Show the desktop Active Queries columns on the web Queries tab (#4843) - #5102
Merged
Merged
Conversation
get_active_queries now also returns wait_resource, percent_complete and query_hash, and the grid shows all 24 columns the desktop grid binds, in its order and wording.
erikdarlingdata
marked this pull request as ready for review
October 4, 2026 21:03
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.
Part of #4843
What users see change
The web Queries tab's Active Queries grid goes from 12 columns to the 24 the desktop grid binds, in the desktop's order and wording: Collected, Query Text, SPID, Database, Login, Host, Program, Status, Elapsed, CPU (ms), Logical Reads, Reads, Writes, Wait Type, Wait (ms), Wait Resource, Blocking, DOP, Workers, Memory (GB), Isolation, Open Tran, % Done, Query Hash. Numbers use the grid's
format, not pre-formatted strings.Collected and Query Text stay first and second, because an existing pin (#1949) requires query text right of the time anchor on every web grid. SPID sits third, not first as on the desktop. The desktop's plan column (Estimated/Live buttons) is not on the web.
What changed
get_active_queriesnow returnswait_resource,percent_completeandquery_hash, read from the storedquery_snapshotscolumns in the existing statement (ActiveQueriesSql). Empty or null values come back as null, like the other optional fields. The tool Description is unchanged, and no parameter was added.ACTIVE_COLUMNSinserver-tabs.js: only that array was edited.What's not changed
get_active_queriestakesas_of, but it is a window end (hours_backending atas_of), not a pick-one-capture selector. The desktop's Latest Snapshot also asks the service to capture a new snapshot, which is a command route (D1). Left for a later lane.read-fields.js(the notebook'sget_active_queriestable) is unchanged. It is a separate 9-column list.panels.js,util.js,index.html,app.jsuntouched.Verified at the head
Run on macOS against a local TimescaleDB rig (removed afterwards).
ActiveQueriesWidenedColumnsTests(4): desktop order, every grid key is in the read's projection, formats, SQL selects the three columns. RED on dev: 3 of 4 fail (the 4th passes on dev because the projection check only runs against keys present). Green at the head: 4/4.ActiveQueriesWidenedColumnsLiveTests(1): the tool's three values equal the stored columns on a fixed two-row seed, and are null when not stored. RED on dev: fails. Green at the head: 1/1.DarlingMcpActiveQueriesBudgetLiveTests1/1 (seed now fills the three columns),McpFilterSemanticsLivePostgresTests4/4,DarlingMcpSessionToolsSurfaceAndSqlTests13/13,DarlingMcpSessionToolsLivePostgresTests1/1,DarlingActiveQueriesLiveTests6/6.McpPayloadContractCensusTests68/68,McpPageContractTests43/43,McpReadCommandTimeoutTests43/43.ViewerGridPayloadColumnOrderPinTests30/30,WebModuleLoadTests7/7, the node load harness (42 modules loaded).TsqlConventionGuardTests14,DocCommentHygieneTests77,RepoFileAdoptionTests2,FleetIdentifierScrubTests3: all pass.ViewerGridPayloadColumnOrderPinTests.EveryWebGridWithQueryText_PutsItRightOfTheAnchor(mine, caused by SPID being first; fixed and re-run green) andCollectionLogSegmentByLiveTests.AConvergedStore_IssuesNoAlter_...(a lock-timing live test on the other table family, unrelated; its sibling in the same class also fails on this rig and I did not check dev). CI decides it.scrubcheckon this file, the commit message and the diff: exit 0.CHANGELOG entry
SECTION: Added
ENTRY: - Web Active Queries grid shows the desktop's columns ([#5102]) - The Queries tab's Active Queries grid now has all 24 desktop columns, including Host, Reads, Writes, Workers, Memory, Isolation, Open Tran, Wait Resource, % Done and Query Hash.
get_active_queriesreturnswait_resource,percent_completeandquery_hashfor the three that were missing.REF: [#5102]: #5102