Commit graph

33 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
03d4178113 Bump to v1.3
All checks were successful
Android CI / build (push) Successful in 1m40s
Web CI / test (push) Successful in 52s
Android Release / release-apk (push) Successful in 1m40s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:39:49 +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
b93e479be4 Fix camera, add photo preview, native date/time pickers, auto-navigate dashboard after save
- Replace TakePicturePreview with TakePicture + FileProvider for reliable full-res camera capture
- Add FileProvider to manifest with cache-path for camera photos
- Show selected photo as a thumbnail preview in the Log screen
- Replace plain date/time text fields with clickable fields that open native Android pickers
- After AI analysis or manual edit save, auto-navigate to Dashboard so results are visible immediately
- Clear editing/image state after successful save so Log screen resets for next entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:18:26 +02:00
Daniel
af35b70399 Fix image picker crash, add 7-day bar chart, bump to v1.2
All checks were successful
Android CI / build (push) Successful in 1m58s
Web CI / test (push) Successful in 49s
Android Release / release-apk (push) Successful in 1m35s
- Image reading moved to IO thread with runCatching to prevent main thread crash and OOM on large gallery images
- 7-day calorie bar chart added to dashboard using Canvas
- Version bumped to 1.2 (code 3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 06:10:54 +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
99bd1bff42 Fix UX issues across all screens
Some checks failed
Android CI / build (push) Successful in 1m59s
Web CI / test (push) Failing after 1m6s
ConnectScreen:
- Keyboard types: Uri for URL, Password for password
- IME chain: Next→Next→Done across all three fields
- Pressing Done on password submits the form
- Password visibility toggle (show/hide button)

PlansScreen:
- Delete plan now requires confirmation dialog
- Plan content bumped to bodyMedium (was too small)
- Plan history uses Card with primaryContainer highlight for active plan
- "Active" badge on selected plan instead of just bold text

SettingsScreen:
- "Profile saved" status auto-clears after 3 seconds

CalorieAiApp:
- Top bar title shows "Edit meal" when editing an existing entry

DiaryScreen:
- "Deselect" button next to "Trash" when items are selected

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 05:44:34 +02:00
Daniel
19d8899057 Replace two-button image picker with bottom sheet chooser
Some checks failed
Android CI / build (push) Successful in 1m42s
Web CI / test (push) Has been cancelled
Single "Add photo" button opens a ModalBottomSheet with camera
and gallery options, matching standard mobile UX patterns.
Switches to material-icons-extended for CameraAlt/PhotoLibrary icons.
Button label changes to "Change photo" once an image is selected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 05:42:37 +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
87102dbc5b Rewrite Android app with Kotlin Compose
All checks were successful
Android CI / build (push) Successful in 1m13s
Web CI / test (push) Successful in 51s
2026-05-19 19:35:15 +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
Daniel
3e4e7aa524 Ignore generated APK release files
All checks were successful
Android CI / build (push) Successful in 29s
Android Release / release-apk (push) Successful in 29s
2026-05-17 19:12:51 +02:00
Daniel
344d21bd4a Add Android release APK workflow 2026-05-17 19:11:37 +02:00
Daniel
4dac08fffe Use Forgejo-compatible artifact upload
All checks were successful
Android CI / build (push) Successful in 36s
2026-05-17 17:57:44 +02:00
Daniel
93ae39a7df Use shell checkout in Android CI
Some checks failed
Android CI / build (push) Failing after 30s
2026-05-17 17:55:46 +02:00
Daniel
f3863384fd Use Android SDK runner image for CI
Some checks failed
Android CI / build (push) Failing after 2s
2026-05-17 17:53:56 +02:00
Daniel
fd089c1e22 Use local Forgejo runner for Android CI
Some checks failed
Android CI / build (push) Failing after 28s
2026-05-17 17:46:51 +02:00
Daniel
521dfada28 Remove unused Gradle wrapper artifact
Some checks are pending
Android CI / build (push) Waiting to run
2026-05-17 17:43:49 +02:00
Daniel
5cdc1c1142 Add Calorie AI Android app 2026-05-17 17:43:16 +02:00