Skip to content

Show the desktop Active Queries columns on the web Queries tab (#4843) - #5102

Merged
erikdarlingdata merged 2 commits into
devfrom
feature/4843-web-active-queries-cols
Oct 4, 2026
Merged

erikdarlingdata merged 2 commits into
devfrom
feature/4843-web-active-queries-cols

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

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_queries now returns wait_resource, percent_complete and query_hash, read from the stored query_snapshots columns 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_COLUMNS in server-tabs.js: only that array was edited.
  • Budget: the live default-call test (25 rows, ten of them with 2,800-character query text) still passes under the 32 KB target with the three fields planted on every row. No size reduction was needed.

What's not changed

  • Snapshot picker and Latest Snapshot button: not added. get_active_queries takes as_of, but it is a window end (hours_back ending at as_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's get_active_queries table) is unchanged. It is a separate 9-column list.
  • panels.js, util.js, index.html, app.js untouched.

Verified at the head

Run on macOS against a local TimescaleDB rig (removed afterwards).

  • New 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.
  • New 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.
  • DarlingMcpActiveQueriesBudgetLiveTests 1/1 (seed now fills the three columns), McpFilterSemanticsLivePostgresTests 4/4, DarlingMcpSessionToolsSurfaceAndSqlTests 13/13, DarlingMcpSessionToolsLivePostgresTests 1/1, DarlingActiveQueriesLiveTests 6/6.
  • McpPayloadContractCensusTests 68/68, McpPageContractTests 43/43, McpReadCommandTimeoutTests 43/43.
  • ViewerGridPayloadColumnOrderPinTests 30/30, WebModuleLoadTests 7/7, the node load harness (42 modules loaded).
  • TsqlConventionGuardTests 14, DocCommentHygieneTests 77, RepoFileAdoptionTests 2, FleetIdentifierScrubTests 3: all pass.
  • Full Darling.Tests suite, once: 22,367 total, 552 failed. Compared with the Mac-local list for dev, two names are not on it: ViewerGridPayloadColumnOrderPinTests.EveryWebGridWithQueryText_PutsItRightOfTheAnchor (mine, caused by SPID being first; fixed and re-run green) and CollectionLogSegmentByLiveTests.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.
  • Lite.Tests: not touched, not run.
  • scrubcheck on 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_queries returns wait_resource, percent_complete and query_hash for the three that were missing.
REF: [#5102]: #5102

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 erikdarlingdata added the merge-train In a merge train: its CI ran on the train PR label Oct 4, 2026
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review October 4, 2026 21:03
@erikdarlingdata
erikdarlingdata merged commit 55ff04e into dev Oct 4, 2026
15 of 17 checks passed
@erikdarlingdata
erikdarlingdata deleted the feature/4843-web-active-queries-cols branch October 4, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-train In a merge train: its CI ran on the train PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant