Ponshu Developer
|
9fba57621a
|
fix: quotaLockout Provider化・色トークン整備・依存バージョン固定
- quotaLockoutProvider (NotifierProvider) を新規作成し、カメラ・詳細画面で共有
- camera_analysis_mixin: quotaLockoutTime フィールドを削除、429時にProviderへ設定
- camera_screen: ref.watch(quotaLockoutProvider) でシャッターボタンUI更新
- sake_detail_screen: _quotaLockoutTime フィールドを削除、Providerに移行
- 画面遷移後もロックアウト状態が保持されるP1バグを解消
- camera_screen: Colors.red/grey → appColors.error/textTertiary に置換
- camera_screen: ギャラリー保存SnackBarから例外文字列 $e を除去
- camera_screen: SnackBarAction textColor Colors.yellow → appColors.brandAccent
- pubspec.yaml: flutter_riverpod ^3.1.0, riverpod_annotation 3.0.0-dev.3,
riverpod_generator 3.0.0-dev.11 を固定(バージョン未固定による意図しないアップグレードを防止)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-18 14:18:27 +09:00 |
Ponshu Developer
|
dd9b814174
|
refactor: TextEditingControllerリーク解消・エラー正規化・デザイントークン整備
- sake_detail_screen: _showTagEditDialog/TextEditDialog/BreweryEditDialog に
try/finally + controller.dispose() を追加(メモリリーク修正)
- sake_detail_screen: State フィールドを build() より前に移動
- 生例外の SnackBar 露出を人間可読メッセージに正規化(6ファイル・10箇所)
- camera_analysis_mixin: Colors.orange を appColors.warning に置換、
ガミフィケーション色を brandAccent/success/textTertiary に統一
- sake_detail_screen: ハードコード hex 色グラデーションをトークン化
- scan_screen / pdf_preview_screen / add_set_item_dialog: 絵文字 debugPrint を除去
- sake_basic_info_section: unnecessary_non_null_assertion (warning) を解消
- license_service: revoked 永続キャッシュの意図をコメントで明確化
- dart analyze: warning 0 / error 0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-17 23:48:32 +09:00 |
Ponshu Developer
|
ac2a54d07a
|
feat: AI使用回数トラッキング + クォータ上限時ドラフト保存
- ApiUsageService: SharedPreferences で Gemini 日次使用回数を追跡
- UTC 08:00(=日本時間 17:00)でリセット
- 上限 20回/日(プロジェクトあたりの無料枠)
- DraftReason enum: offline / quotaLimit / congestion を区別
- camera_analysis_mixin: 解析前にクォータを事前チェック
- 上限到達時は Draft 保存してカメラを閉じる(写真は失われない)
- 429 エラー時も同様に Draft 保存(従来はエラー表示のみで写真消失)
- API 呼び出し成功時(キャッシュ除く)にカウントアップ
- pending_analysis_screen: ドラフト理由を各アイテムに表示
- クォータ: リセット時刻つきの警告(オレンジ)
- 混雑 / オフライン: 理由別メッセージ
- ActivityStats: AI 使用状況 bento カードを追加
- 今日のAI解析 X / 20回 + プログレスバー
- 残り5回以下でオレンジ、上限到達で赤
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-16 17:58:00 +09:00 |
Ponshu Developer
|
aa933cf1e3
|
refactor: P2/P3-Step1 — camera_screen Mixin分離 + license storeURL修正
P2:
- license_screen.dart: storeUrl を store.posimai.soar-enrich.com に統一(TODO解消)
P3 Step1:
- camera_analysis_mixin.dart 新規作成: analyzeImages() + _performSakenowaMatching()
を CameraAnalysisMixin<T extends ConsumerStatefulWidget> on ConsumerState<T> に切り出し
- camera_screen.dart: 1031行 → 718行(-313行)
不要なimport 10個削除、Mixin適用、フィールド/メソッド移動
Note: Dart ライブラリプライベート制約のため Mixin の公開 API は
capturedImages / quotaLockoutTime / analyzeImages(アンダースコアなし)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-16 13:20:53 +09:00 |