Repository navigation
Conversation
Every notification raised during server-side rendering is announced via LiveRegionService.addMessage(), which starts an RxJS timer to clear the message after liveRegion.messageTimeOutDurationMs (30 s by default). The timer runs inside the Angular zone, so the zone never becomes stable and the SSR response is only sent once it fires. This made /login?error=shibboleth-authentication-failed (the Shibboleth and OIDC login failure page, which raises a notification on init) take ~30 s to render instead of ~0.1 s. On the server, skip the live region entirely: there is no screen reader to announce to, and the browser announces the notification once the app boots client-side.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
Server-side rendering of
/login?error=shibboleth-authentication-failed, the failure page for Shibboleth logins and now also for failed OIDC logins, takes ~30 s. Every other login URL renders in under a second.Analysis
LogInPasswordComponent.checkIfHasLoginError()raises a notification for this error value. The notifications board passes the notification content toLiveRegionService.addMessage(), which starts an RxJStimer(liveRegion.messageTimeOutDurationMs)to clear the message again. That value defaults to 30000. The timer runs inside the Angular zone, so during SSR the zone does not become stable until it fires, and the response is only sent after 30 s.This is not specific to the login page: any notification raised during SSR adds the full live-region timeout to that render. The service code comes unchanged from upstream (7.6.5).
Proof on a deployed instance, with no code change: the anonymous accessibility cookie overrides the live-region timeout, and the render time tracks it exactly.
dsAccessibilityCookieliveRegionTimeOutFix:
addMessage()returns early on the server (isPlatformServer): it doesn't store the message and doesn't start the timer. A screen reader only exists in the browser, which re-adds the message when the app boots client-side, so client behaviour is unchanged. The SSR HTML is byte-identical before and after; the notification itself still renders server-side.Ruled out: the notification component's own countdown. A
timeOutof -1 is clamped to 0 by the board, so the countdown never starts, and it runs outside the zone anyway.Testing
/login?error=shibboleth-authentication-failedwent from 30.1 s / 30.3 s to 0.12 s, the same as/loginand/login?error=foo.addMessagestores nothing and leaves no pending timer (fakeAsync). It fails without the fix.Sync verification
No translation files changed.
Manual Testing (if applicable)
Copilot review