Skip to content

Conversation

@shinking02
Copy link
Owner

@shinking02 shinking02 commented Nov 3, 2025

関連issue

close #5
close #11

対応内容

Liquid Glass対応

  • iOS標準コンポーネントをLiquid Glassに対応しました
  • iOS26では使用できなくなったTabBarSheetの組み合わせを廃止しました

不具合対応

  • 給料が0円のとき、カレンダーに給料日マークが表示されてしまっていたのを修正しました
  • 給料が0円で予定のリストに給料日が表示されていないとき、予定リストにDividerが表示されていたのを修正しました
  • 予定が多すぎるとき、アプリが起動しなくなる不具合を修正しました
  • 連携しているカレンダーが多すぎるとき、アプリが起動しなくなる不具合を修正しました

メジャーバージョン更新

  • バージョンを更新しました 1.0.61.1.7
  • OBWelcomeViewの内容とバージョンを更新しました 45

Summary by CodeRabbit

リリースノート

  • 新機能

    • シフト詳細画面に単発・長期シフトボタンを追加
  • 改善

    • カレンダーおよびイベントの取得件数を増加
    • 給与表示の精度を向上
    • iOS 26に対応
  • その他

    • セキュリティ設定を更新
    • 著作権表記を2024-2025年に更新

update: Xcode recommend setting
fix: sheet title
@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Xcode プロジェクトのビルド設定と PBXProject.attributes.LastUpgradeCheck を更新し、entitlements のサンドボックスキーを削除。カレンダー取得上限を増やし、給与表示周りのビューを給与集約方式へリファクタリング。Jobid を不変から可変へ変更。

Changes

Cohort / File(s) Summary
プロジェクト設定
JShift.xcodeproj/project.pbxproj
PBXProject.attributes.LastUpgradeCheck16002600 に更新。複数の XCBuildConfiguration に対し ENABLE_APP_SANDBOX = YESENABLE_USER_SELECTED_FILES = readonlySTRING_CATALOG_GENERATE_SYMBOLS = YES の追加/調整。DEVELOPMENT_TEAM の追加/削除や MARKETING_VERSION1.0.61.1.7 に更新。
エンタイトルメント
JShift/JShift.entitlements
com.apple.security.app-sandboxcom.apple.security.files.user-selected.read-only を削除。
カレンダー取得
JShift/Models/CalendarManager.swift
Google Calendar API の取得上限を増加(CalendarList: 250、EventsList: 1500)。
データモデル(SwiftData)
JShift/Models/SwiftData/JobSchemaV1.swift
JobOneTimeJobidletvar に変更(初期値は UUID のまま)。
給与表示アニメーション
JShift/Views/Salary/SalaryContentView.swift
グローバルな .animation(.none).animation(nil, value: salaryData) に変更(value ベースの API に置換)。
支払い日ビュー群(リファクタリング)
JShift/Views/Shift/DateShiftView.swift, JShift/Views/Shift/Parts/PaymentDayRowView.swift, JShift/Views/Shift/ShiftView.swift
ShiftSheetViewDateShiftView に改名。給与は DateShiftView 側で SalaryManager から算出して (job, salary) を渡す方式へ変更。PaymentDayRowView の内部 @State を廃止し let salary: Int を受け取るように変更。シート表示を廃止してインライン化。
カレンダー装飾条件
JShift/Views/Shift/Parts/CalendarView.swift
paymentDayJob が存在しても給与が正でない場合はカスタム装飾をスキップする分岐を追加。
コンテンツ・設定文言
JShift/Views/ContentView.swift, JShift/Views/Setting/SettingView.swift
AVAIABLE_OB_VERSION の更新("4" → "5" 相当の調整)、オンボーディング文言とリンク更新、設定フッター年表記を © 2024© 2024-2025 に更新。

Sequence Diagram(s)

