Commit Graph

59 Commits

Author SHA1 Message Date
Ponshu Developer 1bf59e02cc fix(stability): エラーハンドリング強化・クラッシュ防止 (v1.0.45)
- backup_service: 復元ループを per-item try-catch に変更
  一件のJSONパース失敗でも他のアイテムが正常に復元されるよう修正
  rating/markup/score の num→double キャスト安全化も同時適用

- camera_analysis_mixin: cast<String>() を whereType<String>() に変更
  旧Hiveデータや型不一致でも新規登録がクラッシュしなくなる

- add_set_item_dialog: 空catchブロックにSnackBar通知を追加
  画像選択失敗時にユーザーへフィードバックを表示するよう修正

- Image.file() errorBuilder を6ファイルに追加
  sake_3d_carousel / sake_3d_carousel_with_reason / sake_search_delegate /
  sake_detail_sliver_app_bar (×2) / sake_photo_edit_modal /
  sakenowa_ranking_section — 画像ファイルが削除済みでも黒画面/クラッシュなし

- gemini_service: Device ID の debugPrint を kDebugMode ガードに変更

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 07:31:21 +09:00
Ponshu Developer 0fb4f6ea8b fix(ai): ハルシネーション防止を一般化・N文字ルール追加・6銘柄例示
- systemInstruction をOCR専門システムとして再定義(東魁限定から一般化)
- 「ラベルにN文字なら必ずN文字のみ出力」ルールを明示化
- 東魁/男山/白鹿/久保田/白鶴/松竹梅の6銘柄例を追加
- 出力前セルフチェック手順をプロンプトに追加
- menu_pricing_screen: SharedPreferences を async/await+try-catch に修正
- version: 1.0.43+50 → 1.0.44+51
- web: eiji/maita 向け consumer APK (v1.0.44) を配置・ダウンロードページ更新

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 00:26:13 +09:00
Ponshu Developer 1a84163654 fix: use_build_context_synchronously 解消
_reanalyze で nav / messenger を async gap 前にキャプチャするよう移動。
showDialog の context 引数を ignore 対象行に統合。
dart analyze: No issues found

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 08:20:42 +09:00
Ponshu Developer 2e770ff98d refactor: ハードコード色をAppColorsセマンティックカラーに置換
- pending_analysis_banner: Colors.orange.* → appColors.warning(グラデーション・影・バッジ)
- activity_stats: Colors.orange → appColors.warning(残回数少ない警告色・テキスト)
- scan_screen: Colors.grey → appColors.textTertiary(蔵元/産地テキスト)
- sake_no_match_state: Colors.grey[400/600] → appColors.textTertiary(空状態アイコン・テキスト)
- camera_screen: Colors.greenAccent → appColors.success(解析開始ボタン)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 08:18:48 +09:00
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 5d8689b7ee merge: claude/sync-cursor-history-cSlsP — SakeItem setter廃止 + セマンティックカラー置換
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 13:09:56 +09:00
Claude a62bcd1d11
refactor: ハードコード色をAppColorsセマンティックカラーに置換
意図的な箇所(カメラUI・AppBar白テキスト・ハート色・Proバッジ等)はKEEP。
以下のUIロジックに影響しない7ファイルのみ変更:

- Colors.grey.shade400/[400] → appColors.iconSubtle (アイコン、無効状態)
- Colors.grey.shade300 → appColors.divider (プレースホルダー背景)
- Colors.grey → appColors.textSecondary / iconSubtle / divider (文脈別)
- Colors.grey[200] → appColors.surfaceSubtle (プログレスバー背景)
- Colors.orange → appColors.warning (警告スナックバー)
- Colors.green / Colors.red → appColors.success / error (完了・失敗スナックバー)

_createBackup()にappColorsをasync前にキャプチャするFlutterベストプラクティスを適用。
コメント化されていたデッドコメントも同時削除。

https://claude.ai/code/session_01DWQpnqrQWwxVKKWSL9kDPp
2026-04-16 23:50:39 +00:00
Ponshu Developer cc5175ebae refactor: ExposureSliderPainter を別ファイルに切り出し
camera_screen.dart の末尾にあった _ExposureSliderPainter (60行) を
lib/screens/camera_exposure_painter.dart に分離。
動作変更なし。718行 → 659行。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 21:08:30 +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 68723a884e feat: 記録日時を一覧カードと詳細画面に表示
- sake_list_item: カード末尾に相対日付を追加
  今日 / 昨日 / N日前 / M/D / YYYY/M/D
