v1.2: Documentation, UX improvements, consistency grid, empty workout cancellation#19
Merged
v1.2: Documentation, UX improvements, consistency grid, empty workout cancellation#19
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements all v1.2 TODO items across documentation, UI/UX, backend logic, and research.
docs/folder with architecture, database, offline, and deployment docs. Rewrote README to be concise and user-facing. Trimmed CLAUDE.md to agent instructions only.svelte-dnd-action) for reordering days and exercises in programme creation.cancelledflag. Home page shows a temporary cancellation banner.llm-docs/v1.2/offline-mode-http.md).Test plan
docs/folder for accuracy and completeness