Commit graph

19 commits

Author SHA1 Message Date
Daniel
dd70da8c71 Add Capacitor Health Connect sync
All checks were successful
Android CI / build (push) Successful in 2m6s
Web CI / test (push) Successful in 1m14s
Android Release / release-apk (push) Successful in 1m52s
2026-05-25 16:31:51 +02:00
Daniel
38d9f50c31 Fix Calorie AI release publishing
All checks were successful
Android CI / build (push) Successful in 2m19s
Web CI / test (push) Successful in 1m12s
Android Release / release-apk (push) Successful in 1m45s
2026-05-25 04:11:00 +02:00
Daniel
ef6b3a494c Use Node 22 in Calorie AI workflows
Some checks failed
Android CI / build (push) Successful in 2m26s
Web CI / test (push) Successful in 1m14s
Android Release / release-apk (push) Failing after 1m36s
2026-05-25 04:03:47 +02:00
Daniel
176a9fc3bb Make calorie logging reliable
Some checks failed
Android CI / build (push) Successful in 3m0s
Web CI / test (push) Successful in 1m31s
Android Release / release-apk (push) Failing after 45s
2026-05-25 03:55:59 +02:00
Daniel
33d50258ce Improve plan UX and split web UI components
Some checks failed
Android CI / build (push) Successful in 1m52s
Web CI / test (push) Successful in 54s
Android Release / release-apk (push) Failing after 21s
2026-05-21 03:40:47 +02:00
Daniel
f73b58a158 Add Health Connect activity sync
Some checks failed
Android CI / build (push) Successful in 1m43s
Web CI / test (push) Successful in 58s
Android Release / release-apk (push) Failing after 22s
2026-05-21 01:31:15 +02:00
Daniel
fcef0d48db Add personalized plans with Postgres storage
Some checks failed
Android CI / build (push) Successful in 1m34s
Web CI / test (push) Successful in 58s
Android Release / release-apk (push) Failing after 22s
2026-05-20 23:43:03 +02:00
Daniel
f14b433085 Replace Kotlin app with Capacitor WebView wrapper
Some checks failed
Android CI / build (push) Successful in 1m33s
Web CI / test (push) Failing after 1m23s
Android Release / release-apk (push) Failing after 22s
The native Kotlin/Compose app is replaced by a Capacitor shell that
loads the existing Svelte web app from the self-hosted server URL,
set via APP_SERVER_URL secret at build time.

- web/capacitor.config.ts: appId com.danvics.calorieai, reads
  APP_SERVER_URL env var so the WebView points at the live server
- web/android/: Capacitor-generated Android project (gradlew included)
- AndroidManifest.xml: added CAMERA, READ_MEDIA_IMAGES, READ_EXTERNAL_STORAGE
- MealForm.svelte: split file input into Camera (capture=environment)
  and Gallery buttons so both options are accessible natively
- release.yml: npm ci → npm run build → cap sync → gradlew assembleDebug;
  removed manual Gradle installation, uses bundled gradlew instead
- package.json: Capacitor packages as devDependencies (not shipped in
  the Docker server image)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 18:14:53 +02:00
Daniel
8da55652e0 Keep plan title consistent across versions
All generated and tuned plans now share the title "Weight-loss plan"
with version number tracked separately, matching the PlansPage display
which already shows "Version N" beneath the title.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 17:05:18 +02:00
Daniel
40e65ca70c Add diet history context to AI meal analysis on both platforms
- Web: buildTodayHistory() computes today's logged meals and passes them
  to requestMealEstimate so the AI can give personalized notes
- Web: system prompt updated to instruct AI to use notes field for
  dietary observations (macro balance, variety, goal progress)
- Android: same diet history + notes guidance already applied to MainActivity
- Tests: fix NutritionParserTest to use exact key names (proteinGrams,
  carbsGrams, fatGrams) matching the standardised AI prompt format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:12:25 +02:00
Daniel
a4e44201a2 Fix AI nutrition extraction: robust parser + better prompt
- NutritionParser now handles short key aliases (protein/carbs/fat instead of
  proteinGrams/carbsGrams/fatGrams), string-typed numbers, surrounding prose,
  and multi-line markdown fences reliably
- safeInt/safeDouble helpers check multiple key names in priority order and
  handle Number, String, and missing values without throwing
- Nutrition prompt now includes an explicit JSON example so all models return
  the expected format regardless of their default style
- Same fixes applied to web app parseEstimate (aliases + fence stripping)
- Extended NutritionParserTest to cover aliases, string numbers, surrounding text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:39:33 +02:00
Daniel
709d6c1f6f Fix Playwright tests: add h1 heading role to app header, remove duplicate Plans h2
All checks were successful
Android CI / build (push) Successful in 1m44s
Web CI / test (push) Successful in 46s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 05:56:15 +02:00
Daniel
9f660d50bc Refactor Android app to production grade with improved UI and sync
Some checks failed
Android CI / build (push) Successful in 1m16s
Web CI / test (push) Failing after 1m46s
Android Release / release-apk (push) Successful in 1m16s
Android:
- Add adaptive app icon (blue background, white flame foreground)
- Add android:icon and roundIcon references to manifest
- Add windowSoftInputMode=adjustResize for keyboard handling
- Dark mode support via isSystemInDarkTheme() in Theme.kt
- Bump versionCode 1→2, versionName 1.0→1.1, named APK output
- Merge Trash into Diary as a tab (was a 6th bottom-nav item)
- Add sync refresh button in top bar with loading indicator
- Add CalorieGoalBar progress indicator on dashboard
- Add calorieTarget to ServerSettings, Settings screen, and API
- Add clearTrash() to ApiRepository (server route was unused)
- Fix onCancelEdit to also clear selected image state
- AiClient.kt: remove old pre-server AiClient class (replaced by ApiRepository)
- LogMealScreen: side-by-side field rows, DropdownField for meal type

Web server:
- Add calorieTarget to settings defaults and allowed field list
- Remove dead handleRequest() function (never called, Express routes it)

CI:
- Fix APK paths in android.yml and release.yml for renamed output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 05:32:01 +02:00
Daniel
f42e8c8784 Add release APK workflow and server plans
All checks were successful
Android CI / build (push) Successful in 1m10s
Web CI / test (push) Successful in 51s
Android Release / release-apk (push) Successful in 1m5s
2026-05-20 03:27:25 +02:00
Daniel
5fa4b59335 Update web plans and app capture
All checks were successful
Android CI / build (push) Successful in 1m12s
Web CI / test (push) Successful in 49s
2026-05-20 00:48:52 +02:00
Daniel
2e2ba12cf3 Update web model management and meal diary
All checks were successful
Android CI / build (push) Successful in 1m6s
Web CI / test (push) Successful in 50s
2026-05-19 19:47:30 +02:00
Daniel
5837b1c8dc Revamp web app with Svelte and Tailwind
All checks were successful
Android CI / build (push) Successful in 28s
Web CI / test (push) Successful in 48s
2026-05-19 18:53:03 +02:00
Daniel
f57c04c989 Add web auth and app navigation
All checks were successful
Android CI / build (push) Successful in 31s
Web CI / test (push) Successful in 46s
2026-05-19 17:59:02 +02:00
Daniel
71c8837b48 Add web calorie tracker and analytics 2026-05-19 17:13:41 +02:00