Fix: [AEA-6327] - missing prescriptions fix#1860
Merged
jonathanwelch1-nhs merged 24 commits intomainfrom Mar 25, 2026
Merged
Conversation
Contributor
|
This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket: AEA-6327 |
packages/cpt-ui/src/components/prescriptionList/PrescriptionsListTable.tsx
Outdated
Show resolved
Hide resolved
Orkastrated
reviewed
Mar 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent corrupted search state when navigating from the prescriptions list to prescription details and back, and adds explicit UI messaging for session-expiry logout scenarios.
Changes:
- Adds a dedicated “session expired” logged-out view for specific
invalidSessionCausevalues. - Updates prescriptions list search parameter selection to prefer “original” navigation-captured parameters.
- Refactors prescription list table string constants and adds new/expanded unit tests (including a new
PrescriptionListPagetest suite).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cpt-ui/src/pages/SessionLoggedOut.tsx | Adds a new UI branch for token/session-expired invalid-session causes. |
| packages/cpt-ui/src/pages/PrescriptionListPage.tsx | Adds navigation-context-based original search parameter handling for list searches. |
| packages/cpt-ui/src/constants/ui-strings/PrescriptionListTableStrings.ts | Refactors table text keys to uppercase + restructures caption/type labels. |
| packages/cpt-ui/src/constants/ui-strings/EpsLogoutPageStrings.ts | Adds new strings for the “session expired” logout messaging. |
| packages/cpt-ui/src/components/prescriptionList/PrescriptionsListTable.tsx | Clears issueNumber on navigation to details + adapts to updated table string keys. |
| packages/cpt-ui/tests/mocks/AuthStateMock.tsx | Adds a default mockSearchState for SearchProvider context usage in tests. |
| packages/cpt-ui/tests/SessionLoggedOutPage.test.tsx | Adds test coverage for the new session-expired logged-out view. |
| packages/cpt-ui/tests/PrescriptionListPage.test.tsx | Introduces a large new test suite for PrescriptionListPage behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/cpt-ui/src/components/prescriptionList/PrescriptionsListTable.tsx
Show resolved
Hide resolved
…into aea-6327-missing-prescriptions
connoravo-nhs
previously approved these changes
Mar 24, 2026
…into aea-6327-missing-prescriptions
connoravo-nhs
approved these changes
Mar 25, 2026
|
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.



Summary
https://nhsd-jira.digital.nhs.uk/browse/AEA-6327
https://nhsd-jira.digital.nhs.uk/browse/AEA-6276
Details
Fixed the state that got corrupted when you searched for a prescription and clicked back.
Previously, clicking on View a Prescription altered the saved state which got loaded and rendered on the page. It is now not corrupted and displays the original full search
Also inserts issueNumber=0 which equals to falsy, and so isnt chained on to any endpoint calls when you click back so is more hardy