sequenceDiagram
    participant ShiftView
    participant DateShiftView
    participant PaymentDayRowView
    participant SalaryManager

    rect `#EFEFEF`
    Note over ShiftView,PaymentDayRowView: 旧フロー(各行で給与取得)
    ShiftView->>PaymentDayRowView: job のみ渡す(シート内)
    PaymentDayRowView->>SalaryManager: onAppear で salary を要求
    SalaryManager-->>PaymentDayRowView: salary 応答
    PaymentDayRowView->>PaymentDayRowView: `@State` を更新
    end

    rect `#F7FFF0`
    Note over ShiftView,DateShiftView: 新フロー(集約して渡す)
    ShiftView->>DateShiftView: selectedDate バインディング
    DateShiftView->>SalaryManager: 複数 job の給与を一括取得
    SalaryManager-->>DateShiftView: [(job, salary)] 返却
    DateShiftView->>DateShiftView: salary>0 でフィルタ
    DateShiftView->>PaymentDayRowView: (job, salary) を渡す(state 無し)
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

  • 注視箇所:
    • DateShiftView.swift の SalaryManager 呼び出しタイミングと非同期処理(性能・再描画・キャンセル)。
    • PaymentDayRowView.swift の state 削除による表示タイミングや差分描画への影響。
    • JobSchemaV1.swiftid を可変にした影響(永続化・識別子一貫性)。
    • project.pbxprojJShift.entitlements の差分による署名・サンドボックス設定整合性(ビルド/配布)。

Possibly related PRs

  • ベータ版更新対応 #3 — 同ファイル project.pbxprojMARKETING_VERSION 等のビルド設定変更が共通。
  • Release version 1.0.2 #1 — 同じく project.pbxproj でサンドボックス/ビルド設定を編集しているため密接に関連。
  • add some feature #4CalendarView の装飾ロジック(calculateDecoration 相当)を変更しており、装飾条件の競合可能性があるため関連。

Suggested labels

Claude Code

Pre-merge checks and finishing touches

❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive プルリクエストは、#5のiOS 26 Liquid Glass対応に関してXcodeプロジェクト設定の更新とUIコンポーネントの変更により対応し、#11のバージョン1.0.7への更新要件も満たしていますが、Liquid Glassデザイン全面刷新の完全な実装状況が限定的です。 Liquid Glassのビジュアルデザイン要素(ガラス質感、透明感、反射エフェクト、blur効果)の実装状況と、オンボーディング画面の追加実装状況について、詳細な確認が必要です。
Out of Scope Changes check ❓ Inconclusive ほぼ全ての変更が#5および#11の目的に関連していますが、一部の変更が目的に直接関連していない可能性があります。 CalendarManagerの最大結果数変更(250/1500)とJobSchemaV1のid変更(letからvarへ)が、iOS 26 Liquid Glass対応やバージョン更新目的とどのように関連しているかを確認してください。
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed プルリクエストのタイトルは、iOS 26 Liquid Glass対応とメジャーバージョン更新という、変更セットの主要な目的を明確に要約しており、概要から詳細まで適切にまとめられています。
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue/5

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
JShift.xcodeproj/project.pbxproj (1)

395-395: メジャーバージョンの更新が必要です。

PR目的によると、メジャーバージョン更新(v2.0.0または26.0への更新)が必要とされていますが、MARKETING_VERSION1.0.6のままです。

PRの目的を達成するため、バージョンを更新してください。

以下のように更新することを提案します:

-				MARKETING_VERSION = 1.0.6;
+				MARKETING_VERSION = 2.0.0;

Also applies to: 430-430

JShift/Views/Shift/ShiftView.swift (1)

7-8: 未使用のステート変数とロジックを削除してください

シートプレゼンテーション(.sheet()モディファイア)が削除されたため、以下のコードはすべて不要になっています:

  • isSheetPresentedステート変数(7行目)
  • isInitialステート変数(8行目)
  • isSheetPresentedを操作するすべてのロジック(29-50行目)
  • .onWillDisappear内のシートクローズ処理(42行目)

これらはデッドコードであり、コードの可読性と保守性を低下させます。

