dev の変更を master へ反映 - #210
Merged
Merged
Conversation
* feat(status): スマホ対応の障害情報管理画面(/admin)を追加 PC が無くてもスマホのブラウザだけで障害情報を登録・更新・復旧できる、 ログイン保護されたモバイルファーストの管理フォームを追加。 - 共有コア抽出: events/route.ts の検証・DB更新・Edge Config再同期を server/lib/statusEvents.ts(applyStatusEvents/validatePayload) に集約し、 公開API と管理API の両方から再利用。route.ts は薄いラッパに。 - 日時正規化: normalizeDates.ts を新設。datetime-local(JST) を UTC へ変換し API の ISO 検証(+09:00 を弾く)に適合させる。 - 認証: adminAuth.ts(Web Crypto HMAC で sign/verify, Edge/Node 両対応)、 middleware.ts で /admin・/api/admin を保護、/api/admin/login・logout を実装。 公開API用の STATUS_UPDATE_API_KEY はブラウザに露出させない。 - 画面: /admin/login と /admin(AdminForm)。新規/更新・復旧/サービスのみの 3モード、障害中・復旧プリセット、ワンタップ復旧、送信前プレビュー。 - テスト: normalizeDates / adminAuth / statusEvents の vitest 追加(計55件 green)。 新規環境変数: STATUS_ADMIN_PASSWORD, STATUS_ADMIN_SESSION_SECRET Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WUJ8YCARmBnR5Q18uBA9UX * fix(status): CodeRabbitレビュー対応(状態リセット・キャッシュ・更新ID所属チェック・テスト追加) - AdminForm: インシデント切替時に前回の serviceStates が残るバグを修正 (対象サービス分は毎回上書きして再初期化)。 - admin/page: プリフィルを skipCache:true にし DB を正本として読む (Edge Config 反映は best-effort のため古い値が戻るのを防ぐ)。 - statusEvents: 既存 update を更新する際に incidentId 所属を検証し、 別インシデントの update.id による履歴改ざんを防止。 - README: ファイルパス表記を実パス(route.ts まで)に統一。 - テスト追加: ログイン API ルート / middleware の認証分岐 / statusEvents の更新ロジック(所属チェック・Edge Config 再同期)。計68件 green。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WUJ8YCARmBnR5Q18uBA9UX * test(status): Edge Config 再同期の skipCache:true 契約をテストで固定 applyStatusEvents が refreshEdgeConfigSnapshots 経由で getServices/getIncidentHistories を { skipCache: true } で呼ぶことを検証し、 キャッシュ起点で再構築する回帰を防ぐ(CodeRabbit nitpick 対応)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WUJ8YCARmBnR5Q18uBA9UX --------- Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
概要
devブランチの変更をmasterに反映します。主な変更点
/adminとログイン画面/admin/loginを新設し、ブラウザから障害情報(インシデント・サービスステータス)を登録・更新できるようにする/api/admin/login//api/admin/logout)と Cookie ベースのセッションを追加し、middleware.tsで/admin配下を保護/api/admin/eventsを追加POST /api/status/eventsのロジックをapp/server/lib/statusEvents.tsに切り出し、日付正規化(normalizeDates.ts)・認証(adminAuth.ts)と合わせてユニットテストを追加変更ファイル
18 files changed, 2473 insertions(+), 561 deletions(-)
🤖 Generated with Claude Code
https://claude.ai/code/session_01Nw25QWXHRJ1Diy73pkinS9
Generated by Claude Code