Complete TASK-017 simplified EMOM and per-side entry

This commit is contained in:
rob
2026-11-07 15:29:12 +00:00
parent 9c0e82037f
commit 922d1f6bd7
30 changed files with 646 additions and 236 deletions
+14 -46
View File
@@ -2,59 +2,27 @@
> Replaceable snapshot; repository code and maintained context take precedence.
- Updated: 2026-11-04
- Task: TASK-015 — Exercise equipment specifications and context-aware UI
- Status: Complete — Captain explicitly accepted on 2026-11-04 after the count-input and completion-checkbox corrections.
- Accepted source: TASK-015 files in `/home/rob/projects/exercise-tracker`, task branch `task/015-equipment-ui`, based on `codex` / `669bfc3`. Integration target is local `codex`; use Git HEAD/log to identify the resulting commit.
- Captain explicitly authorized committing TASK-015 and merging it into local `codex` on 2026-11-04. The merge is a fast-forward from the unchanged integration baseline. No push or deployment is authorized.
- Updated: 2026-11-07
- Task: TASK-017 — Simplify EMOM and per-side inputs.
- Status: Complete — Captain explicitly said “task complete. commit all and merge to codex”.
- Source: `/home/rob/projects/exercise-tracker`, task branch `task/017-emom-totals`, integration branch `codex`, base `9c0e820`. Captain authorized committing all pending task changes and merging locally; verify resulting refs/HEAD using Git. No push or deployment authorized.
## Delivered candidate
## Delivered
- Definition metadata covers all 30 exercises, supported equipment, applicable measurements, side semantics, dumbbell defaults and support-handle distinction. Seed v8 aligns all assignments and daily-hang continuous target. No numeric resistance is embedded in capabilities; old plan presets do not prefill actuals.
- PerformanceEditor replaces exercise-ID control exceptions with reusable rows for reps, left/right reps, seconds, left/right seconds, equipment load/count, completion, partial saves and explicit previous-session suggestions. EMOM has ten minute rows with separate vest loads and derived completed totals; empty entries can use conventional sets. Set additions copy only load/count.
- Bodyweight-only work has no external-load inputs; vest-only work has no dumbbell/bar inputs. Daily hang attempts show longest continuous and total duration separately; only valid completed attempts can achieve the current continuous target. Changing the editable goal retains unsaved attempts; first save captures the current target while later goal edits do not rewrite saved target context.
- Cards preserve date/period navigation, wall clock and rest guidance, with shared headings on desktop and labeled stacked fields on narrow screens. Expandable details show available routine notes and honest reviewed-content/image placeholders. No timers/audio, dark theme, history interface, routine editor or backup UI added.
- IndexedDB v3 adds performanceEntries and an exercise/period/format index. The upgrade preserves old records, but older v2 application binaries cannot reopen a v3 database; downgrade is not a supported rollback path. Original routineOverrides and strengthEntries remain intact. Detailed schemaVersion 1 snapshots retain historical equipment/measurement/prescription meaning. Original records have a separate disclosure/editor; legacy totals are not spread into minutes/sides or combined with detailed records.
- JSON adapter v2 exports the three stores, accepts v1 legacy-store envelopes, validates before mutation and imports atomically. Duplicate keys roll back unless replacement is explicit. No previous shipping backup implementation existed. TASK-009 still owns Settings UI, previews, confirmations and full settings/plan-edit backup policy.
EMOM uses Weight (kg) and Total reps, explicit Save and compatible aggregate suggestions, without minute table or format switch. New emom-total records use a separate key, preserving historical minute/aggregate records and original editors. JSON envelope v3 supports v1/v2/v3 import; IndexedDB remains v3. Do not combine coexisting representations in future history.
## Validation and review
Per-side sets use one Reps (each side) or Seconds (each side) input; explicit edits set both stored sides. Historical unequal/partial values are shown as text and preserved on browsing and untouched Save. Equipment, targets, hangs, navigation and clock remain compatible. No data was cleared or silently migrated.
Final verification on 2026-11-04: `npm test` passed **129 tests across 11 files**; `npm run lint`, `npm run build`, Context System validation (0 warnings) and `git diff --check` passed with Node 24.21.0. Tests exercise all assigned controls and absences, zero/mixed/per-set loads, dumbbell counts, sides, actual duration, minute EMOM, drafts/completion, compatible previous sessions, continuous/cumulative hang distinction, legacy read/edit paths, actual App→IndexedDB save/reload, v1/v2 upgrades, indexed queries, unsupported records, blocked upgrade, JSON round trips and whole-import rollback.
## Acceptance and validation
Applied Frontend UI Design, Webapp Feature, Frontend Visual QA availability check and Code Review. Reviewed tracked/untracked changes against codex and the task requirements. Review fixes preserve current target on first save, user-selected count during suggestions, snapshot-based historical controls, and valid-only achieved totals. The test-only fake-indexeddb 6.2.7 dependency permits transactional upgrade/rollback tests; runtime dependencies are unchanged.
Captain accepted all TASK-017 changes on 2026-11-07, including the per-side correction, and authorized commit/local codex merge. Final verification passes 143 tests across 13 files, lint, build, context validation (0 warnings) and whitespace checks. Review against base 9c0e820 covered tracked and untracked task files; no unresolved actionable correctness findings. No independent agent visual pass is claimed.
Browser inventory returned no apps/browsers. Therefore no actual viewport screenshots, browser-console/network inspection, real keyboard journey or mobile/desktop visual pass is claimed. Existing automated navigation/clock/hang-goal tests remain green. npm audit reports baseline Vite/Vitest advisories (1 high, 2 moderate package findings); their versions are unchanged and no automatic unrelated update was applied.
Work used a dedicated branch in the original worktree, not a separate implementation worktree. This deviation was acknowledged to Captain; do not describe the test snapshot as an implementation worktree.
## Exact acceptance environment
## Manual-test ownership and next work
The existing loopback Vite server at **http://127.0.0.1:5174/** was checked serving the current App module containing PerformanceEditor. It reads the authoritative task worktree directly. No repository testtask/snapshot adapter exists. Refresh before testing; other ports and hostnames are different browser-storage origins. The loopback address is reachable on this machine; use browser responsive mode for phone widths. No existing user records were cleared.
Captain runs testtask. Agents must not launch/restart it, open its browser windows or stop Captain testing sessions unless explicitly instructed. Earlier agent launches were mistakes, not authority for future execution. Final integration does not invoke testtask or refresh its snapshot.
## Floor-fly acceptance correction — 2026-11-04
For future Captain testing: `PATH=/home/rob/.nvm/versions/node/v24.21.0/bin:$PATH scripts/testtask.sh 017`. The repository adapter prepares `.test-worktrees/task-017` from allowlisted source files with hash checks, shares node_modules and serves loopback port 5187 with an isolated Firefox profile. Snapshot is replaceable test evidence; do not edit it. It is historical after completion-context edits and should be refreshed by Captain if reused. No test session cleanup is inferred from the commit/merge request.
Captain reported the floor-fly count input is redundant because two dumbbells are always used. Definition v2 now sets fixedDumbbellCount=2; the shared editor hides that field and retains kg each with the correct two-dumbbell resistance/volume calculation. Existing paired snapshots also hide the field without data rewrites; historical differing counts retain their original semantics. Superseded by the following all-exercise correction. Regression tests cover absent input, saved count=2, preserved snapshots and volume calculation. All 129 tests across 11 files, lint and build pass. Context and whitespace checks pass; browser verification remains unavailable.
## All dumbbell-count inputs removed — 2026-11-04
Captain requested removal across every exercise. Shared column metadata now hides all “Dumbbells used” controls. Existing kg-each inputs remain. Counts remain internal with definition defaults for new rows; historical non-null counts are preserved exactly. A null count from an old partial draft is filled from its saved definition only at explicit Save, avoiding an impossible-to-complete hidden field. The 30-exercise UI matrix verifies the count input is absent everywhere; regressions cover old recorded counts, old null-count drafts and paired resistance calculations. Browser QA remains unavailable.
## Completion checkboxes removed — 2026-11-04
Captain accepted the recommendation to remove all completion checkboxes. Explicit successful Save now derives completion: fully filled valid rows complete; missing values stay drafts; invalid entered values fail validation. Unsaved edits and suggestions do not count as achieved. Failed saves retain draft state and do not inflate totals. Existing completion booleans remain intact on read; an edited record changes only on explicit Save. No IndexedDB/schema migration. The all-exercise control matrix asserts checkbox absence; regressions exercise partial save/reload, derived EMOM/hang totals, edited rows, valid zero and failed-save behavior.
## Captain checklist
1. Tuesday Morning: enter different pull-up reps/vest loads for two EMOM minutes, save to complete the filled minutes. Reload and revisit the date. Existing aggregate history, if present, stays in its original disclosure without invented minutes.
2. Wednesday: flys show dumbbell kg each without count or vest. Deep push-ups show vest only; details explain the dumbbell handles. Push-up plus now supports vest, including zero.
3. Thursday: split squats/RDLs/calf raises have left/right reps and independent vest/dumbbell loads. Front plank asks seconds/vest without reps. Add a set and verify only load/count copies.
4. Saturday: hanging knee raises have no weights; finger hangs ask seconds/vest with no invented duration target. Sunday hip raises ask left/right reps and vest.
5. Afternoon: bird-dog asks left/right seconds with no reps or weights. Daily hang has optional attempts and an editable continuous target. Complete attempts of 60 and 75 seconds: total 135, longest 75, no 120-second continuous achievement. Change the goal while drafting and verify entered seconds remain.
6. Save an incomplete row, reload and verify null/blank values remain incomplete. Saving an incomplete row keeps it a draft; invalid entered values should show validation feedback. There are no completion checkboxes. Suggestions for a later matching session fill only empty drafts and never mark complete/save automatically.
7. Check 320px, tablet and desktop widths, field wrapping, expanded details, legacy records, errors and focus visibility without horizontal scrolling. Verify Today/Week, Morning/Afternoon, wall clock, empty Monday/Friday mornings and timer absence.
Captain explicitly confirmed “task complete” after the final corrections; TASK-015 is Complete. Final checks passed 129 tests, lint, build, context and whitespace checks. Agent browser QA remained unavailable; no separate visual pass is claimed.
## Integration handoff and next action
Captain authorized TASK-015 commit and merge to local `codex`. Run the repository checks, commit the accepted source/tests/context, then switch to codex and fast-forward task/015-equipment-ui. Verify both refs point at the accepted commit and the worktree is clean before reporting success. No remote or deployment is involved. This instruction is task-specific and does not authorize future merges.
TASK-016 (dark theme) remains planning-only; await Captain selection before new implementation. No task is in progress after TASK-015 integration.
TASK-016 remains planning-only; await Captain's next selected task. No implementation task is in progress after TASK-017 integration.