Skip to content

v1.5.0-dev04

Pre-release
Pre-release

Choose a tag to compare

@thebigjoe1 thebigjoe1 released this 07 Nov 12:27
· 2 commits to main since this release

Fourth dev pre-release of the 1.5.0 minor

Two-step sign-in, Garmin with your own Personal API Key, HRV from Health Connect, MCP search and logging from Open Food Facts and USDA, Show Card Again in Trace, calories for newer USDA foods, Node 24, sign-in security fixes and a large round of sync fixes.

Heads-up before installing:

  • Running from source instead of Docker? You now need Node 24, plus Python 3, make and a C++ compiler for the server's npm install. The Docker image needs nothing from you.
  • Changing your password, or turning two-step sign-in on or off, now signs out your other browsers and phones. API and MCP tokens keep working.
  • If you turned Health Connect on before this update, Settings > Wellness > Health Connect shows an Allow button for HRV. Syncing keeps working if you leave it off.
  • Foods you already saved from USDA at 0 kcal stay that way until you open each in Foods, tap Refresh from USDA, then Save.
  • Garmin's Personal API Key connector needs testers. If you have a Garmin, please try it and say how it went in #279.
  • Update the Android app along with the server: single sign-on from older builds still works, but the server log notes each one and OIDC_APP_LINK_TOKEN=off refuses them.

