Complete TASK-008 history and progress
This commit is contained in:
@@ -366,3 +366,14 @@ This current contract supersedes earlier database/backup version descriptions fo
|
||||
- IndexedDB v4 adds `workoutDetails`, preserving all prior stores/records. Keys: `date:period:session-note`, `date:period:exerciseId:exercise-note`, `date:body-weight`. Values have `schemaVersion: 1`, `kind`, `date`, applicable `period`/`exerciseId` and either `text` or `weightKg`. Validate identity, record fields, values and key consistency.
|
||||
- JSON exports use envelope v4 with `workoutDetails`; imports accept v1/v2/v3/v4. Older envelopes contain no observation store; even an explicit old-format replacement preserves existing observations rather than inferring their deletion. V4 replacement covers all four stores atomically. Validate all records before mutation; duplicate/non-replacing import failures roll back all stores. Older app builds cannot open a v4 database or read v4 backups; retain this app version for restoring new data. No downgrade/rewrite of historical records and no backup UI in this task.
|
||||
- UI composition and state/accessibility/responsive specification: `TASK-005_UI.md`. Existing programme notes remain distinct from personal observations. History charts remain TASK-008; backup interface remains TASK-009.
|
||||
|
||||
|
||||
## TASK-008 history contract — 2026-11-11
|
||||
|
||||
History is now read-only, replacing its placeholder, with From/To date filters (initially all dates), saved-period filter, Refresh/Retry and Clear filters. Dates are newest first; row details mount on disclosure expansion. Show saved names/measurement/equipment and original actual values, completed/draft row counts, notes and daily weight. Counts never assert whole-programme session completion. Weight-only/notes-only dates do not become completed workouts. Body weight follows date range only because it is shared across periods.
|
||||
|
||||
A consistent readonly transaction validates keys/records across performanceEntries, strengthEntries and workoutDetails; no writes/migrations or backup changes are added. Current emom-total wins over original minute/set representation for the same date/period/exercise even if it is a draft. Preserve original rows in a separate disclosure excluded from current totals. Legacy records have only date/exercise identity and original recorded totals: period, completion and saved definition are unknown. If any detailed record exists for that date/exercise, keep the legacy data in a separate date-level disclosure and do not count it. Otherwise group it under Earlier records (period not saved), retaining original rep/load calculation; weight-only legacy data has no inferred reps or volume.
|
||||
|
||||
Detailed external-load volume sums completed actual reps × external kg from saved vest, dumbbell kg-each × saved count and bar totals. Reps-per-side include both saved side values, with originals shown. Timed/distance work and body weight contribute no rep-load volume; drafts are excluded. Show known completed-row totals with partial/missing-data qualifiers; arithmetic outside supported finite/safe-count ranges is unavailable, not zero. True zero remains valid. Original legacy externalKg is never reinterpreted through current definitions. Do not combine alternate representations.
|
||||
|
||||
Progress groups exercise/period/format/saved measurement-equipment-fixed-count signature and actual dumbbell-count modes. Legacy groups stay separate by original format/load-field modes. Offer compatible previous/current values, change, recorded high and metric selection (reps, known volume, highest actual external load, duration/distance, longest/cumulative hang as appropriate). Partial records remain labelled; no adjustment for number of sets or estimate of missing performance. Hanging exercise IDs remain independent. Daily weight has a separate date-only trend with no preferred direction. Local SVG plots have normal-sized HTML date/scale labels and accessible exact recorded-value lists; missing values break lines and one point does not invent a comparison. No new dependencies, editing/deleting history, backup UI, recommendations, calories, streaks or time rates. UI/acceptance brief: TASK-008_UI.md; durable choices: ADR-023.
|
||||
|
||||
Reference in New Issue
Block a user