Commit graph

9 commits

Author SHA1 Message Date
80fc48b9f1 Add barcode and nutrition label scanning
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 1m2s
Barcode scanning
- Scan barcode in the food sheet reads UPC-A/E and EAN-13/8 live from
  the camera with ZXing WebAssembly (bundled, precached, CSP allows
  wasm), with photo and typed-digit fallbacks
- Lookups check saved foods first (offline), then local copies of USDA
  FoodData Central Branded Foods and Open Food Facts, then the live
  Open Food Facts API; API answers and misses are cached
- Server imports refresh in a low-priority child process: USDA when a
  new archive is published, Open Food Facts weekly by streaming its CSV
  export; each import builds a new table and swaps it in atomically
- Every available nutrient is kept: foods and entries gain optional
  barcode (GTIN-14) and extra nutrients, shown under More nutrients and
  included in JSON exports
- Settings shows the size, date and any error for each product copy

Label scanning
- Scan label sends a downscaled photo to the server, read with
  PaddleOCR PP-OCRv5 (server detection, English recognition) on ONNX
  Runtime CPU, about 1.3 s median
- Parser handles US/Canadian, linear, Spanish and EU per-100 g panels,
  tilted photos, OCR misspellings and %DV cross-checks
- Models are pinned and checksum-verified at image build time

Container
- Runtime moves to Debian slim for ONNX Runtime's glibc build; other
  platforms' binaries are pruned
- Smoke tests now read a fixture label inside the container
- README and Unraid docs cover disk use, network access and refresh

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 13:41:44 -07:00
8f6981c8a2 Apply app updates automatically and survive proxy caching
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 29s
- Check for a new service worker on every return to the foreground and
  every 30 minutes; apply it in the background or just after launch,
  never with unsynced edits or an open sheet. The Update prompt remains.
- Register the worker at extension-less /sw (no-cache), so proxies that
  cache *.js regardless of headers cannot hide updates
- Return 404 for missing files instead of the HTML shell
- Tests for the static routes; smoke test covers /sw; document the Nginx
  Proxy Manager "Cache Assets" pitfall

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 11:19:30 -07:00
bb0bc430aa Smooth phone page swipes
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 28s
- Keep the page rail on its own compositor layer for the whole session
  instead of promoting it at every drag start
- Write the drag transform directly in touchmove rather than a later rAF
- Carry the release velocity into the settle animation (160-340ms) so
  flicks neither brake nor lurch; covered by a unit test
- Render the page change as a transition so it cannot delay the settle
- Pause bubble physics and canvas drawing while the pager is moving

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 11:06:22 -07:00
c3b9376508 Native-feel polish: autosaving settings, stacked sheets, desktop type scale
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 28s
- Settings apply as they change; theme/accent preview instantly and a
  background sync no longer discards in-progress edits
- Food journal stays open beneath edit/add/delete sheets
- Toasts render in the top layer above open sheets, with an error tone
- Follow the new day when the PWA resumes after midnight
- Add-food sheet: day/time row, one-tap meal picker, blank nutrient fields
- Library cards gain a Log action; compact rows on phones
- Desktop type scale raised from 7-12px to 10-15px (desktop.css)
- Hover styles limited to hover-capable devices; touch press dimming and
  no text selection on app chrome
- Sheets slide opaque on the UIKit curve; drag-to-dismiss tracks 1:1,
  supports flicks and departs from the dragged position
- Removed calorie bubbles fade out; no progress dot at 0 kcal
- Friendly network/proxy error messages; fresh outbox check before update

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:57:36 -07:00
3c0d6560f1 Fix live swipe paging and retain tilt preference on iOS
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 29s
Replace the damped single-screen fade with live mobile panels on a shared composited rail, preserving per-tab scrolling and pausing offscreen physics. Center macro text and separate the saved tilt switch from session motion permission, resuming permission from a normal interaction. Validate live previews, interruption and multi-touch cancellation, relaunch, and permission races.
2026-10-22 10:11:55 -07:00
7288e56c02 Polish PWA gestures, transitions and nutrition averages
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 32s
2026-10-22 09:16:52 -07:00
b19de6f9ea Mobile UI redesign and size fixes
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 28s
2026-10-20 20:16:25 -07:00
ddea7fc512 Extensive UI changes
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 28s
2026-10-20 19:46:08 -07:00
6fc0a01c56 first commit
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 1m4s
2026-10-20 19:04:12 -07:00