Added

  • Two-step sign-in (#222). Settings > Profile > Two-Step Sign-In asks for a code from an authenticator app after your password, with ten one-time recovery codes, in the browser and the Android app. Admins can require it for everyone and reset it for someone in Settings > Users; the server's owner can reset one account with RECOVERY_TOKEN under Locked Out?, or with docker exec nutritrace npm run reset-2fa -- <username>. Single sign-on, API tokens and saved sign-ins are unchanged. Guide Thanks @fatman00.
  • Garmin with a Personal API Key (#279). Settings > Wellness > Garmin connects with a free Personal API Key from Garmin Connect, no partner approval needed. It brings in steps, distance, floors, calories, intensity minutes, heart rate, stress, Body Battery, SpO2, sleep, overnight HRV and Garmin scale readings, starting with the last 30 days. Each person adds their own key, stored encrypted and left out of backups, and you get a notice a week before it expires (once you enter the date Garmin shows) and when Garmin stops accepting it. The Health API partner setup works as before. Guide Thanks @hallowatcher and @fantasilos.
  • MCP: search Open Food Facts and USDA, and log what you find (#314). search_external_foods searches both by name or barcode, with the same results and numbers as the app's food search under your own settings. log_external_food logs a result, using the food you already have for that product or saving it to your foods once, and needs the same write access as log_food. With OFF_LOCAL_ONLY it answers from the local copy only. Guide Thanks @Yipyipyip.
  • Health Connect reads HRV (#279). The Android app reads heart rate variability from Health Connect, so Daily Readiness and Resilience work with Health Connect as your only source, when your watch's app writes HRV there (not every app does). A day's HRV is the average over the night you woke up from, past days are filled in too (Readiness needs 3 nights), and today's scores update with each sync. Guide Thanks @hallowatcher.

Fixed

  • Newer USDA Foundation foods have their calories. Many give their energy only as Atwater figures, which weren't read, so they showed and saved 0 kcal, often at the top of the USDA results. Food search, Refresh from USDA and log_external_food now read them. A food already saved at 0 kcal stays as it is until you open it in Foods, tap Refresh from USDA, then Save; diary entries, meals and recipes keep their old values.
  • Turning on Health Connect asks for every data type at once, heart rate and workouts included. Heart rate and workouts were never asked for, so they read nothing unless you allowed them in Health Connect yourself. A day without heart rate readings now shows no average instead of 0 bpm.
  • Trace's review cards can be brought back (#309). Asking Trace for a card you had already discarded, saved or added showed nothing, and some models then said it was there. That reply now has a Show Card Again button. Thanks @jsapede.
  • A backup restore brings back everything it holds, and phones show what was restored. Backups now hold items deleted from a day, when each note and completion mark changed, and webhooks, so a phone can no longer put back or undo what the restore set. Phones take the restored days, settings, workouts and coach messages and drop what the backup doesn't hold. On a server with another TOKEN_ENC_KEY (or JWT_SECRET), a restored webhook's deliveries fail until you make it again.
  • Locked Out? says what Disable User Management deletes. It said your food and diary data would be kept, but it deletes every account and everything saved in them.
  • Sync keeps the newer edit of each field, not of the whole row. A change made offline in the Android app or the browser could undo a newer change to a different field of the same food, meal, recipe, activity, fast or day's measurements. Now each field keeps its newest edit, fields that belong together (a food's nutrients and serving size) stay together, and saving a form sends only what you changed. Offline changes keep the time you made them, also across this update, and an activity or fast changed during a sync is no longer written over. Android apps from before this update still sync as before. How sync works
  • A change made after a delete elsewhere is no longer lost. A food, meal, recipe, activity, fast or diary day deleted on one device and changed afterwards on another (in the Android app during a sync, or saved on the web) now comes back with the change; an edit made before the delete still goes with it. Save a Copy makes a new copy after you deleted yours, and saving a meal or recipe from a source such as CookTrace again after deleting it no longer fails.
  • A deleted diary day stays deleted unless something new was logged to it. A day deleted on the web came back whole when a phone (or the browser, offline) sent an older copy, and logging into it brought back everything deleted with it. Now it comes back only with what was logged or changed after the delete. A row sent to POST /api/sync/push with no readable time leaves a deleted setting deleted, and an out-of-range time no longer fails the whole push.
  • Linking a recipe's new ingredient in the Android app no longer undoes a delete or edit made on the web. Filling in the link counted as a change made right then, so it could bring back a recipe deleted on the web or put back its older ingredients. The link now keeps the recipe's own time.
  • The Android app's open pages and editors show what a sync changed. Foods, the Diary's activity, fast and week strip, Statistics and Goals read again after a sync, and the adaptive and dynamic calorie goals follow it. An open editor fills in the fields you haven't touched and keeps what you typed; an item deleted elsewhere says so and Save is off. Clients, coach and users read again when you come back to the app.
  • Clear All Settings on the web resets the Android app too. Each setting goes back to its default at the next sync, on screen too.
  • Completion marks sync both ways (#207). Close Today on the bedtime notification marked the day only on the phone, and the next sync took it away; it now reaches the server, offline too. A newer unmark is no longer undone by an older mark sent to /api/sync/push.
  • The connection banner in Settings follows your language. Connected, Not connected, Test and Testing were always in English.
  • Settings > AI Assistant fits a phone screen. The Model label no longer breaks onto two lines, and Custom Model ID sits above its field like Base URL and API Key.

Security

  • Changing your password signs out your other devices (#222). A password change (in Profile, by a reset link or by an admin), and turning two-step sign-in on, off or resetting it, signs out every other browser and phone; Settings > Profile also has a new Sign Out Everywhere. Before, a copied or stolen sign-in kept working for up to a year. A changed role holds at once too. API and MCP tokens are separate and keep working.
  • Linking a sign-in provider asks for your password first. Profile > Linked Accounts > Link asks for your password, and your two-step code when that's on, checked by the server, so someone holding your signed-in session can no longer link their own single sign-on account to yours. An account that only uses single sign-on can link within 15 minutes of signing in. A changed email needs confirming with your password before single sign-on links by it or a password reset goes to it.
  • Creating an API token asks for your password, and your two-step code when that's on. New tokens get an expiry: 30 days, 90 days (the default), 1 year or No Expiry. Tokens you already have keep working.
  • Older Android apps' single sign-on is logged, and can be turned off. The Android app now gets its sign-in only by swapping a one-time code, and refuses a sign-in link it didn't ask for. Builds from before that still get theirs in the link back to the app, which another app could catch: the server log says so each time, and OIDC_APP_LINK_TOKEN=off refuses them.
  • The Docker image runs on Node 24 (#302). Node 20 is past end of life and misses the October 2026 Node security release (CVE-2026-111497 in the Brotli decoder, plus TLS hostname check bypasses). The image builds on Node 24 LTS (24.22.1 or later) with better-sqlite3 13. Running from source, you need Node 24 plus Python 3, make and a C++ compiler. Thanks @mahfuz-rahman007.
  • Server dependencies updated for security fixes: body-parser 2.4.0 (GHSA-27r3-jxmh-p828), multer 2.5.0 (GHSA-q7qp-rjg7-q26m), undici 6.29.1 (GHSA-2m5v-pch6-74hx, GHSA-qrxm-fqhp-jwvm, GHSA-xjj6-f33q-929c, GHSA-4qv8-2p9j-2685, GHSA-9fm3-97px-rjf6) and zod 4.6.7 (GHSA-mrhx-c7xc-m3w5), each with a high-severity advisory, plus @hono/node-server 2.1.6 (GHSA-rmxm-3fg6-px4f), fast-uri 3.1.9 (GHSA-w74x-v6f9-j3xg, GHSA-wjr9-j795-jxcr, GHSA-xhq7-xmqj-769h, GHSA-333x-w4r6-6crp), ip-address 10.7.6 (GHSA-rxp7-6hxx-x8q5), nodemailer 10.3.1 (GHSA-8c8m-p3m8-cjg8, GHSA-m943-m63m-w62w, GHSA-85x2-q946-cp5h, GHSA-4ffr-jq9g-5ffx, GHSA-g73g-hqqh-jr95) and qs 6.17.1 (GHSA-6pq8-jhm2-2vcw), moderate or low. Half are ways a crafted request or a reply from another server could slow down or stop the server. The nodemailer fixes stop an oddly written email address from sending mail to an address it doesn't name. undici's certificate check bypass and hono's serveStatic fix don't reach NutriTrace, which sets no custom certificate check and doesn't use serveStatic. The web app's build tools get fast-uri 3.1.9, rimraf 6.1.4 and serialize-javascript 7.1.4 (GHSA-m5mm-p8h7-m29v). npm audit reports 0 vulnerabilities for the server. The app keeps deepmerge (low, through svelte-i18n, no fixed version yet) and the glob and minimatch inside workbox (moderate, build tools only, waiting on a workbox update).

Verify the download. nutritrace-v1.5.0-dev04.apk: SHA-256 d650f02a88781f9594f19c446977d068057def417692b4ca4cbaeb28ac729fee, VirusTotal report.

NutriTrace is free and always will be. Support on Ko-fi goes toward a Mac and an iPhone so my apps can come to Apple devices, and GitHub Sponsors helps with the monthly costs.