Skip to content

カレンダー連携の設定ページとヘルプを追加する(#452 の 4/4) - #755

Open
cateiru wants to merge 7 commits into
claude/issue-452-calendar-feed-routefrom
claude/issue-452-calendar-feed-settings
Open

cateiru wants to merge 7 commits into
claude/issue-452-calendar-feed-routefrom
claude/issue-452-calendar-feed-settings

Conversation

@cateiru

@cateiru cateiru commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Closes #452

#452(iCalendar に対応する)の積み上げ PR の 4 本目(最後)です。設定の「外部接続」に「カレンダー連携」のページを追加し、購読 URL の発行・作り直し・停止をできるようにします。ヘルプ・VRT・リリースノートもこの PR に入れています。#754 の上に積んでいます。

積み上げの順番

  1. カレンダーの購読 URL のテーブルと発行・停止を追加する(#452 の 1/4) #752:テーブル・発行/停止のユースケース(マイグレーション 0076)
  2. iCalendar の書き出しを追加する(#452 の 2/4) #753:iCalendar の書き出し
  3. カレンダーの購読 URL で予定を返す(#452 の 3/4) #754:予定の組み立てと、購読 URL の Route Handler
  4. この PR:設定画面・ヘルプ・VRT・リリースノート

マージは 752 → 753 → 754 → この PR の順でお願いします。

変更点

カレンダー連携のページ(/settings/calendar)

  • 「設定」→「外部接続」に 3 つめの項目「カレンダー連携」を追加(外部接続・設定のページの説明文も合わせて変更)
  • 未発行のときは「URL を発行する」、発行済みのときは「URL を作り直す」「停止する」を表示
    • 作り直し・停止は確認のダイアログを挟む
    • 発行・作り直しのあとに「URL を発行しました」のダイアログで URL を表示し、「コピーする」でコピーできる
    • DB にはトークンのハッシュしか残らないため、URL はこのダイアログを閉じると表示し直せない(API トークンと同じ)
  • 発行済みのときは、発行日時と「カレンダーアプリが最後に読んだ日時」(1 時間ごとに記録)を表示
  • 載せる予定の種類と条件(掃除・通院・服薬・誕生日)をページにも書いた
  • 発行・作り直しの Server Action にレート制限(calendar-feed-issue スコープ、ACTION_RATE_LIMITER)を付けた

アイコン(packages/shared)

  • CalendarFeedIcon(カレンダーの形)を RecordIcons に追加。外部接続の一覧・ページの見出し・ヘルプで使う

ヘルプ(/help/calendar)

  • 「カレンダーと連携する方法」を追加(設定のまとまり、「API で記録を読み書きする方法」の次)
  • URL の発行 → Google カレンダー(パソコンのブラウザ)・iPhone/iPad・Mac のカレンダーへの登録 → 表示される予定、の 3 つの手順と、表示する予定・URL の管理
  • スクリーンショット calendar-feed-issued を追加。URL は撮影した環境のオリジンと乱数が写るため、見本の URL(https://canshi.app/calendar/…)に置き換えて撮る

リリースノート・バージョン

  • 0.90.0(機能追加のためマイナー)

VRT

次の差分が出る見込みです。

  • 新規:カレンダー連携のページ(未発行・発行済み)、発行した URL のダイアログ、作り直し・停止の確認ダイアログ、ヘルプ「カレンダーと連携する方法」
    • URL・発行日時・最後に読んだ日時は撮るたびに変わるため、固定の値に置き換えて撮る
    • 発行 → 停止まで順に撮るため直列にし、最後に停止して未発行に戻す
  • 変更:外部接続のページ(項目の追加・説明文)、設定のページ(説明文)、ヘルプの一覧(項目の追加)、バージョン表記
  • vrt-shared:Storybook の RecordIcons の一覧にアイコンが増える

確認したこと

  • pnpm lint(既存の警告 18 件のみ)・型チェック・pnpm test(2270 件)が通ること
  • 手元で VRT と同じ設定で新しいケースを撮り、見た目を確かめた
  • pnpm help:screenshots で新しい画像だけを撮り直して追加した(ほかの画像は撮り直しの揺れのため戻した)

判断してほしい点

  • ページの置き場所を「外部接続」の中にしました(AI との接続・API トークンと並べる)
  • 作り直しのボタンは確認ダイアログを挟み、新しい URL は発行と同じダイアログで表示します
  • 「停止する」は URL を削除します(再開は「URL を発行する」で新しい URL を発行)。カレンダーアプリ側に既に表示された予定は、アプリで購読を削除するまで残ることがある旨を書いています
  • ヘルプの Google カレンダーの手順は「パソコンのブラウザで『他のカレンダー』の『+』から『URL で追加』」としています(スマートフォンのアプリからは追加できない旨も記載)
  • そのほか、載せる予定の種類・条件などは カレンダーの購読 URL で予定を返す(#452 の 3/4) #754 の「判断してほしい点」を見てください

マイグレーション

この PR にマイグレーションはありません。#752 のマイグレーション 0076_calendar_feeds を、#754 とこの PR のマージ(デプロイ)より前に本番・プレビューの D1 へ適用してください(pnpm db:migrate:remote・プレビュー D1 への適用)。テーブルを足すだけなので、#752 のマージ前に適用しても今のコードに影響はありません。

🤖 Generated with Claude Code

https://claude.ai/code/session_01GXATviknZpoyf5M25RtU9Q

cateiru and others added 7 commits December 4, 2026 12:22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXATviknZpoyf5M25RtU9Q
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T03:24:55.043246Z 30f165e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

共通のパッケージ(packages/shared)の Storybook

Storybook を見る(30f165e 時点)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30f165e758

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread e2e/vrt.spec.ts
Comment on lines +599 to +601
await expect(
page.getByRole("button", { name: "URL を作り直す" }),
).toBeVisible();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge モーダル背後のボタンを非表示要素も含めて検索する

この VRT では「URL を発行しました」のモーダルが開いたまま、背後の「URL を作り直す」ボタンを検索しています。共通の Modal(packages/shared/src/ui/Modal/Modal.tsx)は React Aria の ModalOverlay を使用しており、モーダル外の要素は aria-hidden になるため、既定の getByRole ではこのボタンが検索対象から外れます。その結果、このアサーションがタイムアウトしてスクリーンショットを撮れず、同じ serial グループの後続ケースもスキップされます。ここでは includeHidden: true を指定するなど、モーダル背後の表示を確認できるロケーターにしてください。

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

管理画面の VRT (reg-suit) 結果

ステータス 件数
差分あり 0
新規 32
削除 0
変化なし 0

reg-suit レポートを見る

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

共通のパッケージ(packages/shared)の VRT (reg-suit) 結果

ステータス 件数
差分あり 0
新規 302
削除 0
変化なし 0

reg-suit レポートを見る

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

VRT (reg-suit) 結果

ステータス 件数
差分あり 10
新規 6
削除 0
変化なし 212

reg-suit レポートを見る

差分があったページ

  • イラストアイコンの一覧(dark)の見た目.png
  • イラストアイコンの一覧(light)の見た目.png
  • ヘルプ一覧ページの見た目.png
  • 外部接続ページの見た目.png
  • 文字サイズ別の見た目(large) - 設定メニュー.png
  • 文字サイズ別の見た目(medium) - 設定メニュー.png
  • 文字サイズ別の見た目(small) - 設定メニュー.png
  • 文字サイズ別の見た目(xlarge) - 設定メニュー.png
  • 服薬予定一覧(服薬歴を開いたケース)の見た目.png
  • 設定ページの見た目.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant