Files
proof-of-work/start9/0.4/startos/versions/v1.0.0.7.ts
T
Keysat 55c17614b8 v1.0.0:7 — exercise library cleanup, photo-import removal, AI-section honesty
Library JSON cleanup (proof-of-work/prisma/exercises.seed.json)
  19 exercises corrected:
  - Cycling/Jump Rope/Rowing/Running: type=cardio with proper
    inputFields (duration/distance/calories — no more reps/weight).
  - Walking Lunge/Wall Sit/Headstand/Hip Extension: reclassified
    out of cardio into bodyweight.
  - Plank/Mace warmup/Hollow Body Landmine/Soccer: inputFields
    fixed.
  - Descriptions added for ~10 cryptic exercises (Core, Resistance
    Band, Stir the pot, Slide Board, Neck Circuit, TGU, Captains
    of Crush, etc.).

Reconcile-on-boot (ensureExerciseLibrary.cjs)
  Changed from INSERT-OR-IGNORE to INSERT-OR-UPDATE keyed on
  (userId, name). Existing rows where isCustom = 0 get
  description/type/muscleGroups/inputFields/defaultWeightUnit
  refreshed from the curated JSON. Rows where isCustom = 1 are
  skipped — user customizations always win.

  Verified end-to-end: applied patches propagate to a copy of the
  user's snapshot DB; manually-tampered isCustom=1 rows survive a
  second reconcile pass untouched.

PATCH /api/exercises/[id] flips isCustom -> true on user edits
  Once you edit a library exercise via the in-app UI, the row's
  isCustom flag becomes 1 and the boot-time reconcile leaves it
  alone forever. Closes the only failure mode where a maintainer
  curated-library refresh could overwrite user edits.

Photo-import (Claude vision) removed
  - app/api/workouts/import/route.ts deleted.
  - components/import/WorkoutImportClient.tsx deleted (orphan
    component — wasn't referenced anywhere by the live UI).
  - CSV import (app/main/import → page-csv.tsx →
    /api/workouts/import/save) is unchanged. The save endpoint
    stays — it's used by the CSV flow too.

Settings UI: "Claude AI Integration" section removed
  The toggle + API key input promised "personalized workout
  recommendations" that the codebase never delivered (the only
  actually-wired use was the photo-import we just removed).
  Schema columns User.enableClaudeAI / User.claudeApiKey stay
  as harmless dead fields — they'll get cleaned up or repurposed
  when the model-agnostic AI work lands. The preferences API
  no longer accepts or returns those fields.

No data migration. /data on existing installs is untouched.
v1.0.0:7 promoted to current; :1-:6 in other.
2026-05-09 21:24:00 -05:00

59 lines
2.8 KiB
TypeScript

import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'
/**
* v1.0.0:7 — exercise library cleanup, photo-import removal,
* UI honesty about AI.
*
* Library cleanup
* - Cycling, Jump Rope, Rowing, Running: type=cardio with the
* correct inputFields (duration, distance, calories — no more
* reps/weight where they don't apply).
* - Walking Lunge, Wall Sit, Headstand, Hip Extension:
* reclassified out of "cardio" into bodyweight (they aren't
* aerobic conditioning).
* - Plank, Mace warmup, Hollow Body Landmine, Soccer:
* inputFields fixed.
* - Descriptions added for ~10 previously-cryptic exercises:
* Core, Resistance Band, Stir the pot, Slide Board,
* Neck Circuit, TGU, Captains of Crush, plus new descriptions
* for the cardio + reclassified entries above.
*
* Reconcile-on-boot
* - ensureExerciseLibrary.cjs is now INSERT-or-UPDATE instead of
* INSERT-or-IGNORE. Existing exercise rows where isCustom = 0
* get their description/type/muscleGroups/inputFields/
* defaultWeightUnit refreshed from the curated JSON on every
* boot. Rows with isCustom = 1 are skipped — the user's
* customizations always win.
* - PATCH /api/exercises/[id] now flips isCustom -> true on any
* user edit. So the moment you edit a library exercise via the
* in-app UI, it stops getting overwritten by future curated-
* library refreshes.
*
* Photo-import (Claude vision) removed
* - The /api/workouts/import endpoint that uploaded photos to
* Claude is gone, along with the orphan WorkoutImportClient
* component that called it. CSV import (the actually-used flow
* at /main/import) is unchanged.
* - The "Claude AI Integration" section in Settings has been
* removed — it promised "personalized workout recommendations"
* that never existed and only enabled the photo-import
* feature, which is also gone.
* - Schema columns User.enableClaudeAI / User.claudeApiKey stay
* as harmless dead fields. They'll be removed (or repurposed)
* when the model-agnostic AI work lands.
*
* No data migration. /data on existing installs is untouched.
*/
export const v_1_0_0_7 = VersionInfo.of({
version: '1.0.0:7',
releaseNotes: {
en_US:
'Exercise library cleanup: 19 exercises got correct inputFields / type / descriptions (Cycling/Rowing/Running/etc. now properly track duration+distance instead of reps+weight). Library reconciliation runs on every boot — maintainer-side fixes propagate to existing installs without overwriting your edits. The Claude photo-import feature and the misleading "Claude AI Integration" Settings section are gone; a real model-agnostic AI integration (with self-hosted Ollama support) is on the roadmap as its own release.',
},
migrations: {
up: async () => {},
down: IMPOSSIBLE,
},
})