Skip to content

Fix: [AEA-6451] - Toggle session timeout modal messaging and actions on select your role#1982

Merged
connoravo-nhs merged 6 commits intomainfrom
AEA-6451
Apr 2, 2026
Merged

Fix: [AEA-6451] - Toggle session timeout modal messaging and actions on select your role#1982
connoravo-nhs merged 6 commits intomainfrom
AEA-6451

Conversation

@connoravo-nhs
Copy link
Copy Markdown
Contributor

Summary

  • Routine Change

Details

Toggle session timeout modal messaging and actions on select your role.
This is important now that select your role will also run the periodic check after being introduced in 352787d

Copilot AI review requested due to automatic review settings March 31, 2026 13:25
@github-actions
Copy link
Copy Markdown
Contributor

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-6451

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the session timeout modal UX/behavior specifically for the Select Your Role page, so that the periodic session check introduced previously doesn’t present the same “extend session” actions as the rest of the app.

Changes:

  • Add route-aware branching in useSessionTimeout and SessionTimeoutModal for FRONTEND_PATHS.SELECT_YOUR_ROLE.
  • Introduce new modal strings for Select Your Role-specific instruction text and a “Close this message” CTA.
  • Update hook/component tests to provide a router context (MemoryRouter) for useLocation usage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/cpt-ui/src/hooks/useSessionTimeout.ts Adds Select Your Role route handling to change session-timeout actions.
packages/cpt-ui/src/constants/ui-strings/SessionTimeoutModalStrings.ts Adds new UI strings used by the route-specific modal variant.
packages/cpt-ui/src/components/SessionTimeoutModal.tsx Adds route-specific instruction text and swaps primary button label on Select Your Role.
packages/cpt-ui/tests/useSessionTimeout.test.tsx Wraps hook tests in a router so useLocation works.
packages/cpt-ui/tests/SessionTimeoutModal.test.tsx Wraps modal tests in a router so useLocation works.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Connor Avery <[email protected]>
Signed-off-by: Connor Avery <[email protected]>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@connoravo-nhs connoravo-nhs merged commit 46759bc into main Apr 2, 2026
21 checks passed
@connoravo-nhs connoravo-nhs deleted the AEA-6451 branch April 8, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants