Skip to content

Commit fdb20b9

Browse files
committed
fix: simplify tokenized control ui output
1 parent e560a17 commit fdb20b9

1 file changed

Lines changed: 7 additions & 20 deletions

File tree

‎bin/lib/onboard.js‎

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ async function setupPolicies(sandboxName) {
22232223
// ── Dashboard ────────────────────────────────────────────────────
22242224

22252225
const CONTROL_UI_PORT = 18789;
2226-
const CONTROL_UI_CHAT_PATH = "/chat?session=main";
2226+
const CONTROL_UI_PATH = "/";
22272227

22282228
function findOpenclawJsonPath(dir) {
22292229
if (!fs.existsSync(dir)) return null;
@@ -2269,19 +2269,9 @@ function fetchGatewayAuthTokenFromSandbox(sandboxName) {
22692269
}
22702270
}
22712271

2272-
function buildControlUiChatUrls(token) {
2272+
function buildControlUiUrl(token) {
22732273
const hash = token ? `#token=${token}` : "";
2274-
const pathChat = `${CONTROL_UI_CHAT_PATH}${hash}`;
2275-
const bases = [
2276-
`http://127.0.0.1:${CONTROL_UI_PORT}`,
2277-
`http://localhost:${CONTROL_UI_PORT}`,
2278-
];
2279-
const chatUi = (process.env.CHAT_UI_URL || "").trim().replace(/\/$/, "");
2280-
const urls = bases.map((b) => `${b}${pathChat}`);
2281-
if (chatUi && /^https?:\/\//i.test(chatUi) && !bases.includes(chatUi)) {
2282-
urls.push(`${chatUi}${pathChat}`);
2283-
}
2284-
return [...new Set(urls)];
2274+
return `http://127.0.0.1:${CONTROL_UI_PORT}${CONTROL_UI_PATH}${hash}`;
22852275
}
22862276

22872277
function printDashboard(sandboxName, model, provider, nimContainer = null) {
@@ -2307,16 +2297,13 @@ function printDashboard(sandboxName, model, provider, nimContainer = null) {
23072297
console.log(` Model ${model} (${providerLabel})`);
23082298
console.log(` NIM ${nimLabel}`);
23092299
console.log(` ${"─".repeat(50)}`);
2310-
console.log(` Next:`);
23112300
if (token) {
2312-
note(" URLs below embed the gateway token — treat them like a password.");
2313-
console.log(` Control UI: copy one line into your browser (port ${CONTROL_UI_PORT} must be forwarded):`);
2314-
for (const u of buildControlUiChatUrls(token)) {
2315-
console.log(` ${u}`);
2316-
}
2301+
console.log(" OpenClaw UI (tokenized URL; treat it like a password)");
2302+
console.log(` ${buildControlUiUrl(token)}`);
23172303
} else {
23182304
note(" Could not read gateway token from the sandbox (download failed).");
2319-
console.log(` Control UI: http://127.0.0.1:${CONTROL_UI_PORT}${CONTROL_UI_CHAT_PATH}`);
2305+
console.log(" OpenClaw UI");
2306+
console.log(` http://127.0.0.1:${CONTROL_UI_PORT}${CONTROL_UI_PATH}`);
23202307
console.log(` Token: nemoclaw ${sandboxName} connect → jq -r '.gateway.auth.token' /sandbox/.openclaw/openclaw.json`);
23212308
console.log(` append #token=<token> to the URL, or see /tmp/gateway.log inside the sandbox.`);
23222309
}

0 commit comments

Comments
 (0)