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
+31
View File
@@ -136,13 +136,28 @@ input:focus, select:focus, textarea:focus { outline: none; border-color: var(--a
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--arsenal-red); color: #fff; font-size: 1.6rem; font-weight: 700; }
.stepper .val { font-size: 1.6rem; font-weight: 800; min-width: 70px; text-align: center; }
.stepper input.val.score-input { width: 80px; min-width: 0; border: 2px solid var(--line); border-radius: 12px; height: 48px; background: var(--card); color: inherit; }
.stepper .unit { color: var(--muted); font-size: .9rem; }
.record-line { color: var(--arsenal-red); font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
/* ---------- Metric / record editor (settings) ---------- */
.metric-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.metric-edit-name { flex: 1 1 100%; font-weight: 600; }
.metric-edit .mini { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.metric-edit .mini input[type="number"] { height: 38px; }
/* ---------- Records (dashboard) ---------- */
.record-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.record-row:last-child { border-bottom: none; }
.record-row .emoji { font-size: 1.4rem; }
.record-row .record-val { font-size: 1.3rem; font-weight: 800; color: var(--arsenal-red); }
/* ---------- Logged entries ---------- */
.entry { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: none; }
.entry .emoji { font-size: 1.4rem; }
.entry .vals { color: var(--muted); font-size: .9rem; }
.entry .vals.note { font-style: italic; }
.badge { display: inline-block; background: var(--bg); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }
/* ---------- Stats ---------- */
@@ -190,6 +205,22 @@ canvas { max-width: 100%; }
.empty .big-emoji { font-size: 3rem; display: block; margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); }
/* ---------- Update banner ---------- */
.update-banner {
position: fixed; left: 12px; right: 12px;
bottom: calc(72px + var(--safe-bottom)); z-index: 50;
display: flex; align-items: center; justify-content: space-between; gap: 12px;
background: var(--arsenal-red); color: #fff;
padding: 12px 16px; border-radius: 14px; font-weight: 700;
box-shadow: var(--shadow);
animation: slide-up .25s ease;
}
.update-banner .btn-refresh {
flex: none; background: #fff; color: var(--arsenal-red);
border: none; border-radius: 999px; padding: 8px 18px; font-weight: 800;
}
@keyframes slide-up { from { transform: translateY(140%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 620px) {
.stat-grid { grid-template-columns: repeat(4, 1fr); }
}