fix: keep skip-ui onboarding on guided flow (#118737)

Keep `openclaw onboard --skip-ui` and `openclaw setup --skip-ui` on guided onboarding while suppressing browser and terminal handoffs.

Refs #118388 and #118038.
Prepared head SHA: 4e284c4523
Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
This commit is contained in:
Shakker
2026-08-03 18:03:01 +01:00
committed by GitHub
parent b132ceba1a
commit b8f5aa8ec8
8 changed files with 153 additions and 13 deletions
@@ -87,6 +87,41 @@ describe("onboard config fixture helpers", () => {
expect(assertResult.stderr).toBe("");
});
it("writes configured guided skip-UI fixtures with a local mock model", () => {
const root = makeTempDir(tempDirs, "openclaw-onboard-config-guided-");
const configPath = path.join(root, "openclaw.json");
const workspace = path.join(root, "workspace");
const writeResult = runScript(WRITE_CONFIG_SCRIPT, [
"guided-skip-ui",
configPath,
workspace,
"19091",
]);
const config = readJson(configPath);
expect(writeResult.status).toBe(0);
expect(config.gateway).toEqual({
mode: "local",
bind: "loopback",
controlUi: { enabled: false },
});
expect(config.agents.defaults.workspace).toBe(workspace);
expect(config.agents.defaults.model.primary).toBe("openai/gpt-5.6-luna");
expect(config.models.providers.openai.baseUrl).toBe("http://127.0.0.1:19091/v1");
expect(config.models.providers.openai.apiKey).toEqual({
source: "env",
provider: "default",
id: "OPENAI_API_KEY",
});
expect(config.wizard).toMatchObject({
securityAcknowledgedAt: "2026-01-01T00:00:00.000Z",
accessMode: "full",
appRecommendations: false,
});
expect(readFileSync(configPath, "utf8")).toMatch(/\n$/u);
});
it("accepts local and remote onboard assertion fixtures", () => {
const root = makeTempDir(tempDirs, "openclaw-onboard-config-success-");
const workspace = path.join(root, "workspace");