Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Empty values read as an en dash

Duarte Santos073f73b06436
diff --git a/frontend/src/lib/coach.js b/frontend/src/lib/coach.js
index 3045f8174..8c5e5265f 100644
--- a/frontend/src/lib/coach.js
+++ b/frontend/src/lib/coach.js
@@ -639,7 +639,7 @@ export function changeValues(c, S) {
const ids = [].concat(v ?? []).filter(x => x && x !== 'rest')
return ids.length ? ids.map(routineName).join(' + ') : t('Rest')
}
- if (v == null) return '—'
+ if (v == null) return '–'
if (typeof v === 'object') return v.id ? exTitle(v.id) : v.name || JSON.stringify(v)
if (Array.isArray(v)) return v.length + ''
return String(v)
diff --git a/frontend/src/lib/empty-placeholder.test.js b/frontend/src/lib/empty-placeholder.test.js
new file mode 100644
index 000000000..2f132de8f
--- /dev/null
+++ b/frontend/src/lib/empty-placeholder.test.js
@@ -0,0 +1,21 @@
+// Owner's call (1.3.10): an empty value reads as an en dash, "–", never the em dash "—", which
+// the app's copy no longer uses anywhere. Stats tiles, the Coach's tiles, the admin counts and a
+// per-side set label's untouched side ("R –") all show one; a new one written as '—' fails here.
+import { describe, expect, it } from 'vitest'
+import { readdirSync, readFileSync, statSync } from 'node:fs'
+import { join } from 'node:path'
+
+const SRC = join(process.cwd(), 'src')
+const files = dir => readdirSync(dir).flatMap(n => {
+ const p = join(dir, n)
+ if (statSync(p).isDirectory()) return ['locales', 'instr', 'exercise-names'].includes(n) ? [] : files(p)
+ return /\.(js|jsx)$/.test(n) && !/\.test\./.test(n) ? [p] : []
+})
+
+describe('empty-value placeholders', () => {
+ it('are an en dash in every source file', () => {
+ const offenders = files(SRC).flatMap(p => readFileSync(p, 'utf8').split('\n')
+ .map((line, i) => (/(['"`])—\1/.test(line) ? `${p.slice(SRC.length + 1)}:${i + 1}` : null)).filter(Boolean))
+ expect(offenders).toEqual([])
+ })
+})
diff --git a/frontend/src/lib/history.js b/frontend/src/lib/history.js
index e71b50ded..5521145c6 100644
--- a/frontend/src/lib/history.js
+++ b/frontend/src/lib/history.js
@@ -160,7 +160,7 @@ export function setLabel(id, s, cfg, speedUnit) {
const partial = s.sides.L.done !== s.sides.R.done
return ['L', 'R'].map(key => {
const side = s.sides[key]
- return `${t(key)} ${partial && !side.done ? '—' : oneSide(side) + effortTail(side)}`
+ return `${t(key)} ${partial && !side.done ? '–' : oneSide(side) + effortTail(side)}`
}).join(' · ')
}
// Bodyweight reads as what you did — "12", or "+10 × 12" once there is a belt involved —
diff --git a/frontend/src/lib/unilateral-integration.test.js b/frontend/src/lib/unilateral-integration.test.js
index 7027f566c..6f75fec3b 100644
--- a/frontend/src/lib/unilateral-integration.test.js
+++ b/frontend/src/lib/unilateral-integration.test.js
@@ -80,7 +80,7 @@ describe('unilateral sets across session boundaries', () => {
expect(setsDone(completed)).toBe(1)
expect(workoutVolume(completed)).toBe(20 * 8 + 16 * 8)
// the drop the volume counts is on the label too (Discord: drop-sets missing from history)
- expect(setLabel('0025', s, entry(s).target)).toBe('L 20×8 ↘ 16×8 · R —')
+ expect(setLabel('0025', s, entry(s).target)).toBe('L 20×8 ↘ 16×8 · R –')
expect(workoutVolume({ entries: [entry({ ...s, phase: 'warmup' })] })).toBe(0)
})
diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx
index 9d21d3737..1b90121c1 100644
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@ -803,7 +803,7 @@ function OneRM({ ex }) {
</div>
<div className="row between" style={{ marginBottom: 4 }}>
<span className="muted small">{t('Estimate')}</span>
- <b className="accent" style={{ fontSize: 20 }}>{est === null ? '—' : fmtNum(est) + ' ' + st.unit}</b>
+ <b className="accent" style={{ fontSize: 20 }}>{est === null ? '–' : fmtNum(est) + ' ' + st.unit}</b>
</div>
<div className="small dim">{est === null
? t('Enter a weight and 1–{0} reps. Beyond that it’s basically guesswork.', REP_CAP)
@@ -2694,7 +2694,7 @@ function FinishSummary({ w, prs, e1prs = [], close }) {
<div className="tile"><div className="l">{t('Duration')}</div><div className="v" style={{ fontSize: '1.1rem' }}>{fmtDur(w.end - w.start)}</div></div>
<div className="tile"><div className="l">{t('Volume')}</div><div className="v" style={{ fontSize: '1.1rem' }}>{fmtVol(w.vol, st.unit)}</div></div>
<div className="tile"><div className="l">{t('Sets')}</div><div className="v" style={{ fontSize: '1.1rem' }}>{setsWorkCount(setsDone(w), workSetsDone(w))}</div></div>
- <div className="tile"><div className="l">{t('PRs')}</div><div className="v" style={{ fontSize: 20 }}>{prs.length || '—'}</div></div>
+ <div className="tile"><div className="l">{t('PRs')}</div><div className="v" style={{ fontSize: 20 }}>{prs.length || '–'}</div></div>
</div>
{(prs.length > 0 || e1prs.length > 0) && <div style={{ textAlign: 'start', marginBottom: 12 }}>
{prs.map(id => <div key={id} className="small accent row" style={{ gap: 5 }}><Icon name="trophy" style={{ fontSize: 13 }} />{t('New PR:')} <span className={exerciseNameClass(EXIDX[id])}>{EXIDX[id] ? exerciseNameFor(EXIDX[id]) : id}</span></div>)}
diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx
index 15154e744..d924ce5ed 100644
--- a/frontend/src/views/Admin.jsx
+++ b/frontend/src/views/Admin.jsx
@@ -98,7 +98,7 @@ function UserDetail({ id, onChanged, close }) {
{/* The sign-in e-mail (password instances only): shown to admins and nobody else. */}
{u.email && <span className="adm-pill" title="sign-in e-mail">{u.email}</span>}
{u.resetUntil && <span className="adm-pill acc">reset code until {new Date(u.resetUntil).toLocaleString()}</span>}
- <span className="adm-pill">joined {u.created ? fmtDate(u.created.slice(0, 10)) : '—'}</span>
+ <span className="adm-pill">joined {u.created ? fmtDate(u.created.slice(0, 10)) : '–'}</span>
</div>
<div className="tiles" style={{ textAlign: 'start' }}>
<div className="tile"><div className="l">Workouts</div><div className="v" style={{ fontSize: '1.1rem' }}>{workouts.length}</div></div>
@@ -300,10 +300,10 @@ export default function Admin() {
</div>}
<div className="tiles" style={{ marginBottom: 12 }}>
- <div className="tile"><div className="l">Users</div><div className="v">{users ? users.length : '—'}</div></div>
- <div className="tile"><div className="l">Training now</div><div className="v" style={{ color: liveUsers.length ? 'var(--acc)' : undefined }}>{users ? liveUsers.length : '—'}</div></div>
- <div className="tile"><div className="l">Active 7 days</div><div className="v">{users ? activeCount : '—'}</div></div>
- <div className="tile"><div className="l">Disabled</div><div className="v">{users ? disabledCount : '—'}</div></div>
+ <div className="tile"><div className="l">Users</div><div className="v">{users ? users.length : '–'}</div></div>
+ <div className="tile"><div className="l">Training now</div><div className="v" style={{ color: liveUsers.length ? 'var(--acc)' : undefined }}>{users ? liveUsers.length : '–'}</div></div>
+ <div className="tile"><div className="l">Active 7 days</div><div className="v">{users ? activeCount : '–'}</div></div>
+ <div className="tile"><div className="l">Disabled</div><div className="v">{users ? disabledCount : '–'}</div></div>
</div>
{liveUsers.length > 0 && <div className="card" style={{ borderColor: 'var(--acc)' }}>
diff --git a/frontend/src/views/CoachChat.jsx b/frontend/src/views/CoachChat.jsx
index 11e31c0d3..86cf294a1 100644
--- a/frontend/src/views/CoachChat.jsx
+++ b/frontend/src/views/CoachChat.jsx
@@ -475,8 +475,8 @@ function Insights({ S, window: win, compact }) {
return <div className="ins">
<div className="ins-tiles">
<Tile v={ins.sessions} l={t('Sessions')} />
- <Tile v={ins.minutes != null ? ins.minutes : '—'} l={t('Min / session')} />
- <Tile v={ins.volume ? kfmt(ins.volume) : '—'} l={t('Volume ({0})', S.unit)} />
+ <Tile v={ins.minutes != null ? ins.minutes : '–'} l={t('Min / session')} />
+ <Tile v={ins.volume ? kfmt(ins.volume) : '–'} l={t('Volume ({0})', S.unit)} />
<Tile v={ins.sets} l={t('Sets')} />
</div>
@@ -526,9 +526,9 @@ function DebriefBody({ p, S }) {
{live && <div className="ins">
<div className="ins-tiles">
<Tile v={live.now.sets} l={t('Sets')} />
- <Tile v={live.now.minutes != null ? live.now.minutes : '—'} l={t('Minutes')} />
- <Tile v={live.now.volume ? kfmt(live.now.volume) : '—'} l={t('Volume ({0})', S.unit)} />
- <Tile v={live.now.prs || '—'} l={t('PRs')} />
+ <Tile v={live.now.minutes != null ? live.now.minutes : '–'} l={t('Minutes')} />
+ <Tile v={live.now.volume ? kfmt(live.now.volume) : '–'} l={t('Volume ({0})', S.unit)} />
+ <Tile v={live.now.prs || '–'} l={t('PRs')} />
</div>
{live.then && <div className="ins-cmp">
{t('vs. last {0} on {1}:', w.name || t('session'), fmtDate(live.prevDate))}{' '}
@@ -713,7 +713,7 @@ function CohortSheet({ S, update, toast }) {
<Tile v={d.people} l={t('People')} />
<Tile v={fmtNum(d.sessionsPerWeek.you)} l={t('Your sessions / wk')} />
<Tile v={fmtNum(d.sessionsPerWeek.median)} l={t('Median / wk')} />
- <Tile v={d.rankPct != null ? d.rankPct + '%' : '—'} l={t('Your strength rank')} />
+ <Tile v={d.rankPct != null ? d.rankPct + '%' : '–'} l={t('Your strength rank')} />
</div>
{!!d.exercises.length && <div className="ins-block">
<div className="ins-h"><span>{t('Estimated 1RM, you vs. median')}</span><span className="dim">{S.unit}</span></div>
@@ -721,7 +721,7 @@ function CohortSheet({ S, update, toast }) {
const max = Math.max(x.median, x.you || 0) || 1
return <div key={x.id} className="cmp">
<div className="cmp-h"><span>{x.name}</span><span className="dim">{x.people} {t('people')}</span></div>
- <div className="cmp-bar you"><i style={{ width: Math.round((x.you || 0) / max * 100) + '%' }} /><span>{t('You')} · {x.you != null ? fmtNum(x.you) : '—'}</span></div>
+ <div className="cmp-bar you"><i style={{ width: Math.round((x.you || 0) / max * 100) + '%' }} /><span>{t('You')} · {x.you != null ? fmtNum(x.you) : '–'}</span></div>
<div className="cmp-bar"><i style={{ width: Math.round(x.median / max * 100) + '%' }} /><span>{t('Median')} · {fmtNum(x.median)}</span></div>
</div>
})}
diff --git a/frontend/src/views/Stats.jsx b/frontend/src/views/Stats.jsx
index e8c044ad9..3501ffc9b 100644
--- a/frontend/src/views/Stats.jsx
+++ b/frontend/src/views/Stats.jsx
@@ -316,11 +316,11 @@ function EffortCard({ S }) {
{sum.rated === 0 ? <div className="muted small">{t('No rated sets in this period.')}</div> : <>
<div className="row between" style={{ alignItems: 'flex-end', gap: 12 }}>
<div>
- <div className="stat-v">{sum.avg == null ? '—' : fmtNum(toScale(kind, sum.avg)) + ' ' + hd}</div>
+ <div className="stat-v">{sum.avg == null ? '–' : fmtNum(toScale(kind, sum.avg)) + ' ' + hd}</div>
<div className="small dim">{t('average effort')}</div>
</div>
<div style={{ textAlign: 'end' }}>
- <div className="stat-v" style={{ color: 'var(--yellow)' }}>{sum.hardPct == null ? '—' : Math.round(sum.hardPct * 100) + '%'}</div>
+ <div className="stat-v" style={{ color: 'var(--yellow)' }}>{sum.hardPct == null ? '–' : Math.round(sum.hardPct * 100) + '%'}</div>
<div className="small dim">{t('at {0} {1} or harder', hd, fmtNum(toScale(kind, HARD_RIR)))}</div>
</div>
</div>
@@ -336,7 +336,7 @@ function EffortCard({ S }) {
{hist.map(b => <div key={b.rir} className="mrow">
<span className="nm">{hd} {binLabel(b)}</span>
<span className="bar"><i style={{ width: Math.round(b.n / maxBin * 100) + '%', background: b.rir <= HARD_RIR ? 'var(--yellow)' : 'var(--label-3)' }} /></span>
- <span className="v">{b.n ? b.n + ' · ' + Math.round(b.pct * 100) + '%' : '—'}</span>
+ <span className="v">{b.n ? b.n + ' · ' + Math.round(b.pct * 100) + '%' : '–'}</span>
</div>)}
<div className="small dim" style={{ marginTop: 8 }}>
{t('Most working sets belong close to failure, not at it. Half at the floor and half at the top still average out to a healthy-looking middle.')}
@@ -526,7 +526,7 @@ export default function Stats() {
<div className="tile"><div className="l"><Icon name="dumbbell" />{t('Workouts')}</div><div className="v">{workouts.length}</div></div>
<div className="tile"><div className="l"><Icon name="calendar" />{t('This month')}</div><div className="v">{monthW}</div></div>
<div className="tile"><div className="l"><Icon name="flame" />{t('Week streak')}</div><div className="v">{streakWeeks(S)}</div></div>
- <div className="tile"><div className="l"><Icon name="scale" />{t('Weight 30d')}</div><div className="v" style={{ fontSize: 22, color: bwDelta30 === null ? 'inherit' : bwDeltaColor(bwDelta30, (lastBW(S) || {}).w || 0) }}>{bwDelta30 === null ? '—' : (bwDelta30 > 0 ? '+' : '') + fmtNum(bwDelta30) + ' ' + S.unit}</div></div>
+ <div className="tile"><div className="l"><Icon name="scale" />{t('Weight 30d')}</div><div className="v" style={{ fontSize: 22, color: bwDelta30 === null ? 'inherit' : bwDeltaColor(bwDelta30, (lastBW(S) || {}).w || 0) }}>{bwDelta30 === null ? '–' : (bwDelta30 > 0 ? '+' : '') + fmtNum(bwDelta30) + ' ' + S.unit}</div></div>
</div>
@@ -576,7 +576,7 @@ export default function Stats() {
{exHist.length ? <>
<div className="sect-b" style={{ marginBottom: 10 }}>
<SelectRow title={t('Exercise')} sheetTitle={t('Exercise progress')} value={curEx} onChange={setExId} stackedValue
- options={exHist.map(id => ({ value: id, label: (EXIDX[id] ? exerciseNameText(EXIDX[id]) : nameOf(id)) + (exCurrent[id].mx ? ' ' + '—' + ' ' + fmtNum(exCurrent[id].mx) + ' ' + exCurrent[id].unit : '') }))}
+ options={exHist.map(id => ({ value: id, label: (EXIDX[id] ? exerciseNameText(EXIDX[id]) : nameOf(id)) + (exCurrent[id].mx ? ' · ' + fmtNum(exCurrent[id].mx) + ' ' + exCurrent[id].unit : '') }))}
search={{
placeholder: t('Search…'),
label: t('Search…'),
diff --git a/frontend/src/views/StructuralBalance.jsx b/frontend/src/views/StructuralBalance.jsx
index 5a2b6f287..a20026e74 100644
--- a/frontend/src/views/StructuralBalance.jsx
+++ b/frontend/src/views/StructuralBalance.jsx
@@ -59,7 +59,7 @@ export default function StructuralBalance() {
const exId = r.mappedExerciseId || r.configuredExerciseId
const name = exerciseName(exId)
const reps = role.evaluationMode === EVALUATION_MODES.REP_COUNT
- const actual = r.status === 'no-data' ? '—' : reps ? r.current.r : `${Math.round(r.actualPct)}%`
+ const actual = r.status === 'no-data' ? '–' : reps ? r.current.r : `${Math.round(r.actualPct)}%`
const valueText = `${actual} / ${r.targetPct}${reps ? '' : '%'}`
return (
<div key={r.roleId} className="mrow" data-role-id={r.roleId} data-status={r.status}
diff --git a/frontend/src/views/Workout.jsx b/frontend/src/views/Workout.jsx
index 5bb682997..4a69332f0 100644
--- a/frontend/src/views/Workout.jsx
+++ b/frontend/src/views/Workout.jsx
@@ -345,7 +345,7 @@ function ExerciseBlock({ entryIdx, compact, dense, editing, onToggle, onToggleSi
// "+" between plates: "45 + 5 per side" reads as a sum, a dot did not (Boris, 2026-09-13).
const stack = L.plates.map(w => fmtPlate(w)).join(' + ')
const text = L.barOnly ? t('Bar only')
- : L.kind === 'pairs' ? t('{0} per side', stack || '—') : t('Load {0}', stack || '—')
+ : L.kind === 'pairs' ? t('{0} per side', stack || '–') : t('Load {0}', stack || '–')
const d = prev && !dense ? plateDelta(prev.plates, L.plates) : null
const moves = d ? [...d.strip.map(w => '−' + fmtPlate(w)), ...d.add.map(w => '+' + fmtPlate(w))] : []
return <div className="plateline">