From 1785dc5345f08a0faf46e5cd32790c470662cf71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 12:50:28 +0000 Subject: [PATCH 1/3] Initial plan From 54760d2e1bb1d1a339a448a576f1fef14d7e23a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 12:55:56 +0000 Subject: [PATCH 2/3] Replace BrowserRouter with HashRouter to keep base URL visible Co-authored-by: lstein <111189+lstein@users.noreply.github.com> --- invokeai/frontend/web/src/app/components/InvokeAIUI.tsx | 6 +++--- .../web/src/features/auth/components/AdministratorSetup.tsx | 2 +- .../frontend/web/src/features/auth/components/LoginPage.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx b/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx index f3d9c4bb28e..8f08da993d9 100644 --- a/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx +++ b/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx @@ -7,7 +7,7 @@ import { createStore } from 'app/store/store'; import Loading from 'common/components/Loading/Loading'; import React, { lazy, memo, useEffect, useState } from 'react'; import { Provider } from 'react-redux'; -import { BrowserRouter } from 'react-router-dom'; +import { HashRouter } from 'react-router-dom'; /* * We need to configure logging before anything else happens - useLayoutEffect ensures we set this at the first @@ -52,11 +52,11 @@ const InvokeAIUI = () => { return ( - + }> - + ); diff --git a/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx b/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx index 9827a4d9769..e64b13ae7d6 100644 --- a/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx +++ b/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx @@ -80,7 +80,7 @@ export const AdministratorSetup = memo(() => { if (result.success) { // Auto-login after setup - need to call login API // For now, just redirect to login page - window.location.href = '/login'; + window.location.hash = '#/login'; } } catch { // Error is handled by RTK Query and displayed via error state diff --git a/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx b/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx index ddc813163de..e239cf18665 100644 --- a/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx +++ b/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx @@ -61,7 +61,7 @@ export const LoginPage = memo(() => { dispatch(setCredentials({ token: result.token, user })); // Force a page reload to ensure all user-specific state is loaded from server // This is important for multiuser isolation to prevent state leakage - window.location.href = '/app'; + window.location.hash = '#/app'; } catch { // Error is handled by RTK Query and displayed via error state } From 9ce6787afafb05f289a06ca4a40e6ef2efedd8b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 12:57:22 +0000 Subject: [PATCH 3/3] Fix: Use window.location.href for page reloads to maintain multiuser isolation Co-authored-by: lstein <111189+lstein@users.noreply.github.com> --- .../web/src/features/auth/components/AdministratorSetup.tsx | 2 +- .../frontend/web/src/features/auth/components/LoginPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx b/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx index e64b13ae7d6..85cc89d5716 100644 --- a/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx +++ b/invokeai/frontend/web/src/features/auth/components/AdministratorSetup.tsx @@ -80,7 +80,7 @@ export const AdministratorSetup = memo(() => { if (result.success) { // Auto-login after setup - need to call login API // For now, just redirect to login page - window.location.hash = '#/login'; + window.location.href = '/#/login'; } } catch { // Error is handled by RTK Query and displayed via error state diff --git a/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx b/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx index e239cf18665..521c7656786 100644 --- a/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx +++ b/invokeai/frontend/web/src/features/auth/components/LoginPage.tsx @@ -61,7 +61,7 @@ export const LoginPage = memo(() => { dispatch(setCredentials({ token: result.token, user })); // Force a page reload to ensure all user-specific state is loaded from server // This is important for multiuser isolation to prevent state leakage - window.location.hash = '#/app'; + window.location.href = '/#/app'; } catch { // Error is handled by RTK Query and displayed via error state }