- sake_basic_info_section: 蔵元行直下にカレンダーアイコン + 「YYYY年M月D日に記録」を追加
  セット商品は非表示
- metadata.createdAt(非null保証)を使用、追加フィールド不要

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 14:01:17 +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
Ponshu Developer e82f66e44e fix: prevent EXP farming on cache hits + fix tasteStats validation
- SakeAnalysisResult.isFromCache flag added (not serialized to JSON)
- Both cache-hit paths return result.asCached() to signal caller
- camera_screen: EXP +10 only awarded on fresh API calls, not cache hits
- camera_screen: show '解析済みの結果を使用(経験値なし)' on cache hit
- camera_screen: clear _capturedImages after successful analysis
- camera_screen: catch(_) -> catch(e) with debugPrint logging
- SakeAnalysisResult.fromJson: auto-fill missing tasteStats keys with 3,
  clamp all values to 1-5 range to prevent broken charts
- Bump version 1.0.37+44 -> 1.0.38+45

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 10:46:42 +09:00
Ponshu Developer 23ba95d326 fix: restore badgeColor null-assert (dart analyze false positive)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 13:37:25 +09:00
Ponshu Developer 69b446ee17 fix: address code review findings - crash fixes, proxy OCR accuracy, lint cleanup
- tools/proxy/server.js: add systemInstruction + temperature 0 (fixes brand name hallucination e.g. Tokai->Tokaisou)
- gemini_service.dart: add cache read/write to proxy path (was missing, cache was dead code in production)
- camera_screen.dart: guard cameras.first crash when no camera available, add mounted checks in gallery loop
- sake_detail_screen.dart: remove unused gemini_service import, add ignore comment for showDialog context lint
- sake_basic_info_section.dart: remove redundant null-assert operators flagged by dart analyze
- dev_menu_screen.dart: remove unused gemini_service import
- 6 service files: remove emoji from log strings (project rule compliance, 60+ instances)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 13:30:00 +09:00
Ponshu Developer 2890b6cb6f refactor: replace disk cache with in-memory session cache (v1.0.33)
Analysis cache redesign:
- Remove Hive persistence from AnalysisCacheService entirely
- Use Map<String, SakeAnalysisResult> in-memory instead of Hive boxes
- Cache now lives only for the duration of an app session; restart always
  produces a fresh analysis — no stale misidentifications can persist
- Remove Hive init(), TTL/cleanupExpired(), getCachedByBrand() dead code
- API surface unchanged: callers (gemini_service, dev_menu) need no edits
- main.dart: delete legacy Hive boxes (analysis_cache_v1, brand_index_v1)
  from disk on startup for existing users
- dev_menu_screen: update cache description text to reflect new behavior

Rationale:
- Camera captures always produce unique files -> cache hit rate was ~0%
- Each user supplies their own Gemini API key -> no shared cost benefit
- Persistent wrong results (e.g. misrecognized brand names) could survive
  up to 30 days under the old design
- Different sake editions photographed separately have different hashes
  and were never affected by the cache in the first place

Made-with: Cursor
2026-04-12 08:13:18 +09:00
Ponshu Developer 3d934deb56 fix: address remaining code audit findings and bump to v1.0.32
- migration_service: runMigration() now returns bool; main.dart only
  advances migration_version when migration succeeds
- sakenowa_service: add 30s timeout to all 6 http.get calls
- gemini_service: add 60s timeout to Direct API generateContent call
- gemini_service: guard response.body error log with kDebugMode
- Remove emoji from debugPrint in core service/screen files
  (gemini_service, analysis_cache_service, network_service,
   draft_service, camera_screen)

Made-with: Cursor
2026-04-12 07:25:24 +09:00
Ponshu Developer c8ffe2626f refactor: apply critical code review fixes
- draft_service: GeminiService is now passed as a required parameter
  to analyzeDraft/analyzeAllDrafts instead of being directly instantiated,
  ensuring consistent Riverpod-managed injection
- gemini_provider: correct misleading comment (rate limiting is due to
  static field, not Provider; Provider enables future safe refactoring)
- analysis_cache_service: cleanupExpired now also removes orphaned brand
  index entries from _brandIndexBox after deleting expired _box entries
- analysis_cache_service: keysToDelete type corrected from List<dynamic>
  to List<String>, removing unnecessary as String cast
- analysis_cache_service: _normalizeBrandName comment clarified to note
  that .toLowerCase() only affects ASCII characters, not Japanese text
- camera_screen: add explicit ignore comment with rationale for
  showDialog after async gap (mounted check immediately precedes it)
- camera_screen: remove leaked Cursor instruction comment from line 96

Made-with: Cursor
2026-04-12 00:24:57 +09:00
Ponshu Developer 94f7ee20ea refactor: code quality improvements based on critical review
Made-with: Cursor
2026-04-12 00:09:09 +09:00
Ponshu Developer f8ceb0bf02 fix: ソムリエ画面UIを統一 — カードスタイル・padding・重複ヘッダー削除
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 12:11:21 +09:00
Ponshu Developer f229ff6b4b fix: 外部コードレビュー指摘の修正4件
device_service.dart:
- iOS device_idをSharedPreferencesにUUID永続化(identifierForVendor廃止)
  → 全ベンダーアプリ削除後の再インストール後もライセンスが継続する
- fallback device_idもSharedPreferencesに永続化
  → アプリ再起動のたびにIDが変わるバグを修正

license_service.dart:
- revokedキャッシュが24h後にfreeに降格するバグを修正
  → proとrevokedはキャッシュ有効期限の対象外にする

sake_mbti_stamp_section.dart / sake_detail_screen.dart:
- isProVersion(コンパイル時) → isProProvider(実行時ライセンス)に移行
  → ライセンス購入後にアプリ再起動なしでMBTIスタンプが有効になる

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 08:14:37 +09:00
Ponshu Developer 7b3249791e fix: セルフコードレビュー修正 — ライセンス管理バグ4件
- license_service.dart: オフライン時にProキャッシュを上書きしないよう修正
  (offline statusを受け取ったらキャッシュフォールバックを使う)
- license_service.dart: activate()でoffline状態を明示的にハンドル
  (「キーが見つかりません」ではなく「接続できません」と表示)
- license_service.dart: ライセンスキーのバイト数コメントを修正 (16→6バイト)
- license_screen.dart: Pro画面の誤ったテキスト修正
  (「AI解析無制限」→「すべてのPro機能」)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 06:42:35 +09:00
Ponshu Developer 659e81628a chore: v1.0.26 — Pro版ライセンス管理リリース
- pubspec.yaml: 1.0.21+32 -> 1.0.26+33
- home_screen.dart: 不正な ';' を削除(構文エラー修正)
- releases.json: v1.0.26 に更新

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 00:23:36 +09:00
Ponshu Developer d47bb201ac feat: ライセンス管理システムを追加(Pro機能解放型)
- LicenseService / LicenseProvider / LicenseScreen を追加
- main_screen.dart: isProVersion(ビルド時)→ isProProvider(ランタイム)に変更
  ライセンスキー購入後にARスキャン・Analytics・Instagram支援が解放される
- home_screen.dart: 不要なTrialStatusBannerを削除(AI解析は常時無制限)
- proxy/server.js: トライアル回数制限・Stripe/Resendコードを削除(整理)
- proxy/package.json: stripe/resend依存を削除
- .github/workflows/ios_build.yml: iOS CI追加
- scripts/deploy_android.ps1: Android配布スクリプト追加

