Skip to content

Add node shell console access from the Hosts page#27

Merged
BeardedTech0o merged 1 commit into
mainfrom
feat/node-shell-console
Jul 6, 2026
Merged

Add node shell console access from the Hosts page#27
BeardedTech0o merged 1 commit into
mainfrom
feat/node-shell-console

Conversation

@BeardedTech0o

@BeardedTech0o BeardedTech0o commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds Proxmox's "Datacenter > Node > Shell" equivalent — a terminal on the node itself, not a guest VM/container.
  • Extends the existing console plumbing (session store, WebSocket bridge, ticket issuance) to support a second session kind alongside guest consoles:
    • lib/proxmox/endpoints.ts: nodeTermProxy() calls POST /nodes/{node}/termproxy.
    • lib/server/consoleStore.ts: ConsoleSession is now a 'guest' | 'node' discriminated union (node sessions have no vmid/type, always mode: 'term').
    • lib/server/consoleProxy.ts: upstreamUrl() builds the node-level vncwebsocket path (no /{type}/{vmid} segment) for 'node' sessions.
    • pages/api/console/connect.ts: accepts type: 'node' as a third ticket kind alongside the existing qemu/lxc guest schema.
    • pages/console/[hostId]/node/[node].tsx: new page, a trimmed copy of the guest console (xterm + WS bridge only — no VNC branch, no mobile-keyboard bridge needed since xterm already handles that itself).
  • Hosts page: each host row gets a terminal icon that opens the shell directly for single-node hosts (the common case), or expands an inline node picker for multi-node clusters.

Test plan

  • npm run typecheck
  • npm test (21/21 passing)
  • npm run build
  • Verified end-to-end against a mocked backend (Playwright): single-node host's console button navigates straight to /console/{hostId}/node/{node}; multi-node host expands a picker listing both nodes correctly.
  • Needs live confirmation — this sandbox has no real Proxmox host to connect to, so the actual WebSocket bridge to a node's shell can't be verified end-to-end here. Please redeploy and try opening a node shell from the Hosts page. Same flagged risk as the guest console originally had: the API token needs the right privilege for this (Sys.Console at minimum) — if it fails, check the token's permissions on that host, same as we had to do for the guest console early on.

Generated with Claude Code.

Adds Proxmox's "Datacenter > Node > Shell" equivalent — a terminal on the
node itself, not a guest VM/container. Extends the existing console
plumbing (session store, WebSocket bridge, ticket issuance) to support a
second session kind alongside guest consoles:

- lib/proxmox/endpoints.ts: nodeTermProxy() calls POST /nodes/{node}/termproxy.
- lib/server/consoleStore.ts: ConsoleSession is now a 'guest' | 'node'
  discriminated union (node sessions have no vmid/type, always mode:'term').
- lib/server/consoleProxy.ts: upstreamUrl() builds the node-level
  vncwebsocket path (no /{type}/{vmid} segment) for 'node' sessions.
- pages/api/console/connect.ts: accepts type:'node' as a third ticket kind
  alongside the existing qemu/lxc guest schema.
- pages/console/[hostId]/node/[node].tsx: new page, a trimmed copy of the
  guest console (xterm + WS bridge only — no VNC branch, no mobile-keyboard
  bridge needed since xterm already handles that itself).

Hosts page: each host row gets a terminal icon that opens the shell
directly for single-node hosts (the common case), or expands an inline
node picker for multi-node clusters.

Verified end-to-end against a mocked backend: single-node host navigates
straight to /console/{hostId}/node/{node}; multi-node host expands a
picker listing both nodes correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pnq8TgxCk7qHhd2PUExmpb
@BeardedTech0o
BeardedTech0o merged commit a243cf1 into main Jul 6, 2026
2 checks passed
BeardedTech0o added a commit that referenced this pull request Jul 7, 2026
Adds Proxmox's "Datacenter > Node > Shell" equivalent — a terminal on the
node itself, not a guest VM/container. Extends the existing console
plumbing (session store, WebSocket bridge, ticket issuance) to support a
second session kind alongside guest consoles:

- lib/proxmox/endpoints.ts: nodeTermProxy() calls POST /nodes/{node}/termproxy.
- lib/server/consoleStore.ts: ConsoleSession is now a 'guest' | 'node'
  discriminated union (node sessions have no vmid/type, always mode:'term').
- lib/server/consoleProxy.ts: upstreamUrl() builds the node-level
  vncwebsocket path (no /{type}/{vmid} segment) for 'node' sessions.
- pages/api/console/connect.ts: accepts type:'node' as a third ticket kind
  alongside the existing qemu/lxc guest schema.
- pages/console/[hostId]/node/[node].tsx: new page, a trimmed copy of the
  guest console (xterm + WS bridge only — no VNC branch, no mobile-keyboard
  bridge needed since xterm already handles that itself).

Hosts page: each host row gets a terminal icon that opens the shell
directly for single-node hosts (the common case), or expands an inline
node picker for multi-node clusters.

Verified end-to-end against a mocked backend: single-node host navigates
straight to /console/{hostId}/node/{node}; multi-node host expands a
picker listing both nodes correctly.



Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants