Move kiosk enrollment to a standalone, mobile-first /enroll page - #199
Merged
Conversation
sdunster
marked this pull request as ready for review
September 4, 2026 20:44
Scanning a kiosk's enrollment QR code is almost always done from a phone, so pull the enrollment form out of the admin dashboard entirely rather than just bypassing its location interstitial: - Add a location <select> to the enrollment form (SessionForm), since the page no longer has an ambient "currently selected location" to fall back on once it moves out of /admin/*. - New top-level route /enroll (EnrollApp.tsx), lazy-loaded as its own chunk so a scan doesn't pull in the ~300KB admin dashboard bundle. The old /admin/sessions/enroll path redirects, preserving ?fp=, for any kiosk QR code still showing the old URL. - It reuses the admin dashboard's login/session plumbing (same seslogin token, Relay environment, user info, notifications) via a new AuthenticatedSession component extracted from admin/Layout.tsx, so the two can't drift on auth behaviour. The onLogout callback is now handed down via context (useLogout) rather than as a prop, so areas that don't need it don't have to thread it through. - It skips the dashboard's chrome entirely (menu bar, submenu, title bar, footer) and the passkey-enrollment nudge, rendering just the enrollment card in the same full-screen Panel style as the login screen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DntxGWMSNgUkvBn5oS4ra3
sdunster
force-pushed
the
claude/qr-kiosk-enrollment-form-cxxbdo
branch
from
September 4, 2026 21:57
2f3a9d8 to
33f3286
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.
Summary
Scanning a kiosk's enrollment QR code is almost always done from a phone, so this pulls the whole enrollment form out of the admin dashboard and gives it its own mobile-first page, rather than just tucking a location
<select>into the dashboard flow./enroll(web/src/enroll/EnrollApp.tsx), lazy-loaded as its own chunk (~2.4KB gzipped) so a scan doesn't pull in the ~70KB admin dashboard bundle. The old/admin/sessions/enrollpath now redirects to/enroll, preserving?fp=, for any kiosk QR code still showing the old URL until it refreshes.AuthenticatedSessioncomponent extracted fromadmin/Layout.tsx, so the two auth flows can't drift apart. TheonLogoutcallback is now handed down via a small context (useLogout) instead of a prop, so areas that don't need it (like this one) don't have to thread it through.SessionEnrollrenders in the same full-screen "Panel" card style already used by the login screen, so it looks like a continuation of signing in rather than a different app.<select>in the enrollment form (added in the first commit on this branch) stays — it's still how the admin picks which unit the kiosk belongs to, just now inside a page that was never gated behind the dashboard's location interstitial in the first place.LocationSelectorandTitleBarrevert to their original, simpler behaviour since the enroll page — the only place that needed to bypass that interstitial — isn't part of/admin/*anymore.Test plan
cd web && npm run relay— new query/mutation types generated underweb/src/enroll/__generated__/cd web && npx tsc -bcd web && npx eslint src/cd web && npx prettier --check src/cd web && npx vitest run— 146 tests passingcd web && npm run build—/enrollis its own lazy chunkmake local-e2e(AWS-free local stack), including an iPhone-13-sized viewport:/enroll?fp=.../admin/sessions/enroll?fp=...path redirects to/enroll,?fp=intact/enrollrenders directly with no admin chrome and no location interstitial — just the enrollment card<select>succeeds ("Kiosk enrolled")/admin/members(and the rest of the dashboard) still shows full chrome and the location interstitial as before🤖 Generated with Claude Code
https://claude.ai/code/session_01DntxGWMSNgUkvBn5oS4ra3