Add POS background scan event - #4671
Draft
aaronschubert0 wants to merge 1 commit into
Draft
Conversation
Adds POS_EVENT_NAMES.SCAN and a public ScanEvent payload to the POS
ShopifyEventMap so pos.app.ready.data extensions can register
shopify.addEventListener('scan', ...). Every event guarantees decoded
data and its normalized source (camera, external, or embedded),
matching the Scanner API vocabulary. The foreground Scanner API is
untouched and no scanner controls are added to the background target.
Assisted-By: devx/ae9ff078-8342-4c89-bbbf-e563920de0ee
aaronschubert0
force-pushed
the
loops/pos-background-scan-event-types
branch
from
September 2, 2026 16:24
0c7cba4 to
6d1cd69
Compare
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.
Background
POS background extensions at
pos.app.ready.datacan observe transaction and cash-tracking events, but cannot observe barcode or QR scans. Foreground action targets receive the same data through the Scanner API signal.POS runtime implementation: https://meteorite.shopify.io/repos/shop/world/pulls/2031046
Solution
Add the background
scanevent for API version2026-10:POS_EVENT_NAMES.SCANisscan.ScanEventguaranteestype, decodeddata, and normalizedsource.ShopifyEventMapexposes the event throughshopify.addEventListener()on background targets only.ui-extensions-testerinjects the authoritative eventtype, matching the real sandbox.🎩
yarn buildyarn type-checkyarn test -- packages/ui-extensions-tester/src/tests/shopify-events.test.tsyarn lintChecklist