Skip to content

Fix: [AEA-6327] - missing prescriptions fix#1860

Merged
jonathanwelch1-nhs merged 24 commits intomainfrom
aea-6327-missing-prescriptions
Mar 25, 2026
Merged

Fix: [AEA-6327] - missing prescriptions fix#1860
jonathanwelch1-nhs merged 24 commits intomainfrom
aea-6327-missing-prescriptions

Conversation

@jonathanwelch1-nhs
Copy link
Copy Markdown
Contributor

@jonathanwelch1-nhs jonathanwelch1-nhs commented Mar 3, 2026

Summary

https://nhsd-jira.digital.nhs.uk/browse/AEA-6327
https://nhsd-jira.digital.nhs.uk/browse/AEA-6276

  • Routine Change

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

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

AEA-6327

@jonathanwelch1-nhs jonathanwelch1-nhs changed the title Fix: [AEA-6210] - missing prescriptions fix Fix: [AEA-6327] - missing prescriptions fix Mar 3, 2026
Copilot AI review requested due to automatic review settings March 20, 2026 14:32
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

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 invalidSessionCause values.
  • 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 PrescriptionListPage test 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.

connoravo-nhs
connoravo-nhs previously approved these changes Mar 24, 2026
@sonarqubecloud
Copy link
Copy Markdown

@jonathanwelch1-nhs jonathanwelch1-nhs merged commit 034337e into main Mar 25, 2026
20 checks passed
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.

5 participants