Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0002f66f0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export const barcodeScannerFormats: BarcodeScannerFormatList = [ | ||
| "codabar", | ||
| "code_128", | ||
| "code_39", | ||
| "code_93", | ||
| "databar", | ||
| "databar_expanded", | ||
| "databar_limited", | ||
| "ean_13", | ||
| "ean_8", | ||
| "itf", | ||
| "upc_a", | ||
| "upc_e", | ||
| ]; |
There was a problem hiding this comment.
Restore QR support in shared scanner formats
The new shared barcodeScannerFormats list no longer includes "qr_code", but every replaced call site previously passed "qr_code" explicitly. This changes runtime behavior across PDV, transfer validation, and modal scanners: QR labels that worked before this commit now never trigger onScan. If operators use QR-encoded product/transfer labels, scanning is a hard regression rather than a compatibility improvement.
Useful? React with 👍 / 👎.
| const timeoutId = window.setTimeout(() => { | ||
| if (hasDetectedSinceCameraChange.current) return; | ||
|
|
||
| selectNextCameraConfiguration(); | ||
| }, BARCODE_SCANNER_CAMERA_RETRY_DELAY_MS); |
There was a problem hiding this comment.
Avoid unconditional camera fallback after fixed timeout
The scanner now switches configuration after 5.5s whenever no code has been detected, even if there was no camera error. In normal flows (permission prompt delay, slow alignment, dim lighting), this forces a remount and downgrades to compatible constraints prematurely, which can repeatedly disrupt acquisition before the first successful scan. The fallback should be tied to concrete failure signals, not elapsed time alone.
Useful? React with 👍 / 👎.
No description provided.