Skip to content

chore(streaming): remove VNC code path, Selkies-only#261

Merged
JoshuaAFerguson merged 1 commit into
mainfrom
chore/remove-vnc-selkies-only
Apr 25, 2026
Merged

chore(streaming): remove VNC code path, Selkies-only#261
JoshuaAFerguson merged 1 commit into
mainfrom
chore/remove-vnc-selkies-only

Conversation

@JoshuaAFerguson

Copy link
Copy Markdown
Member

Summary

Selkies-GStreamer (WebRTC) is the only supported streaming protocol going forward. The dual-protocol VNC code path is removed.

Deleted

Path What it was
`api/internal/handlers/vnc_proxy.go` VNC WebSocket proxy handler
`api/internal/handlers/vnc_proxy_test.go` its tests
`api/static/vnc-viewer.html` noVNC client static page
`agents/k8s-agent/agent_vnc_handler.go` VNC message handler in agent
`agents/k8s-agent/agent_vnc_tunnel.go` VNC port-forward tunnel manager
`tests/scripts/phase{1,4}/test_vnc.sh` VNC test scripts

Removed routes: `/api/v1/vnc/:sessionId`, `/api/v1/vnc-viewer/:sessionId`, `/api/v1/websockify/*`.

Renamed agent ↔ control-plane protocol fields (protocol-agnostic naming)

  • `StatusMessage.VNCReady` → `StreamingReady` (json: `streamingReady`)
  • `StatusMessage.VNCPort` → `StreamingPort` (json: `streamingPort`)
  • `AgentStatusUpdate.VNCReady/VNCPort` → same rename
  • `TemplateConfig.VNCPort` → `StreamingPort`
  • Deleted constants: `MessageTypeVNCData`, `MessageTypeVNCClose`, `MessageTypeVNCReady`, `MessageTypeVNCError`
  • Deleted structs: `VNCDataMessage`, `VNCReadyMessage`, `VNCCloseMessage`, `VNCErrorMessage`
  • Removed agent's `vnc_data` / `vnc_close` message dispatch

Other updates

  • DB defaults: `'vnc'`/`5900` → `'selkies'`/`8080` across 8 query sites
  • Auth + security-headers strip `/vnc/`, `/vnc-viewer/`, `/websockify/` special cases; only `/api/v1/http/` remains
  • Agent sends `streamingReady=(state == "running")` and `streamingPort=8080`
  • `agent_websocket` constructs `streamingURL=/api/v1/http//`
  • UI `SessionViewer` collapses the dual-protocol iframe branch to Selkies-only
  • UI mocks + `api.ts` updated to `selkies`/`8080`
  • `api/Dockerfile` no longer copies `static/` (deleted)
  • `sessiontemplates.go` default port 3000 → 8080

Verified

  • `go build ./...` clean: api, agents/docker-agent, agents/k8s-agent
  • `go test ./...` passes for api/handlers, websocket, services
  • `npm run build` clean for ui

Deferred to the docs/wiki phase

~100 references to VNC remain in `docs/`, ADRs, README/CHANGELOG/ROADMAP, GitHub issue templates, helm chart docs, and several E2E spec files. None affect compilation or behavior; they're historical-context references and will be reconciled in Phase 6 of the cleanup plan (docs + wiki rebuild).

Selkies-GStreamer (WebRTC) is the only supported streaming protocol going
forward. The dual-protocol VNC code path is removed.

Deleted:
- api/internal/handlers/vnc_proxy.go         VNC WebSocket proxy handler
- api/internal/handlers/vnc_proxy_test.go    its tests
- api/static/vnc-viewer.html                 noVNC client static page
- agents/k8s-agent/agent_vnc_handler.go      VNC message handler in agent
- agents/k8s-agent/agent_vnc_tunnel.go       VNC port-forward tunnel manager
- tests/scripts/phase{1,4}/test_*_vnc_*.sh   VNC test scripts

Removed routes:
- /api/v1/vnc/:sessionId       (VNC proxy)
- /api/v1/vnc-viewer/:sessionId (noVNC iframe page)
- /api/v1/websockify/*          (websockify path)

Renamed agent ↔ control-plane protocol fields for protocol-agnostic naming:
- StatusMessage.VNCReady    → StatusMessage.StreamingReady    (json: streamingReady)
- StatusMessage.VNCPort     → StatusMessage.StreamingPort     (json: streamingPort)
- AgentStatusUpdate.VNCReady → AgentStatusUpdate.StreamingReady
- AgentStatusUpdate.VNCPort  → AgentStatusUpdate.StreamingPort
- TemplateConfig.VNCPort    → TemplateConfig.StreamingPort
- Removed: MessageTypeVNCData, MessageTypeVNCClose, MessageTypeVNCReady,
  MessageTypeVNCError; VNCDataMessage, VNCReadyMessage, VNCCloseMessage,
  VNCErrorMessage; agent's vnc_data/vnc_close message dispatch.

Updated:
- DB defaults flipped from 'vnc'/5900 to 'selkies'/8080 across 8 query sites
- StreamingProtocol field doc comment updated (selkies-only)
- Auth middleware + security headers strip the /vnc/, /vnc-viewer/, /websockify/
  proxy-path special cases; only /api/v1/http/ remains
- Agent sends streamingReady=(state == "running") and streamingPort=8080
- agent_websocket constructs streamingURL=/api/v1/http/<id>/ instead of vncURL
- UI SessionViewer collapses the dual-protocol iframe branch to Selkies-only
- ui/src/lib/api.ts + ui/src/mocks/handlers.ts updated to selkies/8080
- api/Dockerfile no longer copies static/ (the static dir is gone)
- sessiontemplates.go default port 3000 → 8080

Verified: api / agents/k8s-agent / agents/docker-agent / ui all build;
api + websocket + handlers tests pass.

Note: ~100 docs/ + ADR + e2e-spec files still mention VNC. Those are
historical-context references and are deferred to the docs/wiki phase
(Phase 6 of the cleanup plan).
@JoshuaAFerguson JoshuaAFerguson merged commit d627923 into main Apr 25, 2026
16 of 28 checks passed
@JoshuaAFerguson JoshuaAFerguson deleted the chore/remove-vnc-selkies-only branch April 25, 2026 19:22
@github-actions github-actions Bot added testing component:backend Backend API (Go) component:ui Frontend UI (React) component:k8s-agent Kubernetes Agent component:database Database/Migrations labels Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:backend Backend API (Go) component:database Database/Migrations component:k8s-agent Kubernetes Agent component:ui Frontend UI (React) testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant