diff --git a/scripts/backfill_session_costs.py b/scripts/backfill_session_costs.py index 0ec14a5..88817ba 100644 --- a/scripts/backfill_session_costs.py +++ b/scripts/backfill_session_costs.py @@ -51,7 +51,7 @@ def _get_pricing(model: str) -> tuple[float, float, float, float]: def _root_prefix(root_path: str) -> str: - return root_path.rstrip("/").replace("/", "-").replace("_", "-") + return root_path.rstrip("/").replace("/", "-") def _match_root(folder_key: str) -> str | None: diff --git a/web/src/main.ts b/web/src/main.ts index 9c35892..9cfed91 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -14,7 +14,6 @@ initMsal().then(async () => { const pinia = createPinia() app.use(pinia) - app.use(router) app.use(VueQueryPlugin) const authStore = useAuthStore() @@ -27,8 +26,10 @@ initMsal().then(async () => { (token) => authStore.setToken(token), ) - // Restore session from HttpOnly refresh cookie before mounting + // Restore session BEFORE registering router so the beforeEach guard + // sees the correct isAuthenticated state on initial navigation await authStore.init() + app.use(router) app.mount('#app') })