Conversation
#108 でバックエンドがプラン別の配送先 (無料は最初に登録した 1 台、Pro は登録済みの全端末) を強制するようになったため、docs/api.md の Limits 表と取り消しの説明を実装に揃える。 - Limits 表の「Devices per account | 20 | 20」を、アラームを受け取る端末の行 (無料 1 台 / Pro 全端末・上限 20 台) に変えた - 「A plan-specific device limit is not enforced yet」を削除し、無料では 2 台目以降が登録されたまま受信しないこと、Pro 失効時は最初の 1 台へ戻ることを書いた - DELETE の取り消しは取り消し時点のプランの配送先へ届くため (#108)、登録を外した端末に加えて Pro 失効で受信しなくなった端末のアラームも解除されない旨を書いた
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe API documentation now describes cancellation limits and plan-specific alarm delivery. Free delivery goes to the first registered iPhone. Pro delivery goes to all registered devices, up to 20. ChangesAPI Documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The API reference now distinguishes Free and Pro delivery and explains which devices cancellation can reach. The supplied backend behavior matches these descriptions, with no actionable merge risk remaining. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the alarm list at dawn, Comment |
概要
#107 の完了条件のうち、#109 で残していた
docs/api.mdの Limits 表 (端末数) を、#108 で入ったプラン別の配送先に合わせた。あわせて、#109 で足した取り消しの保証範囲の 1 文を、#108 の取り消しの挙動 (取り消し時点のプランで配送先を決める) まで含む形に直した。documents/PROJECT.mdの更新とAlarmify/Localizable.xcstringsの未参照キーの削除は #109 でマージ済みのため、本 PR で #107 の完了条件がすべて揃う。Closes #107
変更点
docs/api.mdの LimitseffectivePlanがfreeを返すため)根拠にした実装:
firebase/functions/src/api/externalApi.tsのdeliveryTargets(devices.slice(0, planLimits[plan].deliveryDevices))、firebase/functions/src/lib/plan.tsのdeliveryDevices(無料 1 / Pro 上限なし)、firebase/functions/src/lib/store.tsのMAX_DEVICES_PER_USER = 20とlistDevices(登録順)。docs/api.mdのDELETE /v1/alarms/{id}#109 で足した「取り消しは取り消し時点で登録されている端末へ届く」を、「取り消し時点でアラームを受け取る端末へ届く (Limits 参照)」に変え、解除されない例に「Pro の失効で受信しなくなった端末」を足した。#108 の
DELETEは取り消し時点のプランで配送先を決めるため、Pro で登録したアラームを失効後に取り消すと 2 台目以降には届かない (#108 の PR body で「docs/api.mdへの明記は #107 の担当」とされていた挙動)。検証
すべてこの worktree で実行した。
make build-ios** BUILD SUCCEEDED **。: warning:/: error:の行は 0 件tmp/build.logmake test** TEST SUCCEEDED **。77 tests / 0 failures / 3 skipped (StoreKitConfigurationTests。iOS 26.5 の simulator runtime で StoreKit Testing が動かないため skip する既知の挙動)。: error:の行は 0 件。warning は 1 件で、xcodebuild の--- xcodebuild: WARNING: Using the first of multiple matching destinations:(テスト先の simulator が複数一致した時の実行環境の警告。コードのコンパイラ警告ではない)tmp/test.lognpm run build --prefix scripts/sitetmp/site/api.htmlに変更後の表の行が入っていることを確認tmp/site-build.lognpm test --prefix scripts/site# pass 2/# fail 0tmp/site-test.log画面に影響する変更ではない (API リファレンスの Markdown のみ) ため、シミュレータでのスクリーンショットは撮っていない。
本番の Functions のデプロイ (マージ前に実施済み)
docs/は main へのマージでpages-deploy.ymlが https://signalarm.app/ へ自動配信する一方、Functions のデプロイは手動のため、本 PR 作成時点の本番は #108 を含んでいなかった (alarmsApiの updateTime2026-09-14T11:03:27Z、#108 のマージは 2026-09-23T03:35:16Z)。#107 の補足どおり実装より先にドキュメントを出さないよう、マージ前にデプロイした。gh workflow run functions-deploy.yml --ref main -f environment=prod(maindbdc007。バックエンドでプラン別の配送先端末数を強制する (無料は 1 台 / Pro は登録済みの全端末) #108 に加えて Sign in with Apple の導線を追加し、複数端末を 1 つのアカウントにまとめられるようにする #113 の Sign in with Apple のアカウント統合 API も含む)Successful update operation.→Deploy complete!)gcloud functions list --project alarmify-prod --v2で 7 関数が ACTIVE、alarmsApiの updateTime は2026-09-24T01:26:11Z。https://api.signalarm.app/v1/alarmsへトークンなしの POST が 401 を返すADR
新しい意思決定は含まない (プラン別の端末数の決定は #90 のコメント、実装は #108)。
Codex ローカルレビュー
人間が確認
なし (マージ前の Functions デプロイは、ユーザーの依頼を受けて実施し上記で確認した)
セッション再開
cd /Users/bannzai/worktrees/bannzai/Alarmify/issue-107 claude --resume 83134381-d656-4ce9-9d41-d5661bf6cdff変更内容
docs/api.mdの Limits 表をプラン別の配送仕様に更新しました。無料プランでは最初に登録した端末 1 台に、Pro では登録済みの全端末(最大 20 台)にアラームを配送します。DELETE /v1/alarms/{id}の説明を更新しました。取り消しは、リクエスト時点でアラームを受信する端末に届きます。登録解除や Pro 終了で受信対象から外れた端末に残るアラームは解除されず、アプリから取り消す必要があります。