Current Behavior
When the session cookie expires while the web app is open, the user is not returned to the sign-in screen. Depending on timing they either land on an error boundary ("Looks like something went wrong") or the page keeps reloading.
Steps to Reproduce
- Sign in, keep the tab open until the session expires (or invalidate the server-side session).
- Interact with the app (e.g. open a work items list): the request returns 401.
- The axios response interceptor in
apps/web/core/services/api.service.ts runs window.location.replace("/?next_path=<currentPath>").
- The entry page
"/" mounts and fires its own current-user request; that request 401s too.
- The interceptor runs again — now
currentPath is "/", so it replaces "/" with "/?next_path=/", reloading the entry page in an endless loop. The NON_AUTHENTICATED branch of AuthenticationWrapper never gets a stable chance to render the sign-in form.
Root Cause
The 401 interceptor redirects unconditionally, including for requests made by the entry page itself, producing a self-referential replace loop on "/".
Suggested Fix
Skip the redirect when window.location.pathname is already "/". A PR follows with the one-line guard.
Environment
- Self-hosted v1.4.2 built from source.
Current Behavior
When the session cookie expires while the web app is open, the user is not returned to the sign-in screen. Depending on timing they either land on an error boundary ("Looks like something went wrong") or the page keeps reloading.
Steps to Reproduce
apps/web/core/services/api.service.tsrunswindow.location.replace("/?next_path=<currentPath>")."/"mounts and fires its own current-user request; that request 401s too.currentPathis"/", so it replaces"/"with"/?next_path=/", reloading the entry page in an endless loop. TheNON_AUTHENTICATEDbranch ofAuthenticationWrappernever gets a stable chance to render the sign-in form.Root Cause
The 401 interceptor redirects unconditionally, including for requests made by the entry page itself, producing a self-referential replace loop on
"/".Suggested Fix
Skip the redirect when
window.location.pathnameis already"/". A PR follows with the one-line guard.Environment