Skip to content

Commit 24a1f13

Browse files
committed
fix(ui): preserve gateway token during safe URL edits
1 parent a7ab195 commit 24a1f13

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Docs: https://docs.openclaw.ai
1212

1313
### Fixes
1414

15+
- Control UI: preserve manually entered Gateway Access tokens while editing URL formatting within the same normalized gateway endpoint, but clear them when the endpoint scope changes. Fixes #41545; carries forward #41546 and #42001. Thanks @wsyjh8 and @llagy0020.
1516
- Agents/models: keep per-agent primary models strict when `fallbacks` is omitted, so probe-only custom providers are not tried as hidden fallback candidates unless the agent explicitly opts in. Fixes #73332. Thanks @haumanto.
1617
- Cron/Telegram: preserve explicit `:topic:` delivery targets over stale session-derived thread IDs when isolated cron announces to Telegram forum topics. Carries forward #59069; refs #49704 and #43808. Thanks @roytong9.
1718
- Build/runtime: write the runtime-postbuild stamp after `pnpm build` writes the build stamp, so the next CLI invocation does not re-sync runtime artifacts after a successful build. Fixes #73151. Thanks @bittoby.

ui/src/ui/navigation.browser.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ describe("control UI routing", () => {
592592
expect(refreshed.settings.token).toBe("");
593593
});
594594

595-
it("preserves a typed token while editing the gateway URL within the same endpoint scope", async () => {
595+
it("preserves a typed token while editing within the same gateway scope", async () => {
596596
const app = mountApp("/ui/overview");
597597
await app.updateComplete;
598598

@@ -624,6 +624,13 @@ describe("control UI routing", () => {
624624

625625
expect(app.settings.token).toBe("typed-token");
626626
expect(nextTokenInput?.value).toBe("typed-token");
627+
628+
gatewayUrlInput!.value = "wss://other-gateway.example/openclaw";
629+
gatewayUrlInput!.dispatchEvent(new Event("input", { bubbles: true }));
630+
await app.updateComplete;
631+
632+
expect(app.settings.gatewayUrl).toBe("wss://other-gateway.example/openclaw");
633+
expect(app.settings.token).toBe("");
627634
});
628635

629636
it("keeps a hash token pending until the gateway URL change is confirmed", async () => {

0 commit comments

Comments
 (0)