build: update deps except carbon

This commit is contained in:
Peter Steinberger
2026-03-17 20:51:41 -07:00
parent a89cb3e10e
commit fb5ab95e03
14 changed files with 1044 additions and 462 deletions

View File

@@ -25,13 +25,10 @@ function createStorageMock(): Storage {
}
function setTestLocation(params: { protocol: string; host: string; pathname: string }) {
if (typeof window !== "undefined" && window.history?.replaceState) {
window.history.replaceState({}, "", params.pathname);
return;
}
vi.stubGlobal("location", {
protocol: params.protocol,
host: params.host,
hostname: params.host.replace(/:\d+$/, ""),
pathname: params.pathname,
} as Location);
}

View File

@@ -1,4 +1,5 @@
const SETTINGS_KEY_PREFIX = "openclaw.control.settings.v1:";
const LEGACY_SETTINGS_KEY = "openclaw.control.settings.v1";
const LEGACY_TOKEN_SESSION_KEY = "openclaw.control.token.v1";
const TOKEN_SESSION_KEY_PREFIX = "openclaw.control.token.v1:";
const MAX_SCOPED_SESSION_ENTRIES = 10;
@@ -197,7 +198,7 @@ export function loadSettings(): UiSettings {
const raw =
storage?.getItem(scopedKey) ??
storage?.getItem(SETTINGS_KEY_PREFIX + "default") ??
storage?.getItem("openclaw.control.settings.v1");
storage?.getItem(LEGACY_SETTINGS_KEY);
if (!raw) {
return defaults;
}
@@ -308,5 +309,9 @@ function persistSettings(next: UiSettings) {
sessionsByGateway,
...(next.locale ? { locale: next.locale } : {}),
};
storage?.setItem(scopedKey, JSON.stringify(persisted));
const serialized = JSON.stringify(persisted);
storage?.setItem(scopedKey, serialized);
// Keep the legacy unscoped key in sync for older readers and migration tests,
// but never include the session token in persistent storage.
storage?.setItem(LEGACY_SETTINGS_KEY, serialized);
}