feat(pos): gate scan app, first slice of the Android POS (#69) #172
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!172
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pos-gate-scan-69"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First slice of the Android POS (#69): a gate scan app for an Android tablet. Staff sign in, pick park and gate, and scan visitors' QR codes to check them in or out, or look a ticket up. No payment, printing or violation fines (parked).
Design:
docs/superpowers/specs/2026-11-06-gate-scan-app-design.md· Plan:docs/superpowers/plans/2026-11-06-gate-scan-app.md· ADR 0037.Changes
POST /v1/admin/gates/{id}/check-in|check-outandGET /v1/admin/tickets/{code}acceptadmin_portal.tickets.scanorchecker_app.checker, platform scope only (an organization-scoped grant is refused). OpenAPIx-permissionupdated.mobile/pos: Kotlin + Compose app (ke.go.kws.pos): AppAuth sign-in with PKCE andprompt=login/max_age=0(shared tablet), 12 h session, refresh token in EncryptedSharedPreferences; CameraX + ML Kit scanner, one scan per QR presentation; large green / red / amber (vehicle) result; overstay at check-out shows red and refuses; 503 retried once (Retry-After capped at 5 s); a lost response is "Unknown result: scan again", never success. Ticket codes are never logged or stored; the generatedApiClientis not compiled.scripts/generate-clients.sh kotlin(openapi-generator, Retrofit + kotlinx.serialization), module:kwsapi..forgejo/workflows/mobile-pos.yml+scripts/mobile-pos-ci.sh(lint, unit tests, Kover, debug APK in a pinned Android SDK image).kws-pos-app. Docs: ADR 0037,mobile/pos/README.md, CLAUDE.md.Coverage
make cover: 91.5 % (minimum 80 %).domain+data): 88.8 % line (minimum 80 %).Review
Dual pass: ponytail review (no must-fix; fixed the debug endpoint flags, removed the uncompiled
ApiClientand its two dependencies, a dead method) and the superpowers whole-branch review (all findings fixed and re-reviewed).Not verified
ResultPanelTestpassed 4/4 there).prompt=login; the production IdP client is an operations task.My calls (check these)
Vehicle tickets show amber "not scanned here yet"; any permitted user may pick any gate; the count excludes the master; compileSdk 35; 12 h expiry checked on resume and before each scan (no idle timer); Look up is a third segment of the scan screen.
Follow-up: merge the three copies of "any of these permissions, platform scope only" (
checkin,documents.StaffOnly,rbac.PlatformOnly) into one rbac helper.🤖 Generated with Claude Code