Add records, Elijah scores, per-session notes, and PWA update prompt

App features:
- Personal-best records per metric: manually settable in Settings and
  auto-updated when a session beats them; shown in the log modal and a
  new dashboard "Personal records" card.
- Juggling now counts by 1 instead of 5.
- 1-on-1 with Elijah gains Technical Skill and Effort scores (out of 10)
  as manual inputs, plus an optional per-session note.
- Service worker now uses a controlled update flow: an in-app
  "new version ready" banner activates the update on tap and reloads.

Data model:
- category_metrics gains track_record + record; entries gains note.
- Idempotent migrations bring existing databases up to date (juggling
  step/record, Elijah score metrics) alongside the updated seed.

StartOS package:
- Bump to 0.1.2:0 with release notes.
- Build x86_64 only (drop aarch64) per deployment target.
This commit is contained in:
Keysat
2026-06-03 08:46:27 -05:00
parent 0265699504
commit 5868852686
17 changed files with 441 additions and 121 deletions
+14
View File
@@ -23,6 +23,20 @@ export async function renderStats(view, { catById }) {
const main = stats.goals.find((g) => g.is_main);
if (main) view.append(thermometer(main));
// ---- personal records ----
const records = (stats.records || []).length ? stats.records : null;
if (records) {
const card = h('div', { class: 'card' }, h('h2', {}, '🏆 Personal records'));
for (const r of records) {
card.append(h('div', { class: 'record-row' },
h('span', { class: 'emoji' }, r.emoji),
h('div', { style: 'flex:1' },
h('div', {}, `${r.category}${r.name}`)),
h('span', { class: 'record-val' }, r.record != null ? `${r.record}${r.unit ? ' ' + r.unit : ''}` : '—')));
}
view.append(card);
}
// ---- heatmap ----
view.append(h('div', { class: 'card' },
h('h2', {}, '🔥 Training calendar'),