Skip to content

[GH-439] domain_model に移行#540

Merged
blendthink merged 4 commits into
mainfrom
improve/GH-439
Jun 6, 2025
Merged

[GH-439] domain_model に移行#540
blendthink merged 4 commits into
mainfrom
improve/GH-439

Conversation

@karas1910
Copy link
Copy Markdown
Contributor

概要

close: #439

アプリの強制アップデートとメンテナンスモード機能に必要なドメインモデルを追加しました。

主な追加項目:

  • ForceUpdateSettingsState - 強制アップデート設定の状態管理
  • ForceUpdateTargetVersion - 強制アップデート対象バージョンの管理
  • MaintenanceModeSettingsState - メンテナンスモード設定の状態管理
  • VersionString - バージョン文字列の比較機能付きextension type

レビュー観点

  • ドメインモデルの設計が適切かどうか
  • 強制アップデート判定ロジック(ForceUpdateSettingsState.isForceUpdateEnabled)の妥当性
  • VersionStringのバージョン比較演算子の実装
  • Freezedの使用方法とビルド設定

レビューレベル

  • Lv2: 仕様レベルまで理解して、仕様通りに動くかある程度検証して Approve する

レビュー優先度

  • 今日〜明日中で見てもらいたい 🚶

画像 / 動画

見た目に関する変更がないため省略します。

確認したこと

  • Freezedによるコード生成が正常に動作すること
  • VersionStringのバージョン比較が正しく動作すること
  • 新しいモデルがinternal_domain_model.dartからexportされていること
  • ビルド設定(build.yaml)が適切に設定されていること

動作確認手順

備考

このPRではドメインモデルの追加のみで、実際の機能実装は別PRで行います。

@github-actions github-actions Bot added the @packages/domain_model packages domain_model package label Jun 3, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2025

Compare pubspec.yaml and pubspec.lock. Packages with different version notations

package pubspec.yaml pubspec.lock
test ^1.25.8 1.25.15

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2025

Compare pubspec.yaml and pubspec.lock. Packages with different version notations

package pubspec.yaml pubspec.lock
test ^1.25.8 1.25.15

karas1910 added 2 commits June 4, 2025 16:50
…モード設定を実装

- 新しいビルド設定を `build.yaml` に追加
- `pubspec.yaml` に依存関係を追加
- `force_update_settings_state.dart` と `force_update_target_version.dart` を新規作成
- `maintenance_mode_settings_state.dart` を新規作成し、メンテナンスモードの状態を管理
- `version_string.dart` を追加し、バージョン管理のための拡張を実装
- `build.yaml` での空白を整理
- `force_update_settings_state.freezed.dart`、`force_update_target_version.freezed.dart`、`maintenance_mode_settings_state.freezed.dart` でのエラーメッセージの末尾にカンマを追加
- 各クラスの `copyWith` メソッドのフォーマットを統一
@karas1910 karas1910 marked this pull request as ready for review June 4, 2025 07:51
@karas1910 karas1910 requested a review from blendthink June 4, 2025 07:51
@yumemi-team-review-requester yumemi-team-review-requester Bot requested review from a team and r0227n and removed request for a team June 4, 2025 07:51
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2025

Ready for review 🚀

Copy link
Copy Markdown
Contributor

@blendthink blendthink left a comment

Choose a reason for hiding this comment

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

@karas1910
おそらくパッケージバージョンを揃える必要があるのと、その後の警告対応などが必要かなと思いますので、ご確認お願いします🙏

- `pubspec.yaml` で `freezed_annotation` を ^2.4.4 から ^3.0.0 に変更
- `freezed` を ^2.5.7 から ^3.0.6 に更新
- `test` のバージョンを ^1.25.8 から ^1.25.15 に変更
part 'force_update_settings_state.freezed.dart';

@freezed
class ForceUpdateSettingsState with _$ForceUpdateSettingsState {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@karas1910
freezedは3系から sealed or abstract が必要になっているので、下記のドキュメントの確認お願いします。

https://github.com/rrousselGit/freezed/blob/master/packages/freezed/migration_guide.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@den0206
68e4f79 で修正しました!

…ceModeSettingsStateを抽象クラスに変更

- `ForceUpdateSettingsState`、`ForceUpdateTargetVersion`、`MaintenanceModeSettingsState`を抽象クラスとして定義
Copy link
Copy Markdown
Contributor

@blendthink blendthink left a comment

Choose a reason for hiding this comment

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

LGTM!

@blendthink blendthink added this pull request to the merge queue Jun 6, 2025
Merged via the queue into main with commit fae20ad Jun 6, 2025
16 checks passed
@blendthink blendthink deleted the improve/GH-439 branch June 6, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@packages/domain_model packages domain_model package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improve]: domain-modelパッケージへの切り出し

3 participants