次のdiffを適用して未使用コードを削除してください:

     @Binding var isWelcomePresented: Bool
     @State private var selectedDate = Date()
-    @State private var isSheetPresented = false
-    @State private var isInitial = true
     @Query(sort: \Job.order) private var jobs: [Job]
     @Query private var otJobs: [OneTimeJob]
                 Spacer()
                 DateShiftView(selectedDate: $selectedDate)
             }
-            .onAppear {
-                if isInitial && !isWelcomePresented {
-                    isInitial = false
-                    Task {
-                        try await Task.sleep(millisecond: 400)
-                        isSheetPresented = true
-                    }
-                    return
-                }
-                if !isWelcomePresented && AppState.shared.finishFirstSyncProcess {
-                    isSheetPresented = true
-                }
-            }
-            .onWillDisappear {
-                isSheetPresented = false
-            }
-            .onChange(of: isWelcomePresented) {
-                if !isWelcomePresented {
-                    Task {
-                        try await Task.sleep(seconds: 1)
-                        isSheetPresented = true
-                    }
-                }
-            }
         }
     }
 }

Also applies to: 28-51

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fdccbaf and 5c6d368.

📒 Files selected for processing (8)
  • JShift.xcodeproj/project.pbxproj (7 hunks)
  • JShift/JShift.entitlements (0 hunks)
  • JShift/Models/CalendarManager.swift (2 hunks)
  • JShift/Models/SwiftData/JobSchemaV1.swift (2 hunks)
  • JShift/Views/Salary/SalaryContentView.swift (2 hunks)
  • JShift/Views/Shift/DateShiftView.swift (3 hunks)
  • JShift/Views/Shift/Parts/PaymentDayRowView.swift (1 hunks)
  • JShift/Views/Shift/ShiftView.swift (1 hunks)
💤 Files with no reviewable changes (1)
  • JShift/JShift.entitlements
🧰 Additional context used
📓 Path-based instructions (1)
**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

Use Japanese text for UI labels (hardcoded strings) and SF Symbols for icons

Files:

  • JShift/Models/SwiftData/JobSchemaV1.swift
  • JShift/Views/Shift/DateShiftView.swift
  • JShift/Views/Shift/Parts/PaymentDayRowView.swift
  • JShift/Models/CalendarManager.swift
  • JShift/Views/Shift/ShiftView.swift
  • JShift/Views/Salary/SalaryContentView.swift
🧠 Learnings (4)
📚 Learning: 2025-08-19T13:18:29.574Z
Learnt from: CR
Repo: shinking02/JShift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-19T13:18:29.574Z
Learning: Version SwiftData models (currently JobSchemaV1) and plan migrations when schemas change

Applied to files:

  • JShift/Models/SwiftData/JobSchemaV1.swift
📚 Learning: 2025-08-19T13:18:29.574Z
Learnt from: CR
Repo: shinking02/JShift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-19T13:18:29.574Z
Learning: Ensure both Job and OneTimeJob models share the same SwiftData ModelContainer

Applied to files:

  • JShift/Models/SwiftData/JobSchemaV1.swift
