Skip to content

feat(routeviz): route visualizer scaffold — live per-leg route view + /route-mux HTTP seam - #4049

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/route-visualizer
Aug 21, 2026
Merged

feat(routeviz): route visualizer scaffold — live per-leg route view + /route-mux HTTP seam#4049
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/route-visualizer

Conversation

@0pcom

@0pcom 0pcom commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

What

A ROUTE-oriented view, distinct from the transport-graph network visualizer (pkg/tpviz). For a chosen (visor, app) it live-renders each active route group's mux legs — the parallel routes to the destination — as a per-leg table: transport kind, next-hop PK, latency, recv/sent rate + share, retransmits, and alive / warm-standby / dead gate state.

This is primarily design + a scaffolded first increment, not a finished visualizer. It proves the live per-leg data pipeline into a browser with no UI rebuild.

Changes

  • getRouteMux — new hypervisor HTTP handler exposing RouteGroupMuxInfo at GET /api/visors/{pk}/route-mux?app=<name>. The per-leg mux telemetry was previously reachable only from cli proxy mux info (RPC-only); this is the first browser-reachable seam for live per-leg route data.
  • /route-viz — self-contained embedded page (pkg/visor/routeviz/routeviz.html, vanilla JS, no Angular/tpviz build step). Visor + app pickers, live poll, per-leg rows with byte-delta rate/share (the render model from cmd/skywire-cli/commands/proxy/mux_info.go), gate-state pills, per-leg mini-path.
  • docs/design/route-visualizer.md — design note: available route data, the two data gaps, the route-selection actuation seam (AddMuxRoute/GrowMuxRoute/RemoveMuxRoute + policy ForwardMux/ReverseMux), and the recommended long-term home.

Scaffolded vs designed-only

Scaffolded (working): the /route-mux HTTP endpoint + the live /route-viz per-leg page + a handler test.

Designed-only (deferred): route-over-graph layout; per-leg full intermediate-PK path (needs pkg/router to record each leg's hop list — out of scope here); route-selection write actions; candidate-route overlay from /route-find+/route-calc; promotion into the Angular routing page.

Recommended home

Standalone /route-viz now (zero build cost, iterable); graduate the selection actuation + path-over-graph layout into the Angular routing page (its RoutingView already has a slot) embedding the tpviz bundle for the graph. Rationale in the design note.

Scope / safety

Read-only and additive. No changes to pkg/router or routing policy. go build . green; go vet + gofmt clean; TestGetRouteViz passes.

Try it

open http://<hv-host>:8000/route-viz     # pick a visor + app, watch legs update live
curl -s http://<hv>/api/visors/<pk>/route-mux?app=skysocks-client | jq
skywire-cli proxy mux info -n skysocks-client --watch 1s   # the CLI render this mirrors

… /route-mux HTTP seam

Adds a ROUTE-oriented view distinct from the transport-graph network
visualizer (pkg/tpviz). For a chosen (visor, app) it renders each active
route group's mux legs live — transport kind, next-hop PK, latency,
recv/sent rate + share, retransmits, and alive/standby/dead gate state.

- getRouteMux: new hypervisor HTTP handler exposing RouteGroupMuxInfo at
  GET /api/visors/{pk}/route-mux?app=<name>. Until now the per-leg mux
  telemetry was only reachable from `cli proxy mux info` (RPC-only); this
  is the first browser-reachable seam for live per-leg route data.
- /route-viz: self-contained embedded page (vanilla JS, no Angular/tpviz
  build). Visor + app pickers, live poll, per-leg rows with byte-delta
  rate/share (the render model from cmd/.../proxy/mux_info.go), gate-state
  pills, per-leg mini-path.
- docs/design/route-visualizer.md: design note — available route data,
  the two data gaps (no HTTP seam for live legs [closed here]; no per-leg
  full path [pkg/router, deferred]), the route-selection actuation seam
  (AddMuxRoute/GrowMuxRoute/RemoveMuxRoute + policy ForwardMux/ReverseMux),
  and the recommended home (standalone now → Angular routing page for the
  full selection UI + tpviz graph overlay).

Read-only, additive; no changes to pkg/router or routing policy.
@0pcom
0pcom merged commit 619d4bf into skycoin:develop Aug 21, 2026
12 of 16 checks passed
@0pcom
0pcom deleted the feat/route-visualizer branch August 24, 2026 23:45
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