AI解析(1日50回)はLite版でも制限なし
Proライセンス購入でARスキャン・Analytics・Instagram支援を解放

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 00:05:53 +09:00
Ponshu Developer fedfc6fa62 fix: code review fixes — data integrity, safety, architecture
C-2: draft_service — $i+1 → ${i+1} 文字列補間バグ修正
C-1: sake_item — setter内の unawaited save() を削除(呼び出し元で明示的に await)
H-2: sake_detail_screen — 再解析前に実ファイル存在チェック追加
M-4: gemini_exceptions.dart 新規作成、[CONGESTION]文字列マッチ→型チェックに変更
C-4: main.dart — migration_completed フラグ→ migration_version 番号管理に移行
     既存ユーザーのデータは migration_version=1 扱いで安全に互換維持

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 08:26:53 +09:00
Ponshu Developer 182e498188 fix: save as draft when Gemini 503 exhausts all retries
When API congestion persists after 3 retries + fallback:
- Mark exception with [CONGESTION] tag
- camera_screen catches it and calls DraftService.saveDraft()
- Shows orange snackbar (same UX as offline) instead of red error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 19:17:30 +09:00
Ponshu Developer 818f8862a1 feat: detail screen UI polish — badge merge, clean typography, spec peek, no dividers
変更1: AI確信度 + MBTI相性バッジを横並び1行に統合(Wrap)
変更2: 銘柄名・酒蔵から常時表示の鉛筆アイコンを除去、区切りを / → · に変更
       キャッチコピーを銘柄名直下に移動、タグをpill形状(radius:20)に変更
変更3: スペック詳細アコーディオンのタイトルにアルコール度数・精米歩合をチラ見せ
変更4: Divider 4本 → SizedBox(height:32) に置換
       おすすめ見出しカラーを colorScheme.onSurface → appColors.textPrimary に統一

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 14:55:21 +09:00
Ponshu Developer 4758aa5c9c fix: remove Pro-only placeholder in consumer APK, fix A-1/A-3 visibility
- sake_detail_screen: hide SakeMbtiStampSection when isProVersion=false
  (consumer APK no longer shows Pro版限定 placeholder at card bottom)
- sake_grid_item / sake_list_item: apply Pressable to actual tap targets
  (grid/list cards now animate on press instead of non-interactive LevelTitleCard)
- soul_screen / sommelier_screen: ambient glow alpha 0.07→0.12 for visibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 14:33:40 +09:00
Ponshu Developer a14dae1afb feat: UI modernization Phase 2 — micro-animation, typography, ambient glow
A-1 Micro-animation: Pressable wrapper widget (AnimatedScale 0.97 on tap)
    applied to LevelTitleCard

A-2 Bold Typography: LevelTitleCard title font 28→36px, 現在の称号 label
    demoted to bodySmall for stronger visual contrast

A-3 Ambient Glow: RadialGradient circle behind My Page (top-left, brandPrimary)
    and Sommelier screen (top-right, brandAccent) via Stack + IgnorePointer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 13:35:03 +09:00
Ponshu Developer 1741e74639 feat: restructure My Page and Sommelier screen layouts
My Page:
- LevelTitleCard: show nickname above title when set
- Add section header 成長記録 above gamification widgets
- Split profile card: basic info (nickname/gender) and sake character
  (MBTI/sake persona) are now separate named sections

Sommelier:
- Add section headers テイストプロフィール / MBTI風診断 / さけのわ おすすめ
- Widen share button to full width with rounded rect shape
- Remove Dividers between sections, use SizedBox(32) spacing instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 13:32:52 +09:00
Ponshu Developer 7797f4eed7 feat: hide business mode toggle in consumer APK, update 4-variant build script
- soul_screen.dart: pass showBusinessMode: isBusinessApp to OtherSettingsSection
  so the toggle is hidden when built with IS_BUSINESS_APP=false
- build_4_apks.sh: rewrite for current strategy (consumer/business x maita/eiji)
  Pro variants removed; set_lite_app_id() restores gradle before each build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 10:11:54 +09:00
Ponshu Developer b6163e8efe chore: guard DevMenu in release build, clean up Phase/TODO comments
- DevMenu: kReleaseModeのときonTap=nullでリリースビルドから完全無効化
- Phase N マーカーを全ファイルから削除(実装済みのため歴史的コメントを除去)
- analysis_cache_service TODOを具体的な記述に改善

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 03:02:01 +09:00
Ponshu Developer 426697403e fix: add maxLines/overflow to MBTI subtitle in soul_screen
長いMBTIタイトルがListTile内でUI崩れを起こす可能性があったため対処。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 02:51:42 +09:00
Ponshu Developer c0a23d2afb feat: add IS_BUSINESS_APP build flag for consumer/business APK split
消費者向けビルド(IS_BUSINESS_APP=false)では店舗タブを完全非表示にする。
build_consumer.sh / build_business.sh でワンコマンドビルド可能。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 23:13:40 +09:00
Ponshu Developer 9f63578ca7 chore: remove development phase markers and dead commented code
- Remove Phase X / Phase D labels from inline comments and imports
- Remove debugPrint calls from CustomPainter.paint() (called every frame)
- Remove commented-out locale entries (fr, de) from main.dart and language_selector
- Remove version header comments (v1.5 etc.) not needed in source