📚 Learning: 2025-08-19T13:18:29.574Z
Learnt from: CR
Repo: shinking02/JShift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-19T13:18:29.574Z
Learning: Applies to **/*.swift : Use Japanese text for UI labels (hardcoded strings) and SF Symbols for icons

Applied to files:

  • JShift.xcodeproj/project.pbxproj
📚 Learning: 2025-08-19T13:18:29.574Z
Learnt from: CR
Repo: shinking02/JShift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-19T13:18:29.574Z
Learning: Use TabView-based navigation with three main sections: ShiftView, SalaryView, SettingView

Applied to files:

  • JShift/Views/Shift/DateShiftView.swift
  • JShift/Views/Shift/Parts/PaymentDayRowView.swift
  • JShift/Views/Shift/ShiftView.swift
🧬 Code graph analysis (2)
JShift/Views/Shift/DateShiftView.swift (3)
JShift/Models/SwiftData/JobExtension.swift (1)
  • getPaymentDay (5-12)
JShift/Lib/DateExtension.swift (1)
  • isSameDay (172-174)
JShift/Lib/SalaryManager.swift (1)
  • getSalaryData (183-222)
JShift/Views/Shift/Parts/PaymentDayRowView.swift (1)
JShift/Models/SwiftData/JobUtils.swift (1)
  • toColor (18-39)
🔇 Additional comments (4)
JShift.xcodeproj/project.pbxproj (3)

474-474: LGTM!

開発チームIDの設定は適切です。コード署名に必要な標準的な設定です。

Also applies to: 540-540


499-499: LGTM!

文字列カタログのシンボル自動生成設定が追加されています。iOS 18.0+のデプロイメントターゲットに対して適切な設定です。型安全なローカライゼーションに役立ちます。

Also applies to: 558-558


237-237: LastUpgradeCheckの値は正しく設定されています。

Xcode 26 GA は2025年9月15~16日にリリースされており、2025年11月3日時点での最新安定版はXcode 26.0.1です。LastUpgradeCheckはプロジェクト設定でXcodeが使用するバージョンタグで、AABB形式(AA=メジャーバージョン、BB=マイナーバージョン)で記録されます。Xcode 26.0は2600と表記され、この変更は正しく適切です。

JShift/Views/Shift/ShiftView.swift (1)

26-26: LGTM: DateShiftViewの直接埋め込みは適切です

ShiftSheetViewからDateShiftViewへのリネームと、シートプレゼンテーションから直接埋め込みへの変更は、UIの改善として適切です。selectedDateのバインディングも正しく設定されています。

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
JShift/Views/ContentView.swift (1)

38-43: オンボーディング内容がPR目標と不整合です。

PR目標では「Liquid Glass」デザインへの大規模なUI刷新とメジャーバージョン更新が記載されていますが、現在のオンボーディングテキスト「iOS 26対応と軽微な不具合の修正」は以下の点で不整合です:

  • 「Liquid Glass」デザインやUI刷新について言及されていない
  • 「軽微な不具合の修正」という表現がメジャーバージョン更新の重要性を反映していない
  • PR目標に記載された「新UI・主要変更点を説明するオンボーディング」の要件を満たしていない

メジャーアップデートに相応しい、より詳細な説明を追加することを推奨します。

修正案(複数の箇条書き項目を追加):

                OBWelcomeView(
                    title: "アップデート内容",
                    detailText: "",
                    bulletedListItems: [
-                        .init(title: "iOS 26に対応 🎉", description: "iOS 26対応と軽微な不具合の修正", symbolName: "apple.logo", tintColor: UIColor(.green)),
+                        .init(title: "iOS 26に対応 🎉", description: "新しいLiquid Glassデザインを採用し、より洗練された外観になりました", symbolName: "apple.logo", tintColor: UIColor(.green)),
+                        .init(title: "UI刷新", description: "ガラス質感のエフェクトと流動的なアニメーションで、より直感的な操作を実現", symbolName: "sparkles", tintColor: UIColor(.blue)),
                    ],
JShift.xcodeproj/project.pbxproj (1)

395-431: メジャーバージョン要件を満たすようにMARKETING_VERSIONを更新してください
Issue #5のゴールで「メジャーバージョン更新(例: v2.0.0 または 26.0)」と明記されていますが、現在 MARKETING_VERSION = 1.1.7 はマイナー更新に留まっています。TestFlight提出時の整合性にも影響するため、メジャーバージョンへ更新してください。

-				MARKETING_VERSION = 1.1.7;
+				MARKETING_VERSION = 2.0.0;

(Release構成も同様に修正してください)

♻️ Duplicate comments (1)
JShift.xcodeproj/project.pbxproj (1)

378-382: macOS専用ビルド設定は削除してください
ENABLE_APP_SANDBOXENABLE_USER_SELECTED_FILES はmacOS特有の設定であり、SDKROOT=iphoneosのiOSターゲットでは無効かつ意味を持ちません。Xcode 16世代でもiOSではサンドボックスが常に有効のため、この設定が残ると将来のメンテナンス時に誤解を招きます。Debug / Release 両方から削除してください。

 				DEVELOPMENT_ASSET_PATHS = "\"JShift/Preview Content\"";
-				ENABLE_APP_SANDBOX = YES;
 				ENABLE_PREVIEWS = YES;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
-				ENABLE_USER_SELECTED_FILES = readonly;
 				GENERATE_INFOPLIST_FILE = YES;
…
 				DEVELOPMENT_ASSET_PATHS = "\"JShift/Preview Content\"";
-				ENABLE_APP_SANDBOX = YES;
 				ENABLE_PREVIEWS = YES;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
-				ENABLE_USER_SELECTED_FILES = readonly;
 				GENERATE_INFOPLIST_FILE = YES;

Also applies to: 413-417

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c6d368 and 6c49fb2.

📒 Files selected for processing (3)
  • JShift.xcodeproj/project.pbxproj (9 hunks)
  • JShift/Views/ContentView.swift (2 hunks)
  • JShift/Views/Setting/SettingView.swift (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

Use Japanese text for UI labels (hardcoded strings) and SF Symbols for icons

Files:

  • JShift/Views/Setting/SettingView.swift
  • JShift/Views/ContentView.swift
🧠 Learnings (2)
📚 Learning: 2025-08-19T13:18:29.574Z
Learnt from: CR
Repo: shinking02/JShift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-19T13:18:29.574Z
Learning: Applies to **/*.swift : Use Japanese text for UI labels (hardcoded strings) and SF Symbols for icons

