github Cawlumm/lyftr v0.1.0-beta.8

pre-release4 hours ago

Lyftr speaks Spanish, in the app and in the exercise library, and your server now keeps the whole exercise catalog itself instead of fetching it a search at a time. Plus changing your email, and a handful of fixes.

Breaking changes

Only self-hosters driving the HTTP API directly are affected; the web and mobile apps are updated in step. Full detail for each is in docs/API_CHANGES.md at this tag.

  • POST /api/v1/admin/reset-exercises is gone and answers 404 (#211)
    The server now keeps the whole catalog, so there is nothing to clear. A caller using it to drop unreferenced rows has nothing to call.
  • POST /api/v1/admin/sync-exercises imports the whole catalog, in every language (#205, #211, #216)
    It runs the same pass the server now runs at startup and every 24 hours, so it fills an empty install and takes longer than before. refreshed is the number of exercises the English pass recorded. It answers 409 EXERCISE_SYNC_RUNNING if a pass is already running, and 503 EXERCISE_CATALOG_UNREACHABLE if the catalog cannot be reached. If the catalog lists under half of what the server holds, nothing is removed and it answers 409 EXERCISE_CATALOG_SHRANK; an operator who knows the removal is real confirms it with ?confirm_removals=true.
  • GET /api/v1/exercises no longer lists exercises removed upstream (#214, #215)
    An exercise the catalog stops listing is left out of list and search results, but is never deleted: GET /exercises/:id, workouts, programs and history still return it, and it comes back if the catalog lists it again. /admin/seed-status count still includes hidden rows.
  • POST /api/v1/auth/register treats an address differing only in letter case as a duplicate (#192)
    Carter@example.com beside carter@example.com now answers 409 where it used to create a second account. Sign-in matches case-insensitively too. An install that already holds case-variant accounts keeps both; the boot log names them.
  • A revoked or deleted account's access token answers 401 on its next request (#197)
    Until now it lingered until it expired (an hour by default). Clients already treat 401 as "refresh", and the refresh fails the same check, so they sign out.
  • GET /api/v1/food/search and /food/barcode/:code name products differently if you never send locale (#203)
    English is now preferred over the product's main-language name, so a product whose product_name is Thai and whose English name is "Homogenized Milk" is now named the latter.

What's new

Spanish, everywhere (#199, #201, #204, #203)
The whole UI is translated on web and mobile, with a language picker in Settings (System, English or Español), and exercise names, descriptions, muscles and equipment follow your language. Food names follow it too, where Open Food Facts has one. A string missing in your language falls back to English, field by field.

Your server holds the whole exercise catalog (#205, #211, #213)
At startup and every 24 hours after, the server downloads the full catalog in every language it offers, retrying after 1, 5 and then 30 minutes if it can't be reached. A fresh install fills at boot instead of one search at a time. Settings shows how many exercises are held, when it last synced and whether the last pass failed. Searching still asks the catalog first and falls back to your local copy.

Change your email (#196)
Settings, then Email, on web and mobile. It asks for your current password, ends your other sessions and keeps this device signed in. Thanks to @ansgaross and @headheadknocker-coder for asking.

Error messages carry a stable code (#202)
Every error response is now {"error": "...", "code": "UPPER_SNAKE"}, which is how the apps translate them. error is unchanged and still authoritative if you ignore code.

Translations can be added by pull request (#200)
Lint now fails on a hard-coded UI string, and CONTRIBUTING.md explains how to add a language.

Fixes & improvements

  • Gym Mode's rest timer no longer covers the "Begin exercise" button (#198), reported by @Cabiny6
  • A hung exercise catalog no longer freezes every search for 8 seconds; searches are served locally for a minute after it fails to answer (#220)
  • A manual catalog refresh keeps running if your browser or proxy gives up, instead of being cut off halfway and reported as unreachable (#218)
  • "1 de 1 series completadas" now reads "1 de 1 serie completada", and the mobile cancel-workout button no longer overflows in Spanish (#219)
  • An unreachable catalog is reported as 503, not a bad request (#207)
  • A duplicate upstream exercise name no longer takes over another exercise's row (#208)
  • The picker says "the exercise library is still loading" on an empty install, instead of "no results" (#212)
  • Exercises removed upstream stay hidden after a cached search (#215)
  • The catalog response cache is bounded (#209)

Also worth knowing

  • Spanish exercise names and descriptions are machine-translated. They come from open-exercise-db, so corrections go there. To fix or add a language in the app itself, see Translations.
  • GET /api/v1/admin/seed-status is unchanged for count readers and now also carries syncing, last_synced_at, last_attempt_at, next_attempt_at, last_failed and last_failure (in memory, so null until the boot pass finishes after a restart).
  • Exercise reads accept an optional locale query parameter (es, es-MX); with none, responses are unchanged.

Contributors

@ansgaross (#167), @headheadknocker-coder (#173, #174) for the email change (#196)
@Cabiny6 (#193) for the rest timer fix (#198)

Android (side-load)

Download lyftr-v0.1.0-beta.8.apk below. On your phone, open it and
allow "install from unknown sources" if prompted.

iOS is distributed via TestFlight / the App Store (Apple doesn't allow
side-loading), so it isn't attached here.

What's Changed

  • Treat email addresses as case-insensitive (#119) by @Cawlumm in #192
  • Let a signed-in user change their email address by @Cawlumm in #196
  • End a revoked or deleted account's session on its next request by @Cawlumm in #197
  • Dock the rest timer below the buttons on every Gym Mode screen by @Cawlumm in #198
  • Localize the whole UI: i18next in @lyftr/shared, a language picker, every screen translated by @Cawlumm in #199
  • Fail lint on a new hard-coded UI string (web and mobile) by @Cawlumm in #200
  • Polish the localization: real bugs, Spanish wording, layout, tidier catalog keys by @Cawlumm in #201
  • Give every API error a stable code the apps can translate by @Cawlumm in #202
  • Name Open Food Facts products in the reader's language by @Cawlumm in #203
  • Serve exercise names and descriptions in the reader's language by @Cawlumm in #204
  • Keep the exercise cache filled in every language, on a schedule by @Cawlumm in #205
  • Make the catalog sync read fresh upstream data by @Cawlumm in #206
  • Report an unreachable exercise catalog as 503, not a bad request by @Cawlumm in #207
  • Stop a duplicate upstream name from taking over another exercise's row by @Cawlumm in #208
  • Bound the oedb response cache by @Cawlumm in #209
  • Tidy exercise catalog comments and drop an unused error by @Cawlumm in #210
  • Hold the whole exercise catalog and remove Clear cache by @Cawlumm in #211
  • Tell an empty exercise library apart from a search with no matches by @Cawlumm in #212
  • Show the catalog sync status in Settings by @Cawlumm in #213
  • Hide exercises removed upstream and drop languages oedb no longer offers by @Cawlumm in #214
  • Stop a cached search from un-hiding an exercise removed upstream by @Cawlumm in #215
  • Let an operator confirm a genuine mass removal from the catalog by @Cawlumm in #216
  • Document the exercise catalog sync by @Cawlumm in #217
  • Keep a manual catalog sync alive past its caller and recover sync panics by @Cawlumm in #218
  • Pluralise the sets-done copy and align the mobile cancel button with web by @Cawlumm in #219
  • Stop a hung exercise catalog from freezing every search by @Cawlumm in #220

Full Changelog: v0.1.0-beta.7...v0.1.0-beta.8

Don't miss a new lyftr release

NewReleases is sending notifications on new releases.