Repository navigation
feat(admin): correct check-in records from the admin dashboard and detail sheet - #52
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>
…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>
Admins need to add, edit, and delete check-in records from the admin dashboard and the participant detail sheet to fix reception mistakes (forgotten check-ins/outs, wrong child, duplicates). The spec pins the invariants the DB does not enforce (event derived from check-in date, no overlaps, open sessions only today, empty past events removed), the three admin-only endpoints, shared validation, UI, and the new vitest-pool-workers tests for the API. Refs #48, #49 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er as is @cloudflare/vitest-pool-workers was renamed to @cloudflare/vitest-plugin (the old name is deprecated); pin versions published at least two weeks ago. Event creation now happens inside the write batch, so generalising getOrCreateTodayEvent is no longer needed and the reception path stays untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thirteen tasks: docs first, shared rules and schemas (TDD), Workers vitest integration, admin session lib (create/update/delete) and admin-only routes with D1-backed tests, the shadcn dialog, admin form components, then dashboard and detail-sheet wiring verified with Playwright against a mocked API. Refs #48, #49 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An open target whose check-in was within the 1-minute future tolerance formed an empty interval and slipped past an existing open session, allowing two open sessions for one child. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A two-digit year typed into a date picker produced 1926 (or unpadded year) events that broke the YYYY-MM-DD event date invariant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rebuilding untouched times from HH:mm dropped their seconds, which could raise false OVERLAP or CHECKOUT_BEFORE_CHECKIN errors. Untouched times now keep their original instants, PATCH carries only changed fields, and the date input gets the same 2020-01-01 lower bound as the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
概要
受付の操作ミス(チェックイン忘れ・チェックアウト忘れ・別の子で受付・二重記録)を訂正できるよう、admin ロールが管理画面から来場記録を追加・編集・削除できるようにする。入口はダッシュボード(日付ごとの一覧)と利用者詳細(子どもごとの来場履歴)の 2 か所。
docs/superpowers/specs/2026-10-11-checkin-record-correction-design.mddocs/superpowers/plans/2026-10-11-checkin-record-correction.md変更内容
session-rules.ts:退場は入場より後・同じ日・未来不可・滞在中は今日だけ・同じ子の重なり禁止)、リクエストの Zod スキーマ(2020 年以降に限定)POST / PATCH / DELETE /api/sessions(admin のみ。GETは従来どおり全メンター)db.batchにまとめる@cloudflare/vitest-plugin@1.2.8+vitest@4.1.11。ローカル D1 にマイグレーションを当てて lib を直接テスト(pnpm --filter @tecnova/api test)dialogmvp.md(API・画面・既知の制約)、requirements.md、handoff.md、pre-pr-check と CLAUDE.md に API テストを追加DB のテーブル構造は変えていない(マイグレーションなし)。
確認
@tecnova/sharedテスト 60 件、@tecnova/apiテスト 34 件(実 D1:追加・編集・削除・開催日の移動と削除・admin 以外は 403 など)すべて成功pnpm lint/pnpm type-check/ シークレット走査 成功workers-constraint-reviewer/privacy-reviewer:違反なし見送った軽微な指摘(今後の改善候補)
未確認
Closes #48
Closes #49
🤖 Generated with Claude Code