From 1791308cc9731806c8953c86640b273bed80353c Mon Sep 17 00:00:00 2001 From: Murray Wang Date: Fri, 30 Jan 2026 13:49:01 +0800 Subject: [PATCH] fix: resolve formatting and test issues from OpenClaw rebrand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix formatting in src/commands/onboard-helpers.ts (indentation) - Update paths.test.ts to expect 16 config candidates (backward compatibility) - New: ~/.openclaw + legacy: ~/.clawdbot, ~/.moltbot, ~/.moldbot - Each dir checks 4 config filenames (openclaw.json + 3 legacy) - Total: 4 dirs × 4 filenames = 16 candidates --- src/commands/onboard-helpers.ts | 12 ++++++------ src/config/paths.test.ts | 8 +++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/commands/onboard-helpers.ts b/src/commands/onboard-helpers.ts index f56da78e9..774893213 100644 --- a/src/commands/onboard-helpers.ts +++ b/src/commands/onboard-helpers.ts @@ -64,12 +64,12 @@ export function randomToken(): string { export function printWizardHeader(runtime: RuntimeEnv) { const header = [ - "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄", - "██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██", - "██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██", - "██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██", - "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀", - " 🦞 OPENCLAW 🦞 ", + "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄", + "██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██", + "██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██", + "██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██", + "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀", + " 🦞 OPENCLAW 🦞 ", " ", ].join("\n"); runtime.log(header); diff --git a/src/config/paths.test.ts b/src/config/paths.test.ts index 06cd26444..9a7913ea5 100644 --- a/src/config/paths.test.ts +++ b/src/config/paths.test.ts @@ -49,7 +49,13 @@ describe("state + config path candidates", () => { const home = "/home/test"; const candidates = resolveDefaultConfigCandidates({} as NodeJS.ProcessEnv, () => home); expect(candidates[0]).toBe(path.join(home, ".openclaw", "openclaw.json")); - expect(candidates).toHaveLength(1); + // Should include new .openclaw dir + legacy dirs (.clawdbot, .moltbot, .moldbot) + // with all config filenames (openclaw.json + clawdbot.json, moltbot.json, moldbot.json) + // = 4 dirs × 4 filenames = 16 candidates + expect(candidates).toHaveLength(16); + // Verify the candidates include expected legacy paths + expect(candidates).toContain(path.join(home, ".clawdbot", "clawdbot.json")); + expect(candidates).toContain(path.join(home, ".moltbot", "moltbot.json")); }); it("prefers ~/.openclaw when it exists and legacy dir is missing", async () => {