From d8c734a2b6fe7ab95a4fa8633dca21dc7624cce8 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Tue, 11 Aug 2026 22:30:04 +0200 Subject: [PATCH] muscle overlay: route the exercise detail tags through smOf too #67 stopped mutating EXDB and moved the secondary-muscle additions into a derived smOf() overlay, but ExerciseDetail still read the raw ex.sm. The four curated row additions (0027, 0293, 0499, 0861) were silently dropped from the detail sheet's tag row -- "rear deltoids" was the third visible tag on all four, so the slice(0,3) did not hide it. Caught on merge, before it shipped. --- frontend/src/sheets.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx index 180faa1..14d2720 100644 --- a/frontend/src/sheets.jsx +++ b/frontend/src/sheets.jsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from 'react' import { useStore } from './store/useStore.js' import { useUI } from './store/useUI.js' -import { EXDB, EXIDX, BODYPARTS, isCardio, isBodyweightEq, allExercises, equipmentOf } from './lib/exercises.js' +import { EXDB, EXIDX, BODYPARTS, isCardio, isBodyweightEq, allExercises, equipmentOf, smOf } from './lib/exercises.js' import { fmtDate, fmtNum, fmtVol, fmtDur, durPart, todayISO, uid, exCount, DAYN, MONTHS_LONG, ACCENTS } from './lib/format.js' import { lastEntryFor, bestWeightFor, buildSets, effectiveRoutineId, workoutVolume, setsDone, setsDoneActive, lastBW, supersetUnits, unitOf, setLabel, defaultConfig, cleanupSg, modeOf, effortOf, isBw, isPerSide, sideReps, workSetsDone } from './lib/history.js' import { beep, vibrate } from './lib/sound.js' @@ -291,7 +291,7 @@ function ExerciseDetail({ ex, close }) { {t(ex.bp)} {ex.tg && {t(ex.tg)}} {t(ex.eq)} - {(ex.sm || []).slice(0, 3).map((s, i) => {t(s)})} + {smOf(ex).slice(0, 3).map((s, i) => {t(s)})} {ex.desc &&
{ex.desc}
} {best > 0 &&
{t('Best:')} {fmtNum(best)} {st.unit}{last ? ` ยท ${t('last')} ${fmtDate(last.d)}: ${last.sets.map(s => setLabel(ex.id, s, last.target)).join(', ')}` : ''}
}