Skip to content

Comments

v1.1: Offline tests, zero-config DB, UI improvements, workout wizard, code review fixes#18

Merged
kavith-k merged 5 commits intomainfrom
v1.1/todo-improvements
Feb 14, 2026
Merged

v1.1: Offline tests, zero-config DB, UI improvements, workout wizard, code review fixes#18
kavith-k merged 5 commits intomainfrom
v1.1/todo-improvements

Conversation

@kavith-k
Copy link
Owner

@kavith-k kavith-k commented Feb 14, 2026

Summary

  • Offline test coverage: 67 new tests across sync endpoint validation (46), queue retry/overflow (11), and sync engine concurrency (10). Fixed a bug where isSyncing could get permanently stuck after an unhandled exception.
  • Remove DATABASE_PATH: App is now zero-config. Database path auto-detected: /data/workout-tracker.db in Docker, ./data/workout-tracker.db locally. Removed from env files, Docker config, CI, and Playwright config.
  • UI cleanup: Trimmed verbose text across 7 pages, removed "by exercise" history view, redesigned workout summary page with stats grid (exercises, sets, duration, volume), consolidated weight unit display (per-exercise toggle instead of per-set), empty default inputs.
  • Workout wizard redesign: Replaced the scrollable exercise list with a wizard-style flow showing one exercise at a time. Saves happen on navigation (Next/Previous/Jump/Finish), not on input change, eliminating form submission race conditions. New components: WorkoutWizard, ExerciseStep, WizardProgressBar, WizardBottomBar. Simplified offline queue by consolidating UPDATE_SET/SKIP_EXERCISE/UNSKIP_EXERCISE/UPDATE_UNIT into a single SAVE_EXERCISE action. Exercises without logged reps are implicitly skipped on workout completion.
  • Deployment docs: Added configuration, Docker setup, and HTTPS sections to README.
  • E2E fixes: Fixed PWA workbox glob warning, updated stale assertions from UI redesign, rewrote workout flow tests for wizard interaction.
  • Code review fixes:
    • WorkoutWizard: replaced array-length sync trigger with fingerprint-based change detection so server updates are picked up even when exercise count is unchanged
    • WorkoutWizard: extracted duplicated placeholder-set creation into createPlaceholderSet helper
    • WorkoutWizard: removed placeholder flash on online addSet -- server data now flows in via invalidateAll + syncFromServer without an intermediate placeholder
    • WorkoutWizard: save errors are now surfaced to the user as inline text instead of being silently swallowed
    • ExerciseStep: replaced plain getUnit() function with $derived rune for guaranteed reactivity when toggling units
    • Summary page: volume is now always displayed in kg, with lbs sets converted automatically
    • Sync endpoint + saveExercise action: tightened set ID validation to only skip negative IDs (offline placeholders) and return 400 for other invalid values

Test plan

  • All 206 unit tests pass
  • All 30 E2E tests pass
  • Lint clean (Prettier + ESLint)
  • Type check clean (svelte-check: 0 errors, 0 warnings)
  • Build succeeds

- Add 67 new tests for sync endpoint validation, queue retry/overflow,
  and sync engine concurrency (fix isSyncing crash bug with try/finally)
- Remove DATABASE_PATH env var; auto-detect /data/ (Docker) or ./data/ (local)
- Trim verbose UI text, remove "by exercise" history view, redesign
  workout summary with stats grid, consolidate weight unit display,
  empty default inputs
- Add deployment docs to README
- Fix E2E test warnings (PWA workbox glob, stale assertions, form race)
Replace the scrollable exercise list (which caused race conditions from
concurrent onchange form submissions) with a wizard-style flow. Each
exercise is shown individually with Next/Skip/Previous/Finish navigation.
Data saves happen on button press, not on input change.

New components: WorkoutWizard, ExerciseStep, WizardProgressBar,
WizardBottomBar. Simplified offline queue by consolidating UPDATE_SET,
SKIP_EXERCISE, UNSKIP_EXERCISE, UPDATE_UNIT into a single SAVE_EXERCISE
action. Exercises without logged reps are implicitly skipped on workout
completion.
@kavith-k kavith-k changed the title v1.1: Offline tests, zero-config DB, UI improvements v1.1: Offline tests, zero-config DB, UI improvements, workout wizard Feb 14, 2026
…me units, validation

- Replace array-length sync trigger with fingerprint-based change detection
  in WorkoutWizard, so server updates (e.g. placeholder IDs becoming real)
  are picked up even when exercise count stays the same
- Extract duplicated placeholder-set creation into createPlaceholderSet helper
- Remove placeholder flash on online addSet by skipping the placeholder and
  letting invalidateAll + syncFromServer bring in the real set
- Surface save errors to the user instead of silently swallowing non-OK
  responses; display inline error text above the bottom bar
- Replace plain getUnit() function with $derived rune in ExerciseStep for
  guaranteed reactivity when toggling units
- Convert lbs volume to kg in getWorkoutSummary so total volume is always
  displayed in kg on the summary page
- Tighten set ID validation in sync endpoint and saveExercise action: skip
  only negative IDs (offline placeholders), return 400 for other invalid values
@kavith-k kavith-k changed the title v1.1: Offline tests, zero-config DB, UI improvements, workout wizard v1.1: Offline tests, zero-config DB, UI improvements, workout wizard, code review fixes Feb 14, 2026
@kavith-k kavith-k merged commit b2c2f47 into main Feb 14, 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