Applied to files:

  • JShift/Views/Setting/SettingView.swift
  • JShift.xcodeproj/project.pbxproj
📚 Learning: 2025-08-19T13:18:29.574Z
Learnt from: CR
Repo: shinking02/JShift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-19T13:18:29.574Z
Learning: Use TabView-based navigation with three main sections: ShiftView, SalaryView, SettingView

Applied to files:

  • JShift/Views/ContentView.swift
🔇 Additional comments (2)
JShift/Views/ContentView.swift (1)

47-47: LGTM!

詳細リンクがPR #12を正しく参照しています。

JShift/Views/Setting/SettingView.swift (1)

30-33: フッター年表示の更新ありがとうございます
Liquid Glass対応の文脈でも整合しており、この変更に問題はありません。

@State private var isWelcomePresented = false
@Environment(\.openURL) private var openURL
private let AVAIABLE_OB_VERSION = "4"
private let AVAIABLE_OB_VERSION = "5(last)"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

定数名のタイポと非標準的なバージョン文字列を修正してください。

以下の問題があります:

  • 定数名に誤字: AVAIABLE_OB_VERSIONAVAILABLE_OB_VERSION
  • バージョン文字列 "5(last)" の形式が非標準的です。通常は数字のみ(例: "5")またはセマンティックバージョニング(例: "2.0.0")を使用します。

修正案:

-    private let AVAIABLE_OB_VERSION = "5(last)"
+    private let AVAILABLE_OB_VERSION = "5"

定数名を変更する場合は、30行目と35行目での使用箇所も更新してください。

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In JShift/Views/ContentView.swift around line 7, rename the misspelled constant
AVAIABLE_OB_VERSION to AVAILABLE_OB_VERSION and replace the non-standard version
string "5(last)" with a standard numeric version such as "5"; also update all
references to the renamed constant at lines 30 and 35 so they use
AVAILABLE_OB_VERSION to avoid compile errors.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
JShift/Views/Shift/Parts/CalendarView.swift (1)

160-160: 不要な空行

この空行は削除可能です。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c49fb2 and 149f286.

