Skip to content

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

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

feat: DH-22593: Attach to workers#323
bmingles wants to merge 39 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 b40ed02 (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 ⏱️
514000010:01:46
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 5002ms
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 ⏱️
9939930000000: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)
bmingles added 14 commits July 27, 2026 18:00
…2593)

Introduce one EnterpriseCorePlusManager per DHE server, built from the
extension's already-authenticated client (no second login), and a reusable
ticking QueryInfo table service for the upcoming PQ explorer.

- DheService: lazy getCorePlusManager() built via createJsApiFactories hooks
  (loadCorePlusApi + construct-only createCoreClient) using the existing DHE
  client, jsapi storage dir, and NodeHttp2gRPCTransport. Disposed with the
  service and reset on client-cache invalidation (manager is bound to the
  client instance). Added to the IDheService interface.
- QueryConfigTableService: getQueryInfoTable(filters) backed by
  makeFactoryServiceTablePromise (QUERY_CONFIG_TABLE) with a server-side
  filtered, ticking viewport subscription; pure getQueryTableFilters helper
  (owner/type/status/search) unit-tested against a mocked table; clear
  WebClientDataUnavailableError when the WebClientData system query is absent.
- Attach discovery is unchanged (stays on config events).
- dhe.ts: declare the ambient `iris` global as `var` so it merges with the
  jsapi-nodejs ambient declaration instead of conflicting.
- Add @deephaven-enterprise/{jsapi-nodejs,jsapi-manager,client-utils} deps at
  2026.1.48 (matching the installed @deephaven-enterprise/* packages).

Constructor verified against the installed EnterpriseCorePlusManager .d.ts:
(dhe, dheClient, workerKinds, loadCorePlusApi, createCoreClient).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (#DH-22593)
Add a dedicated "Persistent Queries" tree view that lists ACL-visible running
non-InteractiveConsole PQs and lets you open their exported objects read-only.

- PersistentQueryTreeProvider (extends ServerTreeProviderBase): DHE server ->
  filtered PQ nodes -> object leaves. PQ serials come from the ticking QueryInfo
  table (QueryConfigTableService, server-side filtered to running + non-helper
  types), resolved to full QueryInfo via getKnownConfigs(). Objects are read
  straight off queryInfo.designated.objects, so there is no connect-on-expand /
  subscribeToFieldUpdates lifecycle.
- Object leaves reuse getPanelVariableTreeItem + OPEN_VARIABLE_PANELS_CMD, so
  selecting an object opens the existing dhPanel embed webview unchanged.
- ServerManager.registerBrowseConnection / unregisterBrowseConnection: a
  lightweight non-console ConnectionState (+ worker-URL->server auth mapping +
  registerWorkerInfo) so the embed iframe can authenticate. Browse connections
  never initSession, never increment connectionCount, never enter
  _attachedWorkerSerials, and never delete the server-side PQ.
- Register the vscode-deephaven.view.persistentQueryTree view, a refresh title
  command, and createTreeView wiring in ExtensionController.
- Unit tests for the provider + tree-item helpers; headless validation script
  (scripts/validate-pq-explorer.mjs) and manual smoke doc
  (docs/manual-smoke-pq-explorer.md) for requester-run verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (#DH-22593)
…DH-22593)

Move the "Persistent Queries" view to sit directly after "Workers" (before
"Panels"/"Remote Import Sources") in the list view container.

Plain "connect to server" (server node / operate-as) no longer auto-creates a
DHE worker when none are attachable: it connects and attaches to existing IC
workers so persistent queries can populate without provisioning a worker.
Worker creation stays explicit (the "+" action) or on-demand via the run-code
editor flow. Threaded through a `createWorkerIfNone` flag on
`connectToServer`/`_createOrAttachToWorkers` (defaults to true to preserve the
run-code and managed-server paths); `onConnectToServer` passes false.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (#DH-22593)
…riables that can actually render get a panel. (#DH-22593)
- Interactive Consoles worker nodes show a shortened worker name (trailing
  generated id clipped to 6 chars) with the full name on hover.
- Worker nodes now list their panel variables beneath their associated editor
  files (files first, then panels, each alphabetized). The drop controller
  ignores the new leaves and the deleteVariable menu covers the view.
- Persistent Queries groups each server's queries under Running / Stopped.
  Status moves off the node icon: PQ nodes show their script language, with the
  spinner reserved for transitional statuses. An unset status groups under
  Stopped, since a stopped PQ can report none.

The Panels tree is intentionally left in place for comparison.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#DH-22593)
Its contents now live under the worker nodes in INTERACTIVE CONSOLES. Removes
the provider + spec, the ServerConnectionPanelNode / ServerConnectionPanelTreeView
types, the view id, the view / command / menu contributions (searchPanels,
refreshPanelsTree), the controller wiring, and the now-dead
getPanelConnectionTreeItem helper. getFirstSupportedConsoleType takes a
ConnectionState now that variables no longer reach it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#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