feat(routeviz): route visualizer scaffold — live per-leg route view + /route-mux HTTP seam - #4049
Merged
Merged
Conversation
… /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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 exposingRouteGroupMuxInfoatGET /api/visors/{pk}/route-mux?app=<name>. The per-leg mux telemetry was previously reachable only fromcli 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 fromcmd/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+ policyForwardMux/ReverseMux), and the recommended long-term home.Scaffolded vs designed-only
Scaffolded (working): the
/route-muxHTTP endpoint + the live/route-vizper-leg page + a handler test.Designed-only (deferred): route-over-graph layout; per-leg full intermediate-PK path (needs
pkg/routerto 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 Angularroutingpage.Recommended home
Standalone
/route-viznow (zero build cost, iterable); graduate the selection actuation + path-over-graph layout into the Angularroutingpage (itsRoutingViewalready 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/routeror routing policy.go build .green;go vet+gofmtclean;TestGetRouteVizpasses.Try it