+
+
+
+
+
+
+
+
+
+ Daily Cost Trends
- Events from Claude Code sessions will stream here in real-time.
+ No daily cost data yet.
+
+
+
+
+ Cost by Model
+
+
+ No cost data yet.
+
+
+
+
+ Cost by Weekday
+
+
+ No daily cost data yet.
diff --git a/client/vitest.config.ts b/client/vitest.config.ts
index 81a9ad2a..f6a2a278 100644
--- a/client/vitest.config.ts
+++ b/client/vitest.config.ts
@@ -25,6 +25,14 @@ function resolveAppVersion(): string {
}
const APP_VERSION = resolveAppVersion();
+// Node >=22 ships a built-in `localStorage` global (Web Storage API) that, without
+// a configured `--localstorage-file`, is a non-functional stub (getItem/setItem
+// undefined) — it shadows jsdom's own working localStorage before the jsdom
+// environment can install it. Disabling it on those Node versions lets jsdom's
+// localStorage apply instead; the flag doesn't exist on Node 20/21, so it's
+// gated to avoid breaking test runs there.
+const nodeMajor = Number(process.versions.node.split(".")[0]);
+
export default defineConfig({
plugins: [react()],
define: {
@@ -32,6 +40,14 @@ export default defineConfig({
},
test: {
environment: "jsdom",
+ environmentOptions: {
+ jsdom: {
+ url: "http://localhost/",
+ },
+ },
+ ...(nodeMajor >= 22
+ ? { poolOptions: { forks: { execArgv: ["--no-experimental-webstorage"] } } }
+ : {}),
setupFiles: ["./src/test-setup.ts"],
include: ["src/**/*.test.{ts,tsx}"],
css: false,