惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
博客园 - 【当耐特】
量子位
博客园 - 司徒正美
爱范儿
爱范儿
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
腾讯CDC
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
I
InfoQ
D
Docker
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
宝玉的分享
宝玉的分享
G
Google Developers Blog
GbyAI
GbyAI
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
H
Help Net Security

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(clawdock): open dashboard on published port without s...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main

@@ -10,6 +10,10 @@ import { describe, expect, it } from "vitest";

1010

const execFileAsync = promisify(execFile);

1111

const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");

121213+

async function writeExecutable(file: string, content: string) {

14+

await writeFile(file, content, { mode: 0o755 });

15+

}

16+1317

describe("scripts/clawdock/clawdock-helpers.sh", () => {

1418

it("loads the standard docker-compose.override.yml before ClawDock extra overrides", async () => {

1519

const tempDir = await mkdtemp(path.join(tmpdir(), "openclaw-clawdock-"));

@@ -22,12 +26,11 @@ describe("scripts/clawdock/clawdock-helpers.sh", () => {

2226

await writeFile(path.join(projectDir, "docker-compose.yml"), "services: {}\n");

2327

await writeFile(path.join(projectDir, "docker-compose.override.yml"), "services: {}\n");

2428

await writeFile(path.join(projectDir, "docker-compose.extra.yml"), "services: {}\n");

25-

await writeFile(

29+

await writeExecutable(

2630

path.join(binDir, "docker"),

2731

`#!/usr/bin/env bash

2832

printf '%s\\n' "$@" > "$CLAWDOCK_DOCKER_ARGS_FILE"

2933

`,

30-

{ mode: 0o755 },

3134

);

32353336

await execFileAsync(

@@ -62,4 +65,79 @@ printf '%s\\n' "$@" > "$CLAWDOCK_DOCKER_ARGS_FILE"

6265

await rm(tempDir, { force: true, recursive: true });

6366

}

6467

});

68+69+

it("opens dashboard URLs through the published gateway port without starting dependencies", async () => {

70+

const tempDir = await mkdtemp(path.join(tmpdir(), "openclaw-clawdock-"));

71+

try {

72+

const projectDir = path.join(tempDir, "project");

73+

const binDir = path.join(tempDir, "bin");

74+

const argsFile = path.join(tempDir, "docker-args.txt");

75+

const openedUrlFile = path.join(tempDir, "opened-url.txt");

76+

await mkdir(projectDir);

77+

await mkdir(binDir);

78+

await writeFile(path.join(projectDir, "docker-compose.yml"), "services: {}\n");

79+

await writeExecutable(

80+

path.join(binDir, "docker"),

81+

`#!/usr/bin/env bash

82+

printf '%s\\n' "$@" >> "$CLAWDOCK_DOCKER_ARGS_FILE"

83+

printf '%s\\n' '---' >> "$CLAWDOCK_DOCKER_ARGS_FILE"

84+

if [[ "$*" == *" port openclaw-gateway 18789" ]]; then

85+

printf '%s\\n' '0.0.0.0:19001'

86+

else

87+

printf '%s\\n' 'Dashboard: http://127.0.0.1:18789/?token=test-token'

88+

fi

89+

`,

90+

);

91+

await writeExecutable(

92+

path.join(binDir, "open"),

93+

`#!/usr/bin/env bash

94+

printf '%s\\n' "$1" > "$CLAWDOCK_OPENED_URL_FILE"

95+

`,

96+

);

97+98+

await execFileAsync(

99+

"bash",

100+

["-c", "source scripts/clawdock/clawdock-helpers.sh; clawdock-dashboard"],

101+

{

102+

cwd: repoRoot,

103+

env: {

104+

...process.env,

105+

CLAWDOCK_DIR: projectDir,

106+

CLAWDOCK_DOCKER_ARGS_FILE: argsFile,

107+

CLAWDOCK_OPENED_URL_FILE: openedUrlFile,

108+

HOME: path.join(tempDir, "home"),

109+

PATH: `${binDir}${path.delimiter}${process.env.PATH ?? ""}`,

110+

},

111+

},

112+

);

113+114+

await expect(readFile(openedUrlFile, "utf8")).resolves.toBe(

115+

"http://127.0.0.1:19001/?token=test-token\n",

116+

);

117+

await expect(readFile(argsFile, "utf8")).resolves.toBe(

118+

[

119+

"compose",

120+

"-f",

121+

path.join(projectDir, "docker-compose.yml"),

122+

"run",

123+

"--rm",

124+

"--no-deps",

125+

"openclaw-cli",

126+

"dashboard",

127+

"--no-open",

128+

"---",

129+

"compose",

130+

"-f",

131+

path.join(projectDir, "docker-compose.yml"),

132+

"port",

133+

"openclaw-gateway",

134+

"18789",

135+

"---",

136+

"",

137+

].join("\n"),

138+

);

139+

} finally {

140+

await rm(tempDir, { force: true, recursive: true });

141+

}

142+

});

65143

});