diff --git a/CHANGELOG.md b/CHANGELOG.md index ad613062a..9716dd89d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,8 @@ - Docs: standardize Claude Code CLI naming across docs and prompts. (follow-up to #915) ### Fixes -- Mac: pass auth token/password to dashboard URL for authenticated access. -- UI: use application-defined WebSocket close code (browser compatibility). + - Mac: pass auth token/password to dashboard URL for authenticated access. (#918) — thanks @rahthakor. + - UI: use application-defined WebSocket close code (browser compatibility). (#918) — thanks @rahthakor. - Gateway/Dev: ensure `pnpm gateway:dev` always uses the dev profile config + state (`~/.clawdbot-dev`). - macOS: fix cron preview/testing payload to use `channel` key. (#867) — thanks @wes-davis. - Telegram: honor `channels.telegram.timeoutSeconds` for grammY API requests. (#863) — thanks @Snaver. diff --git a/apps/macos/Sources/Clawdbot/MenuContentView.swift b/apps/macos/Sources/Clawdbot/MenuContentView.swift index 7afd355f7..87109bcf3 100644 --- a/apps/macos/Sources/Clawdbot/MenuContentView.swift +++ b/apps/macos/Sources/Clawdbot/MenuContentView.swift @@ -328,11 +328,14 @@ struct MenuContent: View { components.scheme = "http" } components.path = "/" + var queryItems: [URLQueryItem] = [] if let token = config.token, !token.isEmpty { - components.queryItems = [URLQueryItem(name: "token", value: token)] - } else if let password = config.password, !password.isEmpty { - components.queryItems = [URLQueryItem(name: "password", value: password)] + queryItems.append(URLQueryItem(name: "token", value: token)) } + if let password = config.password, !password.isEmpty { + queryItems.append(URLQueryItem(name: "password", value: password)) + } + components.queryItems = queryItems.isEmpty ? nil : queryItems guard let url = components.url else { throw NSError(domain: "Dashboard", code: 2, userInfo: [ NSLocalizedDescriptionKey: "Failed to build dashboard URL",