📒 Files selected for processing (1)
  • JShift/Views/Shift/Parts/CalendarView.swift (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

Use Japanese text for UI labels (hardcoded strings) and SF Symbols for icons

Files:

  • JShift/Views/Shift/Parts/CalendarView.swift
🧬 Code graph analysis (1)
JShift/Views/Shift/Parts/CalendarView.swift (1)
JShift/Lib/SalaryManager.swift (1)
  • getSalaryData (183-222)

Comment on lines +136 to +141
let paymentJobSalary = SalaryManager.shared
.getSalaryData(date: dateComponents.date ?? Date(), jobs: [paymentDayJob], dateMode: .month)
.first
if let paymentJobSalary = paymentJobSalary, (paymentJobSalary.confirmedSalary > 0 || paymentJobSalary.forecastSalary > 0) {
return createCustomDecoration(dayJob: dayJob, dayOTJobs: dayOTJobs, paymentDayJob: paymentDayJob, dateEvents: dateEvents)
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

給与データ取得のパフォーマンス懸念

calculateDecorationはカレンダーの各日付(最大31〜42日分)に対して呼び出され、ここでgetSalaryDataを毎回実行すると、以下の影響があります:

  • getSalaryDatagetWorkIntervalgetJobEvents、給与履歴のフィルタリングなど、比較的重い処理を含んでいます
  • decorationCacheはRealm更新や表示切替のたびにクリアされるため(69、81、100行目)、頻繁に再計算が発生します
  • UI描画パスで実行されるため、パフォーマンスに影響する可能性があります

改善案:

  • 月全体の給与データをCoordinatorレベルで事前計算してキャッシュすることを検討してください
  • または、給与データ取得を非同期化し、結果をキャッシュする仕組みを導入してください

補足:dateComponents.date ?? Date()のフォールバックは、dateComponents.datenilの場合に現在日時を使用しますが、意図した日付と異なる可能性があります。

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
JShift/Views/Shift/DateShiftView.swift (1)

185-188: 強制アンラップのリスクがあります

187行目で jobs.first! を使用していますが、jobs が空の場合にクラッシュの可能性があります。現在の実装では93行目でボタンが無効化されているため安全ですが、将来のリファクタリングでバグが混入する可能性があります。

以下のように防御的なコーディングを推奨します:

         .sheet(isPresented: $showAddEventSheet) {
             let startDate = Date().fixed(year: selectedDate.year, month: selectedDate.month, day: selectedDate.day)
-            EventAddView(selectedJob: jobs.first!, start: startDate, end: startDate.added(hour: 2), isAllDay: false)
+            if let firstJob = jobs.first {
+                EventAddView(selectedJob: firstJob, start: startDate, end: startDate.added(hour: 2), isAllDay: false)
+            }
         }

または、jobs.isEmpty のガードを sheet のクロージャ内に追加することも検討してください。

♻️ Duplicate comments (1)
JShift/Views/ContentView.swift (1)

7-7: 定数名のタイポと非標準的なバージョン文字列を修正してください。

この問題は以前のレビューで既に指摘されています:

  • 定数名の誤字: AVAIABLE_OB_VERSIONAVAILABLE_OB_VERSION
  • バージョン文字列 "5(last)" の形式が非標準的です。通常は数字のみ(例: "5")またはセマンティックバージョニング(例: "2.0.0")を使用してください。

修正する場合は、30行目と35行目での使用箇所も更新が必要です。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 149f286 and df26449.

📒 Files selected for processing (2)
  • JShift/Views/ContentView.swift (2 hunks)
  • JShift/Views/Shift/DateShiftView.swift (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

Use Japanese text for UI labels (hardcoded strings) and SF Symbols for icons

Files:

  • JShift/Views/Shift/DateShiftView.swift
  • JShift/Views/ContentView.swift
🧠 Learnings (1)
📚 Learning: 2025-08-19T13:18:29.574Z
Learnt from: CR
Repo: shinking02/JShift PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-19T13:18:29.574Z
Learning: Use TabView-based navigation with three main sections: ShiftView, SalaryView, SettingView

Applied to files:

  • JShift/Views/Shift/DateShiftView.swift
  • JShift/Views/ContentView.swift
🧬 Code graph analysis (1)
JShift/Views/Shift/DateShiftView.swift (3)
JShift/Lib/SalaryManager.swift (1)
  • getSalaryData (183-222)
JShift/Models/SwiftData/JobExtension.swift (1)
  • getPaymentDay (5-12)
JShift/Lib/DateExtension.swift (1)
  • isSameDay (172-174)
🔇 Additional comments (7)
JShift/Views/ContentView.swift (2)

47-47: LGTM!

リンクURLが正しくこのPR(#12)を参照するように更新されています。


10-28: Liquid Glass実装の確認をお願いします。

このファイルには基本的なTabView構造のみが含まれており、PRの目的に記載されている「Liquid Glassデザイン(blur・反射・透過・屈折等のガラス質感)」の実装が見当たりません。

実装が ShiftViewSalaryViewSettingView などの子ビューや別のUIコンポーネントファイルに含まれていることを確認してください。また、以下の点も検証をお願いします:

  • タブバーのスクロール連動挙動(iOS 26仕様)
  • ライト/ダークモード対応と視認性
JShift/Views/Shift/DateShiftView.swift (5)

5-5: LGTM!構造体名の変更が適切です

ShiftSheetView から DateShiftView への名称変更により、このビューの役割がより明確になっています。


38-58: パフォーマンス問題が解決されました!

以前のレビューコメントで指摘されていた、ループ内での getSalaryData の繰り返し呼び出しによるメインスレッドのブロッキング問題が修正されています。現在の実装では、全ジョブに対して一度だけ給与データを取得し、辞書ルックアップを使用することで、計算量が大幅に削減されています。


119-124: LGTM!給与データの統合が適切です

新しい paymentDayJobsWithSalary タプルからジョブと給与額を PaymentDayRowView に正しく渡しており、データフローが明確になっています。


125-125: LGTM!空状態の条件が正しく更新されています

新しい paymentDayJobsWithSalary を含むように空状態チェックが適切に更新されています。


63-96: コーディングガイドラインに準拠していますが、Liquid Glassエフェクトの実装状況を確認してください

日本語ラベル(「単発」「長期」)とSFシンボル(plus.circle.dashedplus.circle)の使用が適切で、コーディングガイドラインに従っています。

ただし、検査結果から以下が明らかになりました:

  • DateShiftView(lines 63-96)にLiquid Glassエフェクト(blur、Material等)が存在しません
  • 親ビューのShiftView.swiftにも同様にエフェクトが適用されていません
  • コードベース内ではLaunchScreenView.swiftにのみbluレフェクトが実装されており、ShiftView/DateShiftViewには実装されていません

PRの目的である「iOS 26 Liquid Glass対応」に基づき、このビューにもLiquid Glassエフェクトを適用すべきかどうか、設計意図を確認してください。

bulletedListItems: [
.init(title: "チャート", description: "年間給与のチャートを復活させました。", symbolName: "chart.bar.xaxis.ascending", tintColor: UIColor(.green)),
.init(title: "給与表示", description: "給与の表示順を給与の高い順に変更しました。", symbolName: "arrow.up.arrow.down", tintColor: UIColor(.blue)),
.init(title: "iOS 26に対応", description: "iOS 26対応と軽微な不具合の修正", symbolName: "apple.logo", tintColor: UIColor(.green)),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

オンボーディングの説明がアップデートの規模を正確に反映していません。

PRの目的には「Liquid Glassデザインの実装」「メジャーバージョン更新」「新UIのオンボーディング追加」など大規模な変更が記載されていますが、オンボーディングの説明には「軽微な不具合の修正」としか書かれていません。

ユーザーに対してアップデートの重要性を適切に伝えるため、説明文をより具体的にすることを検討してください:

-                        .init(title: "iOS 26に対応", description: "iOS 26対応と軽微な不具合の修正", symbolName: "apple.logo", tintColor: UIColor(.green)),
+                        .init(title: "iOS 26に対応", description: "iOS 26の新デザイン「Liquid Glass」に対応し、UIを刷新しました", symbolName: "apple.logo", tintColor: UIColor(.green)),
🤖 Prompt for AI Agents
In JShift/Views/ContentView.swift around line 42, the onboarding item
description currently says "軽微な不具合の修正" which undersells the PR (major version
bump, Liquid Glass design, new onboarding UI). Update the title/description
string to reflect the actual scope—for example mention the Liquid Glass design
rollout, major version update, and new onboarding UI—while keeping existing
symbolName and tintColor; ensure the change uses the app's localization pattern
(if any) and keeps string formatting/escaping consistent.

@shinking02 shinking02 requested a review from Copilot November 4, 2025 14:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the app to iOS 26 compatibility, introduces UI refactoring by replacing a sheet-based view with an inline view, and optimizes salary calculations for payment days.

  • Refactored ShiftSheetView to DateShiftView and removed sheet presentation logic
  • Optimized payment day salary calculations by computing salary data once upfront instead of per-view
  • Updated project configuration for iOS 26 with new sandbox settings

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
JShift/Views/Shift/ShiftView.swift Replaced sheet-based ShiftSheetView with inline DateShiftView component
JShift/Views/Shift/DateShiftView.swift Renamed from ShiftSheetView, removed toolbar, added inline header with buttons, optimized payment day salary computation
JShift/Views/Shift/Parts/PaymentDayRowView.swift Simplified by accepting pre-computed salary as parameter instead of fetching internally
JShift/Views/Shift/Parts/CalendarView.swift Added salary validation check before creating payment day calendar decorations
JShift/Models/SwiftData/JobSchemaV1.swift Changed id from let to var for Job and OneTimeJob
JShift/Models/CalendarManager.swift Added maxResults limits to Google Calendar API queries
JShift/Views/Salary/SalaryContentView.swift Fixed animation deprecation by replacing .animation(.none) with .animation(nil, value:)
JShift/Views/ContentView.swift Updated onboarding version and content for iOS 26 release
JShift/Views/Setting/SettingView.swift Updated copyright year to 2024-2025
JShift/JShift.entitlements Removed sandbox-related entitlements (moved to project settings)
JShift.xcodeproj/project.pbxproj Updated to Xcode 26, version 1.1.7, enabled app sandbox, moved development team to shared settings
JShift.xcodeproj/.../UserInterfaceState.xcuserstate Binary Xcode user state file changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@State private var isWelcomePresented = false
@Environment(\.openURL) private var openURL
private let AVAIABLE_OB_VERSION = "4"
private let AVAIABLE_OB_VERSION = "5(last)"
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'AVAIABLE' to 'AVAILABLE' in constant name.

Copilot uses AI. Check for mistakes.
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"JShift/Preview Content\"";
DEVELOPMENT_TEAM = 8KH9QD5V23;
ENABLE_APP_SANDBOX = YES;
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

The ENABLE_APP_SANDBOX setting has been added to the target-specific build configuration, but the corresponding entitlements were removed from JShift.entitlements. For App Sandbox to work properly, the entitlements file should contain the com.apple.security.app-sandbox key set to true. Consider restoring the sandbox entitlements or removing the build setting.

Copilot uses AI. Check for mistakes.
@shinking02 shinking02 added the enhancement New feature or request label Nov 4, 2025
@shinking02
Copy link
Owner Author

@copilot
Could you give it another look?

Copy link

Copilot AI commented Nov 4, 2025

@shinking02 I've opened a new pull request, #13, to work on those changes. Once the pull request is ready, I'll request review from you.

@shinking02
Copy link
Owner Author

#6 の対応を先にマージしたいためマージ保留

@shinking02 shinking02 marked this pull request as draft November 4, 2025 14:57
@shinking02 shinking02 marked this pull request as ready for review November 12, 2025 13:00
@shinking02 shinking02 merged commit a81c52f into main Nov 12, 2025
1 check passed
@shinking02 shinking02 deleted the issue/5 branch November 12, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deadline: 2025-11-16] bump 1.0.7 iOS 26 Liquid Glass対応 + メジャーバージョン更新

2 participants