No logic changes. flutter analyze: No issues found.
2026-04-04 23:02:52 +09:00
Ponshu Developer aded5562cd fix: Resolve all flutter analyze warnings (39 -> 0 issues)
Code Quality Improvements:
- Add vector_math to pubspec.yaml (fixes depend_on_referenced_packages)
- Remove deprecated tutorial fields from UserProfile (hasSeenCameraTutorial, etc.)
- Regenerate user_profile.g.dart (Hive adapter)
- Suppress Share API deprecation warning in sommelier_screen.dart
- Fix unnecessary_getters_setters in sake_item.dart with ignore comment
- Fix unnecessary_brace_in_string_interps in sakenowa service
- Fix unnecessary_underscores warnings (_, __ -> err, stack)

Configuration:
- Exclude scripts/ and tools/ from analyzer (avoid_print in dev tools)
- Add analyze_output*.txt to .gitignore

Result: flutter analyze now reports "No issues found!"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-21 10:32:02 +09:00
Ponshu Developer d760e7bf08 chore: distribution prep - Kotlin DSL signing, .gitignore, build() split
- Fix DISTRIBUTION_API_KEY_SETUP.md: Groovy -> Kotlin DSL, Windows keytool cmds
- Add release signing config to build.gradle.kts (key.properties fallback)
- Add .serena/, key.properties, ponshu_release.jks to .gitignore
- Include Claude's build() split: SakeDetailSliverAppBar, SakeBasicInfoSection
- sake_detail_screen.dart: 1099 -> 795 lines (-304 lines)
- Remove tmp_commit_msg.txt
2026-02-16 19:08:09 +09:00
Ponshu Developer 1a50c739a1 refactor: Extract SakePricingSection from sake_detail_screen.dart, bump to v1.0.16+27
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 11:40:58 +09:00
Ponshu Developer d89b6917fa feat: v1.0.16 brushup + Synology Proxy integration
- fix: Replace hardcoded colors with AppColors theme
- refactor: Extract SakePhotoEditModal and SakeMbtiStampSection
- feat: Add taste chart manual editing feature
- test: Add unit tests for SakeItem and AnalysisCacheService (14 tests)
- feat: Add Synology AI Proxy server (Node.js/Docker)
- chore: Make useProxy configurable via dart-define
- chore: Add .apk/.aab/.ipa to .gitignore
- docs: Add proxy setup guide and project roadmap

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 00:13:12 +09:00
Ponshu Developer ed7c0f0781 chore: Remove Flutter template test file
- Deleted test/widget_test.dart (Flutter Counter template)
- File was unrelated to Ponshu Room Lite functionality
- Actual tests will be added in v1.0.16

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-09 21:10:56 +09:00
Ponshu Developer 5410c78c6c fix: Add missing badge check after AI sake registration
## Bug Fix
- Badge "初めての一歩" was not unlocking when adding first sake item
- Root cause: GamificationService.checkAndUnlockBadges() was never called in camera_screen.dart

## Changes
- Import gamification_service.dart
- Call checkAndUnlockBadges(ref) after adding sake item to Hive
- Display newly unlocked badges in success SnackBar
- Extend SnackBar duration when badges are unlocked (4s -> 6s)

## User Impact
- Users will now see badge unlock notifications: "バッジ獲得: 初めての一歩 🍶"
- All badge unlock conditions (first_step, regional, collector, flavor) now work correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 08:22:23 +09:00
Ponshu Developer b600579123 feat: Redesign Lite version Pro-lock UX with crown badge and dialog
## UI/UX Improvements (User Feedback Implementation)
- Add crown badge to Pro-locked tab icons (Instagram, Analytics, Scan)
- Replace full-screen ProLockedScreen with compact AlertDialog
- Prevent tab navigation to locked features (show dialog instead)
- Follows industry standards (Spotify, Notion, Canva pattern)

