From 09707c200cb79ead89c2aada86820ecea3b5866f Mon Sep 17 00:00:00 2001 From: "afik.cohen" Date: Fri, 6 Mar 2026 17:46:05 -0800 Subject: [PATCH] fix: command center socket.io auto-detect host instead of hardcoded localhost Changes io("ws://localhost:7779") to io() which auto-detects the host from the page URL. This fixes the command center when accessed remotely (e.g. via NAT from a different machine), where localhost points to the browser's machine instead of the server. Rebuilt data/command_center.html with the fix. --- data/.lfs/command_center.html.tar.gz | 4 +- data/command_center.html | 129 ++++++++++++++++++ .../src/Connection.ts | 2 +- 3 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 data/command_center.html diff --git a/data/.lfs/command_center.html.tar.gz b/data/.lfs/command_center.html.tar.gz index 9f7bfe1979..8b10f7ed49 100644 --- a/data/.lfs/command_center.html.tar.gz +++ b/data/.lfs/command_center.html.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7663ac06572e3b9490859b400e9ddbf45ac3ef52a58fcdb8c2c41936dc9d43b5 -size 137675 +oid sha256:ba0830bb987ed4fa943e18af926c05be00a5684956e82916d445eec1df836454 +size 137937 diff --git a/data/command_center.html b/data/command_center.html new file mode 100644 index 0000000000..438339f92b --- /dev/null +++ b/data/command_center.html @@ -0,0 +1,129 @@ + + + + + + Command Center + + + + +
+ + diff --git a/dimos/web/command-center-extension/src/Connection.ts b/dimos/web/command-center-extension/src/Connection.ts index 7a23c6b98c..e7b9362278 100644 --- a/dimos/web/command-center-extension/src/Connection.ts +++ b/dimos/web/command-center-extension/src/Connection.ts @@ -19,7 +19,7 @@ export default class Connection { constructor(dispatch: React.Dispatch) { this.dispatch = dispatch; - this.socket = io("ws://localhost:7779"); + this.socket = io(); this.socket.on("costmap", (data: EncodedCostmap) => { const costmap = Costmap.decode(data);