Fix: [AEA-6210] - Include delayed information on loading page#1821
Fix: [AEA-6210] - Include delayed information on loading page#1821connoravo-nhs merged 38 commits intomainfrom
Conversation
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
## Summary - Routine Change ### Details Adds trivy ignore for downstream dependency
## Summary - Routine Change ### Details RUM has a 6kb size limit to event payloads, which when hint causes the log to be silently discarded by RUM. On users with a large number of roles, roles with a large number of activity codes, or some combination of the two we easily exceed this limit. This ticket splits the new log/event into multiple smaller logs/events, including chunking the various lists of roles into smaller groups. --------- Co-authored-by: Connor Avery <connor.avery2@nhs.net>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
|
This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket: AEA-6210 |
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
| export const AuthProvider = ({children}: { children: React.ReactNode }) => { | ||
| Amplify.configure(authConfig, {ssr: false}) | ||
| const [desktopId] = useLocalStorageState<string | undefined>( | ||
| "desktopId", "desktopId", crypto.randomUUID()) |
There was a problem hiding this comment.
Default set a random UUID. Setter isn't needed as the default takes care of it
There was a problem hiding this comment.
Does this definitely need persisting to local storage? Is there any value to this being different if they hard refresh? have multiple tabs? etc
There was a problem hiding this comment.
Local storage will retain it even after clearAuthState() is ran as it's not included in the clear down. It'll persist across tabs of the same browser window/mode - that's intended. It should identify the machine as good as permanently as possible really, that way we'll know if one machine consistently has issues and attempt to work out why.
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
| Information | ||
| </WarningCallout.Label> | ||
| <p> | ||
| If you keep seeing this page, email{" "} |
There was a problem hiding this comment.
whats the deal with the {" "}, you should be able to include spaces without doing anything funky
There was a problem hiding this comment.
Linting doesn't like a line ending in a space, which annoyingly means {" "} is needed in order to get around the line length rule for the HREF
There was a problem hiding this comment.
If thats the case i think id rather see an explicit eslint ignore for it rather than this, it better documents the issue and an ignore is fine if theres a legitimate reason to override the rule for a specific line or two
| isConcurrentSession: boolean | ||
| invalidSessionCause: string | undefined | ||
| sessionId: string | undefined | ||
| desktopId: string | undefined |
There was a problem hiding this comment.
i know most of our users will probably be on desktop, but as a bit of future proofing for if we ever do get tablet/mobile users can we maybe give this a slightly more generic name? maybe something like clientId or something.
There was a problem hiding this comment.
In what scenarios do we not have a sessionId? it should be init within RUM when the app loads? If there are cases where its not present can we first check there isnt a bug/improvement around the sessionId we can make before adding another value to track
There was a problem hiding this comment.
Session ID is derived from the users auth token - We don't create it.
A user could see the loading page for a long period but not be logged in (potentially due to a former session causing a clash state) - this identifier is created client side so it's present in RUM logs, irrelevant of whether the user has a session or not.
| usePageTitle(LOADING_STRINGS.PAGE_TITLE) | ||
| const [showWarningCallout, setShowWarningCallout] = useState<boolean | undefined>(undefined) | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
does this needs its own effect, and timeout? shouldnt this and the log be happening at the same time so could be the same effect with the same timer?
There was a problem hiding this comment.
I could check with UX, there was a 10 second and 15 second requirement on them respectively. I did think about combining but the time was different.
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
|



Summary
Details
Introduce an information panel that informs the user of diagnostic information and to email us, after a 15 second time delay.
Introduced persistent desktop ID to be able to identify the RUM log, in the event a user is not / never has logged in and therefore doesn't have a session ID to offer.