Complete TASK-008 history and progress

This commit is contained in:
rob
2026-11-11 17:54:19 +00:00
parent e3bd365add
commit bf9c3ce320
16 changed files with 878 additions and 17 deletions
+29 -12
View File
@@ -3,24 +3,41 @@
> Replaceable snapshot; repository code and maintained context take precedence.
- Updated: 2026-11-11.
- TASK-005: Complete. Captain explicitly accepted (“task complete”), then separately authorized “commit and merge”.
- Source: `.task-worktrees/task-005`, branch `task/005-notes-bodyweight`, base codex `be0ff2b`; target local `codex`. Verify final commit/refs with Git.
- All available completed task implementation is integrated after this merge. No push/deployment or worktree/session cleanup authorized.
- Active: TASK-008 History and progress. Captain engaged Frontend UI Design → Webapp Feature with the lock-on defaults; Complete following Captain’s explicit “task complete” acceptance on 2026-11-11. Captain subsequently authorized commit and local codex merge.
- Source: `/home/rob/projects/exercise-tracker/.task-worktrees/task-008`, branch `task/008-history-progress`, base codex `e3bd365`.
- Home remains codex `e3bd365` with active task/current-state/handoff context only. Application, design/spec/decision and tests stay in the 008 source. Other implementation worktrees/stashes/missing registrations are preserved. No task commit/merge/push/deploy authorized.
## Delivered and validated
## Delivered
Optional date/period session notes, dated exercise observations and one daily positive decimal kg body-weight value shared across periods. Compact disclosures/forms retain the dark UI and existing workout hierarchy. Independent explicit Save; Clear edits only the draft, Save confirms removal. Notes are plain text with a 4000-character limit. Read failures prevent overwriting and offer retry; failed saves retain drafts; keyed forms isolate late reads/save feedback. Navigation follows existing discard-of-unsaved-draft behavior. Notes/body weight never complete or modify performance or previous-session suggestions.
Real History replaces its placeholder: From/To date and recorded-period filters, Refresh/Retry, Clear filters, newest-first date disclosures, read-only saved actuals/notes/daily body weight, compatible exercise series/metric selection, latest vs previous values/change, recorded highs, and separate body-weight trend. SVG plots have readable HTML date/scale labels and accessible exact-value lists; missing points break lines and one point does not invent a comparison. Date row details mount only when opened. Existing header/clock/navigation and dark styling remain.
IndexedDB v4 adds workoutDetails and leaves original goal/legacy/detailed records intact. JSON v4 exports and v1–v4 imports validate and transact atomically. Old-format replacement preserves new observations absent from old envelopes; v4 replacement covers all four stores. Older app builds cannot open v4 DBs/read v4 backups; no downgrade claimed. No dependencies, programme, timers, history/routine editor/backup interface or reviewed content/illustrations added.
Counts describe recorded completed/draft rows, never completion of a whole prescribed workout. Notes-only/weight-only observations are labelled. Calculations use saved definitions, actual loads/counts and completed rows; body weight/timed work have no rep-load volume. Display the formula, raw per-row/known session totals, zero/partial/missing/overflow distinctions, longest continuous and cumulative hangs separately. Alternate representations are not double-counted: emom-total takes precedence even as a draft; originals remain in excluded disclosures. Legacy data has no period/definition/completion snapshot, so original totals are not reinterpreted. If detailed data exists on the same date/exercise, legacy stays at date level excluded; otherwise it is a separate Earlier records group. Legacy and changed measurement/equipment/format/count/load-field modes do not share detailed comparison series.
206/206 tests across 18 files pass with `npm test -- --maxWorkers=1`. Lint/final build, source preflight, context validation (0 warnings), whitespace and diff review against `be0ff2b` pass. Coverage includes upgrades from v1/v2/v3, blocked upgrades, original record preservation, backup round trips/old imports/rollback, input validation, save/clear/reload, empty sessions, date/period/exercise isolation, failures and async read/save races. No independent agent browser/console/network/desktop/mobile/keyboard review claimed; Captain acceptance is recorded. Application implementation unchanged during acceptance/integration preparation, so checks are not rerun solely for completion documentation.
One consistent readonly transaction validates performanceEntries/strengthEntries/workoutDetails. Invalid/unsupported data fails visibly without modification or silent empty success. No writes, schema/backup/dependency/programme changes, editing/deleting history, timers, coaching, calories or streaks. Date filters apply to daily weight; period filters do not split it.
Design: docs/TASK-005_UI.md. Scope decision: ADR-022. Storage/backup contract: TASK-005 section in docs/SPEC.md. PROJECT_OVERVIEW describes the integrated v4 architecture.
Design and math brief: docs/TASK-008_UI.md. Contract: TASK-008 section in docs/SPEC.md. Durable decision: ADR-023. Candidate overview describes History; home overview stays the integrated baseline until authorized merge.
## Git state and retained evidence
## Validation
All completed available implementation is integrated after TASK-005 merge; no unique uncommitted application work remains. Home and persistent task worktrees should be clean; verify before new work. Four named safety stashes preserve duplicate/older context/tooling from prior integrations, including home's pre-merge TASK-005 context. Applying them wholesale would restore stale documentation; retain pending Captain cleanup authority. Missing original `/tmp` registrations remain prunable evidence, not unmerged candidate code. No branches/worktrees/stashes/snapshots deleted and no Captain sessions stopped.
- Final full suite: 234/234 tests across 22 files pass with `npm test -- --maxWorkers=1`, including the final rendering and legacy weight-only UI cases. Earlier focused rendering/async checks also passed.
- Final lint/build and no-launch source preflight `--check 008` pass. Context validation: 0 warnings; whitespace and diff review against e3bd365 pass.
- New calculation/storage/UI/async coverage includes mixed/saved/asymmetric-side loads, bars, zeros, drafts/missing loads, timed work, continuous/cumulative hangs, duplicate representations, legacy unknowns, overflow, compatibility separation/order, notes/weight-only observations, readonly transaction/data preservation, invalid/unavailable storage, empty/loading/filter/detail/chart/retry/refresh and late-response cancellation. Existing tests are retained.
- No independent browser/console/network/desktop/mobile/keyboard review claimed. Captain explicitly accepted the candidate; TASK-008 is Complete. No independent agent visual review is claimed. No agent runner/browser/server/manual snapshot launch or session cleanup.
## Testtask
## Captain manual test
Captain alone runs/stops real sessions. From home, `./scripts/testtask.sh 005` still selects the persistent source and Node automatically; `--check 005` validates without launch. Snapshots remain separate under source `.test-worktrees` and must not be edited. Completion documentation may require the supported runner to refresh on Captain's next launch. No runner/browser/server/snapshot launched for integration.
From project home:
```bash
./scripts/testtask.sh 008
```
Expected source: `/home/rob/projects/exercise-tracker/.task-worktrees/task-008`. The isolated fresh profile initially has no history. Use Today/Week to save actual performance on two dates for the same exercise/period, including zero external weight and a partial later entry. Enter session/exercise notes and daily weight on suitable dates. In History:
1. Confirm newest-first dates, completed/draft/notes-only/weight-only labels; expand dates and check exact reps, component loads/counts, durations and notes. Browsing must not save or change entries.
2. Filter date range and Morning/Afternoon, check an invalid/reversed range and empty matches, Clear filters and Refresh. Daily weight is shared and follows date range rather than period.
3. Select a compatible exercise/metric; compare latest/prior values and recorded high with original actuals. Volume formula/raw totals must match completed actuals. Two saved sessions enable a comparison; one point remains explicitly one point. Open exact recorded values.
4. Save two afternoon hang attempts (e.g. 60 and 75 sec): longest is 75, cumulative is 135, not a continuous 135-sec achievement. Check daily weight has its own chart and is excluded from load volume.
5. At desktop/320px, check readable chart labels/scales/values, wrapping rows/notes/filter labels, no horizontal overflow, keyboard focus/order, date and progress selectors, disclosures and existing navigation/clock.
Legacy/minute overlap, weight-only originals, failure/cancellation and arithmetic overflow have automated fixtures; do not claim manually seeded old data or fault injection. Captain alone launches/stops real testtask. Do not edit snapshots. TASK-008 is accepted/Complete and authorized for local commit/merge.