Make Go2 teleop web UIs LAN-aware#2377
Conversation
Greptile SummaryThis PR makes the Go2 teleop and Rerun dashboard web UIs LAN-aware by replacing hardcoded
Confidence Score: 5/5Safe to merge — all changes are additive or are replacements of hardcoded values with dynamic equivalents, and each code path is covered by a new focused test. The diff removes hardcoded localhost URLs, replaces a global singleton read with per-instance config reads, and adds an explicit keyword-only No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant Dashboard as rerun_dashboard.html
participant WS as WebsocketVisModule<br/>(host=listen_host)
participant Phone as PhoneTeleopModule<br/>(_create_web_server)
participant RWI as RobotWebInterface<br/>(host kwarg)
participant FastAPI as FastAPIServer
Browser->>Dashboard: GET /dashboard (LAN IP)
Dashboard->>Dashboard: window.location.hostname → rerunHost
Dashboard->>Dashboard: params / DIMOS_RERUN_CONFIG overrides
Dashboard->>Dashboard: hostForUrl() + normalizeHttpProtocol()
Dashboard->>WS: "commandCenter.src = origin/command-center"
Dashboard->>Dashboard: "rerun.src = protocol://host:9878/?url=rerun+grpc://..."
Note over WS: uvicorn binds to self.config.g.listen_host
WS->>FastAPI: "uvicorn.Config(host=self.config.g.listen_host)"
Phone->>RWI: "_create_web_server(host=self.config.g.listen_host)"
RWI->>FastAPI: "super().__init__(host=host, port=port)"
FastAPI->>FastAPI: "self.host = host (explicit, not global_config)"
Reviews (2): Last reviewed commit: "Address LAN web UI review comments" | Re-trigger Greptile |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Summary:
GlobalConfig.listen_hostinto the phone teleop and WebsocketVis web servers so--listen-host 0.0.0.0works for LAN devices.Tests:
/Users/kezaer/Git/dimos/.venv/bin/python -m pytest dimos/web/templates/test_rerun_dashboard.py dimos/web/websocket_vis/test_websocket_vis_module.py dimos/teleop/phone/test_phone_teleop_module.py -q/Users/kezaer/Git/dimos/.venv/bin/ruff check dimos/teleop/phone/phone_teleop_module.py dimos/teleop/phone/test_phone_teleop_module.py dimos/web/templates/test_rerun_dashboard.py dimos/web/websocket_vis/websocket_vis_module.py dimos/web/websocket_vis/test_websocket_vis_module.pyNo robot motion commands were sent while validating this change.