Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Mhv horizon/cutover ebrake#13401

Draft
kjduensing wants to merge 2 commits into
developfrom
mhv-horizon/cutover-ebrake
Draft

Mhv horizon/cutover ebrake#13401
kjduensing wants to merge 2 commits into
developfrom
mhv-horizon/cutover-ebrake

Conversation

@kjduensing
Copy link
Copy Markdown

@kjduensing kjduensing commented May 6, 2026

Summary

Adds an emergency cutover lock ("e-brake") mechanism for Oracle Health (OH) migration. When the backend signals that specific health tools should be locked during cutover, the app will display an error screen instead of the normal tool content, preventing veterans from accessing potentially unstable services mid-migration.

Related to https://va.ghe.com/software/va.gov-team/issues/141084

Changes

New: emergencyCutoverLock API field

  • Added emergencyCutoverLock: string[] to AuthorizedServicesPayload meta and UserAuthorizedServicesData type definitions
  • Parsed from the authorized services API response in getAuthorizedServices.tsx, defaulting to an empty array

New: isToolLocked utility

  • Added isToolLocked(emergencyCutoverLock, parentScreen) helper in utils/ohMigration.tsx
  • Maps each OHParentScreens enum value to a lock key (appointments, sm, mr, rx)
  • Returns true if the tool's key is present in the lock array

Screen-level lock integration

  • Appointments — renders ErrorComponent when appointments tool is locked
  • Medical Records — wraps all content in a lock check; renders ErrorComponent when locked
  • Prescriptions — adds lock check alongside existing downtime check
  • Secure Messaging — adds lock check alongside existing downtime check

Tests

  • Added unit tests for isToolLocked covering: undefined input, empty array, matching keys, non-matching keys, and multiple locked tools

Files Changed

File Change
src/api/authorizedServices/getAuthorizedServices.tsx Parse emergencyCutoverLock from API meta
src/api/types/AuthorizedServicesData.ts Add emergencyCutoverLock type to payload and data types
src/screens/HealthScreen/Appointments/Appointments.tsx Add e-brake lock check
src/screens/HealthScreen/MedicalRecordsScreen.tsx Add e-brake lock check
src/screens/HealthScreen/Pharmacy/PrescriptionHistory/PrescriptionHistory.tsx Add e-brake lock check
src/screens/HealthScreen/SecureMessaging/SecureMessaging.tsx Add e-brake lock check
src/utils/ohMigration.tsx Add isToolLocked utility and lock key mapping
src/utils/ohMigration.test.tsx Add tests for isToolLocked

Testing

  • Unit tests added for the isToolLocked utility
  • Each health screen conditionally renders an ErrorComponent when its corresponding lock key is present in the emergencyCutoverLock array from the authorized services API response

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

@kjduensing Please link this pull request to an issue (you may need to rerun the failed workflow). Alternatively, you can add the no-issue label to skip this requirement.

@flagship-mobile-app flagship-mobile-app Bot requested a review from a team May 6, 2026 18:53
@kjduensing kjduensing temporarily deployed to bypass-package-lock May 6, 2026 18:57 — with GitHub Actions Inactive
@flagship-mobile-app flagship-mobile-app Bot added the package-scan-complete npm package scanning complete label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package-scan-complete npm package scanning complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant