Difficulty: Advanced
Type: Refactor
Summary
Update the QR scanner implementation to use the current Expo Camera API and remove the unresolved legacy import workaround.
Current Behaviour
app/access-scanner.tsx imports Camera, CameraType, and BarCodeScanningResult from expo-camera/legacy and includes an ESLint suppression for unresolved imports. This makes the scanner more fragile during Expo upgrades and hides a module resolution issue from linting.
Expected Behaviour
The scanner should use the supported Expo Camera API for the current Expo SDK version, without disabling lint rules for the import. QR scanning behaviour, permission handling, and navigation back to the access check screen should continue to work.
Suggested Implementation
Replace the legacy camera import with the current Expo Camera component and barcode scanning event types. Update scanner props to match the new API, keep QR-only scanning, and preserve the existing permission states. Add tests or documented manual verification for allowed, denied, and invalid QR payload scenarios.
Files or Areas Likely Affected
app/access-scanner.tsx
package.json
app.json
tests/
.maestro/
Acceptance Criteria
Additional Notes
Keep the migration scoped to the scanner implementation. Do not redesign the QR payload format in this issue.
Difficulty: Advanced
Type: Refactor
Summary
Update the QR scanner implementation to use the current Expo Camera API and remove the unresolved legacy import workaround.
Current Behaviour
app/access-scanner.tsximportsCamera,CameraType, andBarCodeScanningResultfromexpo-camera/legacyand includes an ESLint suppression for unresolved imports. This makes the scanner more fragile during Expo upgrades and hides a module resolution issue from linting.Expected Behaviour
The scanner should use the supported Expo Camera API for the current Expo SDK version, without disabling lint rules for the import. QR scanning behaviour, permission handling, and navigation back to the access check screen should continue to work.
Suggested Implementation
Replace the legacy camera import with the current Expo Camera component and barcode scanning event types. Update scanner props to match the new API, keep QR-only scanning, and preserve the existing permission states. Add tests or documented manual verification for allowed, denied, and invalid QR payload scenarios.
Files or Areas Likely Affected
app/access-scanner.tsxpackage.jsonapp.jsontests/.maestro/Acceptance Criteria
expo-camera/legacyis no longer imported.Additional Notes
Keep the migration scoped to the scanner implementation. Do not redesign the QR payload format in this issue.