Skip to content

Comments

v1.2: Documentation, UX improvements, consistency grid, empty workout cancellation#19

Merged
kavith-k merged 14 commits intomainfrom
v1.2/all-improvements
Feb 16, 2026
Merged

v1.2: Documentation, UX improvements, consistency grid, empty workout cancellation#19
kavith-k merged 14 commits intomainfrom
v1.2/all-improvements

Conversation

@kavith-k
Copy link
Owner

Summary

Implements all v1.2 TODO items across documentation, UI/UX, backend logic, and research.

  • Documentation overhaul: Created docs/ folder with architecture, database, offline, and deployment docs. Rewrote README to be concise and user-facing. Trimmed CLAUDE.md to agent instructions only.
  • Drag-to-reorder: Replaced up/down arrow buttons with touch-friendly drag-and-drop (via svelte-dnd-action) for reordering days and exercises in programme creation.
  • Restrict set deletion: Delete button now only appears on manually added sets during workouts, not on prescribed programme sets.
  • Copy previous set: Arrow-down button copies weight and reps from the set above into empty input fields.
  • Live volume display: Shows current session volume vs previous session volume per exercise during workout logging.
  • Consistency grid: GitHub-style 16-week activity heatmap on the home page showing workout frequency.
  • Cancel empty workouts: Workouts with zero logged reps are deleted instead of saved. Sync endpoint returns a cancelled flag. Home page shows a temporary cancellation banner.
  • Offline HTTP investigation: Researched and documented service worker HTTPS requirements and workarounds for self-hosters (written to llm-docs/v1.2/offline-mode-http.md).

Test plan

  • Lint, type check, and unit tests all pass (209/209)
  • Verify drag-to-reorder works on mobile (touch) for both days and exercises in programme creation
  • Verify copy-down button appears only on empty sets (index > 0) and correctly copies weight/reps
  • Verify volume display updates reactively as sets are logged
  • Verify consistency grid renders on home page with correct day highlighting
  • Verify empty workout (no reps logged) is cancelled and redirects to home with banner
  • Verify delete button is hidden on prescribed sets but visible on manually added sets
  • Review new docs/ folder for accuracy and completeness

Add getPrescribedSetCounts query that looks up the original set count
from dayExercises for each exercise log. Thread the prescribed count
through the page loader, WorkoutWizard, and into ExerciseStep as a
new prescribedSets prop. The delete button now only appears on sets
whose index >= the prescribed count (i.e. sets added via "+ Add Set").
Standard programme sets can no longer be accidentally removed.
…UDE.md

Extract architecture, database, offline, and deployment documentation from
TECHNICAL_DESIGN.md and CLAUDE.md into dedicated files under docs/. Rewrite
README.md to be concise and user-facing with links to docs/. Trim CLAUDE.md
to agent instructions only, removing architecture prose now covered by docs/.
GitHub-style activity grid showing workout history over 16 weeks.
Query completed workout dates, render as a 7-row CSS grid with
month labels, day-of-week labels, and today marker.
Research findings on which offline features work over plain HTTP
(IndexedDB queue, sync loop, online/offline detection) versus which
require HTTPS (service worker, PWA install prompt). Includes
browser-specific notes and workaround options for LAN deployments,
with a recommendation to use mkcert + Caddy for full PWA support.
Swap ChevronUp/ChevronDown button pairs for both days and exercises
with touch-friendly drag handles using svelte-dnd-action. Each row
now has a GripVertical drag handle that supports mouse, touch, and
keyboard reordering with flip animations. Renamed tempId to id to
match svelte-dnd-action's item requirements.
- Wire up copy-down button (ArrowDown) to fill empty sets from previous set
- Add live volume display: current vs previous session volume per exercise
- Fix ConsistencyGrid lint: suppress Date rule for computation, use DAYS directly
When finishing a workout with no logged reps, delete the session,
exercise logs, and set logs instead of saving a completed workout.
Redirect to home with a cancellation banner. Update the sync endpoint
to return a cancellation flag for offline-queued completions. Fix
existing tests and add coverage for cancellation and bodyweight
exercise edge cases.
- architecture.md: document drag-to-reorder, copy-down, volume display,
  consistency grid, empty workout cancellation, programme editing section
- offline.md: document COMPLETE_WORKOUT cancellation behaviour during sync
- Add /api/history GET endpoint for paginated session data
- Add IntersectionObserver-based infinite scroll to /history page
- Remove unused /history/by-exercise route and backing query functions
  (getHistoryByExercise, getExerciseHistory, ExerciseWithHistory,
  ExerciseHistoryEntry) and their tests
- Add seed-test-data.mjs script for populating the DB with 2 years of
  sample workout data
- Update architecture docs with new routes and test data section
The workout dates query compared seconds (DB) to milliseconds
(Date.getTime()), so no dates ever matched. Replaced raw SQL with
Drizzle gte() operator. Made the grid measure its container width
and compute how many week columns fit, instead of a fixed 16. Added
bottom padding to prevent the today-ring from being clipped. Server
now fetches 52 weeks of data to support wider screens.
Replace the visible copy-down arrow button with a tappable set number
and placeholder hints, keeping input widths consistent across all rows.

Redesign the activity grid: add a bordered card container, make it
horizontally scrollable (starting at the latest date), show all
historical data instead of capping at 52 weeks, improve contrast on
missed-day cells, and add year labels above January month markers.
The 'blocks starting a second workout' test finished a workout without
logging any sets, so completeWorkout cancels it and redirects to
/?cancelled=1 rather than the summary page. Updated the assertion
accordingly and added an explicit dialog wait for CI reliability.
The home page strips ?cancelled=1 via replaceState on mount, so the
URL check was unreliable. Assert on the workout-cancelled-banner
element instead.
@kavith-k kavith-k merged commit 76d08d6 into main Feb 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant