Repository navigation
watchOS・ロック画面ウィジェットと同じ体裁のホーム画面ウィジェットをiOSに追加 - #6573
Conversation
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JjtU2f2caqGzJMk9SriShh
…-widget-4i8yoy # Conflicts: # ios/TrainLCD.xcodeproj/project.pbxproj
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughホーム画面用のSmall・Mediumウィジェットを追加しました。既存の共有エントリーを使用して路線情報を表示します。Live Activityの開始・更新・停止時に、ロック画面とホーム画面のウィジェット状態を同期します。 Changesホーム画面ウィジェット対応
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant LiveActivityModule
participant WidgetCenter
participant LockScreenWidget
participant HomeScreenWidget
LiveActivityModule->>WidgetCenter: 状態を同期
LiveActivityModule->>WidgetCenter: 両ウィジェットを再読み込み
WidgetCenter->>LockScreenWidget: 共有状態を反映
WidgetCenter->>HomeScreenWidget: タイムラインを更新
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ios/RideSessionActivity/HomeScreenWidget.swift`:
- Line 26: Update the Color(hex:) usages for the route circle stroke and route
bar in the relevant widget view to replace an empty lineColor with the same
default color used by LockScreenControlValue.tint. Preserve provided non-empty
colors while ensuring missing line colors remain visible.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 48977145-f41c-4724-a152-d62b65af0c88
📒 Files selected for processing (6)
ios/Localizable/en.lproj/Localizable.stringsios/Localizable/ja.lproj/Localizable.stringsios/Modules/LiveActivity/LiveActivityModule.swiftios/RideSessionActivity/HomeScreenWidget.swiftios/RideSessionActivity/LockScreenWidget.swiftios/TrainLCD.xcodeproj/project.pbxproj
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JjtU2f2caqGzJMk9SriShh
概要
iOSのホーム画面に置けるウィジェットを追加しました。デザインとレイアウトは既存のwatchOSウィジェット(
accessoryRectangular/accessoryCircular)とiOSのロック画面ウィジェット、およびAndroidのホーム画面ウィジェット(#6569)の体裁を踏襲しています。新規ターゲットは作らず、既存の
RideSessionActivityExtension(ライブアクティビティ・ロック画面ウィジェット・ロック画面コントロールを配信中)のWidgetBundleに足す形にしたため、署名・entitlements・App Group の設定はそのまま流用できます。変更の種類
変更内容
ios/RideSessionActivity/HomeScreenWidget.swiftを追加し、systemSmall/systemMediumに対応systemSmall: 左上に路線色のナンバリングサークル(accessoryCircular相当。路線記号が無い路線は路線名の先頭1文字で代替)、その下に路線名と方面systemMedium:accessoryRectangularと同じ「路線色バー + 路線名 + 方面」に、tramシンボル付きのアプリ名とナンバリングサークルを追加.fill.tertiary)+路線色をアクセントに使う構成とし、ロック画面ウィジェット・Android版と揃えたcontainerBackgroundは既存の互換ラップと同じ方式で@available分岐し、コンテンツマージンの無いiOS 16では自前で余白を付けるLockScreenEntry/LockScreenProvider(App Group)を共有。新しい同期経路は増やしていないためJS側の変更は無しLiveActivityModuleがApp Groupへ書き込む際、ホーム画面ウィジェットのtimelineも併せてリロードするよう変更(差分がある時だけ書き込む既存のリロードバジェット節約はそのまま維持)syncLockScreenWidgetState→syncWidgetStateなど、ロック画面専用ではなくなったprivateメソッド名を実態に合わせて改名Localizable.stringsにwidgetDescriptionとして追加(文言はAndroid版のwidget_descriptionと統一)project.pbxprojにProd / Canary両RideSessionActivity Extensionのソースとして登録テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ることリグレッションリスクと補足
WidgetCenter.reloadTimelinesの対象kindが1つ増える以外は変更していません。App Groupに書き込むキーも従来どおりで、追加・変更はありません。origin/devの ロック画面コントロールを長押ししてもアプリが開かない問題を修正 #6572(OpenTrainLCDIntent.swift追加)とproject.pbxprojのオブジェクトIDが偶然衝突していたため、devをマージのうえ本PR側のIDを採番し直しています(重複IDが残っていないことは確認済み)。関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit