Repository navigation
fix(checkin): start the QR camera only when tapped to scan - #51
Merged
Merged
Conversation
The handoff was frozen at 2026-05-29 and still described participation stats and the signage app as develop-only, although both (plus the admin UI refresh and the checkin data-layer migration) have since shipped to main. Rewrite it to reflect the current state: main == develop, signage complete, open issues #39/#47/#48/#49 and Phase 1.5 as next candidates. Also condense the completed fullName/grade release runbooks into a reusable "sheet column change" trap (full text kept in git history), add the runtime-smoke lesson from PR #44, and drop a real mentor email. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Operations changed: mentors no longer write activity logs, so children record their own reflection and goal-setting, moving from paper to digital (input method still undecided). CSV export is covered by the daily D1 SQL dump, OCR is moot once records are digital, the teacher sheet stays teacher-led, and offline support is dropped. - Replace the mentor-app / 30-min grid plan with child self-recording - Make check-in record correction (add/edit/delete) a near-term item - Move dropped items to out-of-scope and add §3.5 summarising the review - Supersede D3-D6/D10 and record the new decisions as D16-D19 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to the requirements revision so the other docs stop pointing at the dropped mentor app and its activity-log pipeline. - mvp.md: refresh the Phase 1.5+ list and known operational limits (paper records transcribed to Google Forms, no way yet to correct check-in mistakes) - architecture.md: swap the mentor app / activity logs / OCR / R2 / CSV / offline sync / prior-year import nodes for child record input, on-hold masters, and the daily D1 SQL dump used for analysis - CLAUDE.md: note apps/mentor is cancelled Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reception iPad stays on the home screen for long stretches, and the always-on scanner stops reading QR codes after a while even though the preview keeps moving; pressing "restart camera" brings it back. Spec the home scanner to start the camera only when tapped and to stop on success or after 20 seconds, and record what is known about the root cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeping the camera running made iPad Safari stop recognising QR codes after the page sat idle, while the preview still looked live. The exact cause is unconfirmed (zxing's continuous scan reuses a capture canvas sized at start-up, and Safari may throttle long-running work), but a freshly started camera reliably reads, so every scan now starts from that state. - Idle: camera off, the camera view becomes a "タップしてQRを読み取る" button - Scanning: auto-detects as before; stops on success or after 20 s - Camera errors fall back to idle with a retry hint on the button - Drop the restart button; camera switch also starts scanning Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ning Reception staff use "カメラを再起動" to get a stubborn QR read quickly, so removing it was a regression. It now restarts the camera even while scanning (also resetting the 20 s timeout), and starts scanning when pressed from idle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
背景
受付 iPad を常駐させてトップ画面を開いたまましばらく置くと、カメラ映像は普通に動いているのに QR を読まなくなる。「カメラを再起動」を押すと読める、という現場からのフィードバック。
原因について
根本原因は特定できていない。見た目では区別できない候補が 2 つある。
@zxing/browserの連続読み取り(scan)は、解析用キャンバスを起動時の映像サイズで 1 度だけ作り、drawImage(video, 0, 0)で拡大縮小せずに描く。後から映像の解像度・向きが変わると、一部しか解析しなくなるどちらの場合でも「起動し直した直後は読める」ことは現場で確認できているので、毎回その状態から読み取る方式にした。
変更内容
SCAN_TIMEOUT_MS)読めなければカメラを止めて待機に戻るdocs/mvp.md§7.1.1 とdocs/handoff.mdを更新読み取る形式(QR / バーコード)は変えていない(ドキュメント上「QR/バーコード」のネームカードを想定しているため)。
確認
Playwright で偽カメラ(
canvas.captureStreamに QR を描画)と/api/meのモックを使い、ブラウザ上で動作を確認した。/reception/participants/26001へ遷移pnpm lint/pnpm type-check/@tecnova/sharedのテスト(31 件)すべて成功?debug=1の診断パネルで切り分ける(docs/handoff.mdに記載)🤖 Generated with Claude Code