## User Experience Benefits
1. Clear visual indicator (crown badge) BEFORE tapping
2. Lightweight dialog instead of full-screen transition
3. No page navigation = smoother, less frustrating experience
4. Reduced "disappointment factor" through expectation management

## Technical Changes
- Added `_IconWithCrownBadge` widget for tab icons
- Added `_showProOnlyDialog()` method for Pro-only feature alerts
- Modified `onDestinationSelected` to intercept locked tab taps
- Simplified screens list (locked tabs show HomeScreen dummy)

## Build Optimization
- Release APK size: 47.1MB (Lite) / 47.2MB (Pro)
- Both versions optimized with tree-shaking and R8
- Single architecture (arm64) for optimal size

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 08:00:15 +09:00
Ponshu Developer 494dafe3f2 debug: Add debug logging for Google Drive upload issues
Added debug logging to:
1. main.dart - Log IS_PRO_VERSION value at startup
2. main_screen.dart - Log IS_PRO_VERSION and isBusiness in screen build
3. pdf_preview_screen.dart - Log PDF Drive upload process with file ID verification

This will help diagnose why Google Drive uploads appear to succeed but files
are not visible in Drive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 01:00:37 +09:00
Ponshu Developer a1b25bf3a7 fix: Add missing detail fields to HiddenSpecs initialization
Fixed bug where AI analysis detail fields (type, alcoholContent, polishingRatio,
sakeMeterValue, riceVariety, yeast, manufacturingYearMonth) were not being saved
to HiddenSpecs, causing them to display as "-" in the UI.

Root cause: camera_screen.dart was only passing 3 fields (description, tasteStats,
flavorTags) to HiddenSpecs constructor, missing 7 detail fields that Gemini API
was successfully returning.

Verified: All detail fields now display correctly after AI analysis.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 00:06:48 +09:00
Ponshu Developer f063ef6ec5 feat: Add Pro version lock mechanism for Lite version preparation
Phase 4.1完了: Pro版機能ロック機構の実装

変更内容:
- lib/widgets/pro_locked_screen.dart: 新規作成
  - 和モダンな王冠アイコン付きロック画面
  - Pro版限定機能を分かりやすく表示
  - 日英両対応

- lib/main.dart: IS_PRO_VERSION ビルドフラグ追加
  - bool.fromEnvironment('IS_PRO_VERSION', defaultValue: true)
  - Pro版/Lite版をビルド時に切り替え可能に

- lib/screens/main_screen.dart: 条件分岐ロジック追加
  - パーソナルモード: QRスキャン → Lite版ではロック画面
  - ビジネスモード: Instagram・分析 → Lite版ではロック画面
  - タブ表示は維持、タップ時にロック画面を表示

ビルドコマンド:
- Pro版: flutter build apk --release --dart-define=IS_PRO_VERSION=true
- Lite版: flutter build apk --release --dart-define=IS_PRO_VERSION=false

次ステップ:
- lite-versionブランチ作成
- QR依存関係削除(pubspec.yaml)
- パッケージ名・アプリ名変更

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 17:34:39 +09:00
Ponshu Developer 21833e4e75 feat: Code quality improvements (v1.0-full-with-qr)
 Improvements:
- Replace print() with debugPrint() (7 instances)
- Migrate withOpacity to withValues (9 instances)
- Remove unused imports (2 files)
- Fix BuildContext async gaps with mounted checks
- Remove unused local variables

📊 Analysis Results:
- Flutter analyzer: 57 → 46 issues (-11)
- Security audit: Passed 
- Code quality: Production ready 

🎯 Purpose:
Complete snapshot before QR feature removal.
This is the last version with full QR functionality.

🤖 Generated with Claude Code & Antigravity

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 00:54:22 +09:00
Ponshu Developer 6507ab9596 feat: enhance AI spec extraction 2026-01-16 00:53:44 +09:00
Ponshu Developer 94af953ac3 UI Polish: Dialogs for Backup/Account, Font Alignment, Hide Future Features 2026-01-13 19:00:16 +09:00
Ponshu Developer 9d19689dbd Fix build errors: imports and provider type 2026-01-13 18:36:31 +09:00
Ponshu Developer fbeefd9456 feat(ui): Implement Developer Menu & A/B Testing (Grid/FAB) 2026-01-13 18:33:47 +09:00