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.
This commit is contained in:
Keysat
2026-05-09 21:24:00 -05:00
parent ffa8e0d480
commit 55c17614b8
11 changed files with 189 additions and 1427 deletions
+7 -7
View File
@@ -5,6 +5,7 @@ import { v_1_0_0_3 } from './v1.0.0.3'
import { v_1_0_0_4 } from './v1.0.0.4'
import { v_1_0_0_5 } from './v1.0.0.5'
import { v_1_0_0_6 } from './v1.0.0.6'
import { v_1_0_0_7 } from './v1.0.0.7'
/**
* Version graph for the `proof-of-work` package.
@@ -12,14 +13,13 @@ import { v_1_0_0_6 } from './v1.0.0.6'
* v1.0.0:1 — initial release, seeded cutover from `workout-log`.
* v1.0.0:2 — CSP fix.
* v1.0.0:3 — post-cutover seed strip.
* v1.0.0:4 — removes default admin@local credentials; operator must
* run StartOS Action to bootstrap the first admin.
* v1.0.0:4 — removes default admin@local credentials.
* v1.0.0:5 — internal cleanup (caloriesBurned raw-SQL workaround).
* v1.0.0:6 — paginate workout history (infinite scroll); removes
* invisible 50-row caps on the clock-button popup and
* the /main/workouts page.
* v1.0.0:6 — paginate workout history (infinite scroll).
* v1.0.0:7 — exercise library cleanup, photo-import removal,
* UI honesty about AI.
*/
export const versionGraph = VersionGraph.of({
current: v_1_0_0_6,
other: [v_1_0_0_1, v_1_0_0_2, v_1_0_0_3, v_1_0_0_4, v_1_0_0_5],
current: v_1_0_0_7,
other: [v_1_0_0_1, v_1_0_0_2, v_1_0_0_3, v_1_0_0_4, v_1_0_0_5, v_1_0_0_6],
})
+58
View File
@@ -0,0 +1,58 @@
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,
},
})