Repository navigation
fix(scanner): badge-scanner v2 — camera, real prize count, identity, claimed prizes, event stats (#badge-v2) - #2902
Merged
Merged
Conversation
…, claimed names, event stats Probed DEV HANA (read-only): all 14,686 CLAIMED PrizeRecords carry a real prize name (0 null); statuses are CLAIMED/EARNED only; 16-row Prizes catalog. Folds builder-check resolutions in as calls. Awaiting approval before build.
… null-count guard (#badge-v2)
…Contestant action (#badge-v2) - getContestant completion counts now scoped to the scanned event (match the event-stats panel; falls back to all-events when eventId absent/unresolvable) - claimPrizeForContestant invoked via POST with body params (it is an OData action, not a function) — fixes the pre-existing GET-vs-action mismatch
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.
Badge Scanner v2 — camera fix, real prize count, identity, claimed prizes, event stats
Fixes the Vue badge scanner (
/scanner-vue/) and extends it to what an operator needs at the prize table.What changed
onScanawaitsnextTickafter switching to the scanning state so the<video>ref is mounted before the scanner reads it (was throwing "Video element not available" and tearing the camera down).getContestantnumeric fields coerced to0; card shows a realN of 2, nevernull of 2.LastName, F.for eyeball-match against the badge. No email, no full first name crosses the wire (only last name + a single server-derived initial).TaskRecords.event_ID).claimPrizeForContestantfixed to POST — it's an ODataaction; the client was issuing a function-style GET (pre-existing bug).Tests (TDD throughout)
test/unit/scanner-contestant-count.test.js— identity, blank-first-name, claimed names, event-scoped countstest/unit/scanner-event-stats.test.js— aggregates, cross-event isolation, unresolvable-event zero shapehugo-apps/src/scanner-vue/__tests__/— camera ordering, null-count coercion, POST action contractReviewer
Whole-branch review (opus): ship-able, 0 Critical / 0 Important.
Needs manual verification on DEV (can't be proven by unit tests)
nextTickordering is unit-tested, but the actual camera opening at/scanner-vue/needs a physical badge on the DEV approuter.MobileAppmocked user isn't configured).Notes / deferred minors
participantscounts any completion task-type (incl. STEP/PUZZLE), matching the spec's type-agnostic "≥1 completion".hugo-apps/tsconfig.jsonTS5101baseUrldeprecation warning (untouched).Design:
docs/superpowers/specs/2026-10-23-badge-scanner-v2-design.md· Plan:docs/superpowers/plans/2026-10-23-badge-scanner-v2.md