Skip to content

feat: DH-22593: Attach to workers - #323

Draft
bmingles wants to merge 71 commits into
mainfrom
DH-22593_attach-to-worker
Draft

feat: DH-22593: Attach to workers#323
bmingles wants to merge 71 commits into
mainfrom
DH-22593_attach-to-worker

Conversation

@bmingles

Copy link
Copy Markdown
Collaborator

DH-22593: Attach to workers

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploying docs previews for 3382ded (available for 14 days)

VS Code Extension

@bmingles
bmingles force-pushed the DH-22593_attach-to-worker branch from 1fd82a5 to 04f3a59 Compare June 16, 2026 17:15
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

End-to-end Test Summary

Tests 📝Passed ✅Failed ❌Skipped ⏭️Pending ⏳Other ❓Flaky 🍂Duration ⏱️
514000009:21:23
A ctrf plugin

Failed Test Summary

NameStatusFailure Message
Panels Tests "before all" hook for "should open panels"failed ❌TimeoutError Waiting until element is visible Wait timed out after 5024ms
Panels Tests "after all" hook for "should open panels"failed ❌NoSuchElementError no such element: Unable to locate element: {"method":"css selector","selector":".codicon-close"} (Session info: chrome=148.0.7778.280)
Status Bar Tests should connect to server on clickfailed ❌Error Expected "Basic Login" option not found in authentication methods. Available options:
Status Bar Tests "after all" hook for "should connect to server on click"failed ❌NoSuchElementError no such element: Unable to locate element: {"method":"css selector","selector":".codicon-close"} (Session info: chrome=148.0.7778.280)
A ctrf plugin

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Unit Test Summary

Tests 📝Passed ✅Failed ❌Skipped ⏭️Pending ⏳Other ❓Flaky 🍂Duration ⏱️
101010100000000:00:00
A ctrf plugin

Failed Test Summary

No failed tests ✨

@bmingles
bmingles force-pushed the DH-22593_attach-to-worker branch from 3f24b74 to 3173630 Compare June 16, 2026 17:25
bmingles added 20 commits June 16, 2026 12:25
Add an explicit "+" (Create Worker) inline action to DHE server nodes in
the WORKERS tree. It always creates a new IC worker on the server and
attaches to it, independent of how many workers already exist.

- ServerManager.createWorker composes _createWorker + _attachToWorker.
- getConnectionTreeRootNodes also renders connected DHE servers so the
  server node (and its action) stays reachable with zero workers.
- CREATE_WORKER_CMD + CreateWorkerCmdArgs, package.json command/palette/
  view-item-context wiring, and ConnectionController.onCreateWorker.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (#DH-22593)
Active-connection picker items now mirror the WORKERS-tree worker node:
leading language icon (getConsoleTypeIconId) + worker-name label
(getConnectionWorkerLabel), with the server host:port moved to the
description. createConnectionQuickPickOptions is now async and takes an
IServerManager to resolve each connection's parent server and worker info.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (#DH-22593)
Separator headers (Running / Starting up / Stopped / Other) replace the flat
list, and the unset row moves in with the terminal statuses — a query that
reports no status has stopped without saying so. A group with no rows
contributes no separator. Separators are visual only: VS Code ignores every
property but the label on them and they cannot be picked, so a whole group
still cannot be toggled in one click.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
Two sections instead of four, divided by whether a query has finished moving.
`Stopping` moves into Running — it is winding down, not gone — and so do any
statuses the extension doesn't recognize, since nothing says they have stopped.
The Stopped section (the terminal statuses minus Stopping, plus the unset one)
is exactly what the filter hides on first run.

This adds STOPPED_QUERY_STATUSES rather than narrowing TERMINAL_QUERY_STATUSES:
the terminal set drives worker-lifecycle teardown in DheService / dhe.ts, where
Stopping must keep counting as terminal or a worker on its way out would never
be detached.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
- `Stopping` now draws the spinner rather than the stop sign: it is still in
  motion, and it already sits in the filter's Running section.
- The server node drops its `(13 of 58)` description. A filtered server instead
  gets a trailing `Hidden (20,007)` node with an ellipsis icon, always after its
  queries, whose click opens the status filter. It appears only when something
  is actually hidden.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
STOPPED_QUERY_STATUSES doubles as the picker's row order for that section, so
reordering it there is enough — its other consumers (the default hidden set and
isStoppedQueryStatus) are order-independent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
Every refresh gets navigation@99 and the other title actions an explicit low
order, so refresh sorts last in each view instead of relying on a bare
"navigation" group (which sorts as order 0, ahead of anything numbered).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
VS Code generates a TreeItem id from the label when none is set, so two queries
sharing a name produced colliding ids, and the "More (N)" node became a new
node on every table tick as its count changed. Both confuse selection and the
tree's find widget. Query nodes are now keyed by serial, the More node by its
server, and server nodes by url.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
The table ticks on every row add/remove and status transition, and each tick
fired a full Persistent Queries tree refresh — constant on a server holding
tens of thousands of queries, and likely to land mid-interaction with the
tree's find widget.

Notifications are now rate limited to one per 250ms via a new
createThrottledTrigger: leading edge, plus a trailing run if more ticks arrived
during the window. Deliberately a throttle rather than a debounce — a table
that never goes quiet would reset a debounce timer forever and the tree would
stop updating entirely. The serial set behind getQuerySerials is still updated
on every tick, so only the notification is coalesced.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
The funnel is now a submenu rather than a button. It holds a checkable row per
status section plus "Filter by Status..." for the existing per-status picker.

Extension menus cannot render a real checked state, so each section is a pair of
commands with complementary `when` clauses on a new
`<viewId>.<section>Visible` context key, the checked variant carrying a literal
U+2713 in its title. Two submenu declarations (hollow / filled funnel) keep the
at-a-glance filtered indicator that the removed filterPersistentQueriesActive
command used to provide.

A section counts as shown when *any* of its statuses is listed, so a section
partly hidden through the per-status picker still unchecks to "hide the rest"
rather than doing nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
…ter section rows only when the whole group is listed (#DH-22593)
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.

1 participant