feat(dashboard): default to Analytics tab; fix(test): unbreak jsdom localStorage under Node 22+
Dashboard now opens on the Analytics tab for first-time visitors (localStorage still wins once a user picks a tab). Also unbreaks the client test suite in this environment: Node 22+'s built-in --experimental-webstorage localStorage stub was shadowing jsdom's working one, failing every test that touches localStorage. Disabled via a Node-major-gated poolOptions.forks.execArgv so Node 20/21 test runs are unaffected.
This commit is contained in:
@@ -2330,7 +2330,7 @@ export function Dashboard() {
|
||||
// Persistent Tab State
|
||||
const [activeTab, setActiveTab] = useState<"monitor" | "analytics" | "health">(() => {
|
||||
return (
|
||||
(localStorage.getItem("dashboard_tab") as "monitor" | "analytics" | "health") || "monitor"
|
||||
(localStorage.getItem("dashboard_tab") as "monitor" | "analytics" | "health") || "analytics"
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user