Commit Graph

664 Commits

Author SHA1 Message Date
785341bf0b fitness: match WorkoutFab rest timer style to active page RestTimer
All checks were successful
CI / update (push) Successful in 2m1s
2026-03-23 22:18:22 +01:00
0f79170f02 fitness: add offline support with session queue and shell caching
All checks were successful
CI / update (push) Successful in 2m3s
Cache fitness page shells and data routes in the service worker so
pages load offline. Queue finished workouts in IndexedDB when the
POST fails and auto-flush them on reconnect. Show an offline banner
on the completion screen so the user knows their workout will sync.
2026-03-23 22:15:42 +01:00
621aa46cda homepage: move docs to its previous place
All checks were successful
CI / update (push) Successful in 2m2s
2026-03-23 21:27:10 +01:00
2f31f3cc19 faith: fix typos in confiteor
All checks were successful
CI / update (push) Successful in 2m4s
2026-03-23 19:55:39 +01:00
831e6d158b homepage: move fitness page up on the page
All checks were successful
CI / update (push) Successful in 2m6s
2026-03-23 19:52:57 +01:00
069d524d3e fix: resolve Svelte a11y and reactivity build warnings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:45:27 +01:00
3e2ba107e3 android: enable offline sync and hide theme toggle in Tauri app
All checks were successful
CI / update (push) Successful in 2m2s
Detect Tauri via __TAURI__ in pwaStore so the offline recipe sync,
image caching, and auto-sync activate in the Android shell.
2026-03-23 17:38:29 +01:00
92578a0419 app: follow system theme, remove toggle
Some checks failed
CI / update (push) Has been cancelled
2026-03-23 17:37:04 +01:00
5e48dc6f08 android: use bocken.org for production builds instead of local IP
All checks were successful
CI / update (push) Successful in 2m2s
2026-03-23 17:28:07 +01:00
b9c68b48c3 android: fix duplicate plus icon and button contrast in dark mode
Remove Plus icon from Add Exercise button (translation already includes +).
Use --primary-contrast instead of hardcoded white for button text so it's
legible in dark mode (nord0 on dark, white on light).
2026-03-23 17:13:49 +01:00
4ba3960607 android: native GPS tracking with foreground service for screen-off support
Move GPS collection from WebView JS (watchPosition) to native Android
LocationForegroundService, which survives screen-off. JS polls native
side for accumulated points. Also: auto-enable GPS for cardio exercises,
filter saved track to workout duration only, fix live map batch updates,
notification tap opens active workout, and fix build script for pnpm.
2026-03-23 17:05:15 +01:00
748537dc74 android: add Tauri v2 shell with GPS tracking for cardio workouts
Wraps the web app in a Tauri Android shell that provides native GPS
via the geolocation plugin. Includes foreground service for background
tracking, live map display, GPS data storage in workout sessions,
and route visualization in workout history.
2026-03-23 17:03:14 +01:00
08bd016404 fitness: add speed-based MET tables for swimming and rowing kcal estimation
All checks were successful
CI / update (push) Successful in 2m9s
Add SWIMMING_METS and ROWING_METS lookup tables from Ainsworth
Compendium for speed-based calorie estimation when distance+duration
are available. Add per-exercise flat-rate fallbacks (FLAT_RATE map)
instead of hardcoded if/else chains.
2026-03-23 12:37:06 +01:00
1f83b451de fitness: improve workouts chart with goal line, max bar width, and full 10-week range
Some checks failed
CI / update (push) Has been cancelled
Add weekly goal as a solid horizontal line on the bar chart via a
custom Chart.js plugin. Cap bar width at 40px. Always show all 10
weeks including empty ones instead of trimming leading zeros.
2026-03-23 12:35:50 +01:00
3ef61c900f fitness: add cardio kcal estimation with Minetti/Ainsworth models
Add cardioKcalEstimate.ts implementing tiered calorie estimation for
cardio exercises: Minetti gradient-dependent polynomials for GPS
run/walk/hike, cycling physics model, MET-based fallbacks from
Ainsworth Compendium, and flat-rate estimates. Wire cardio kcal into
SessionCard, workout completion screen, history detail, and stats
overview API alongside existing strength kcal (Lytle). Move citation
info from stats overview to clickable DOI links on workout detail
kcal pill.
2026-03-23 12:26:19 +01:00
0ba22b103b fitness: add streak aura with fire and lightning effects on stats page
Separate streak counter from stat tiles into its own component with
animated aura effects: glow (1w), particles (2w), fire (3w), and
fire + lightning bolts (6/12/24w). Fire animations tuned for energetic
workout feel with faster durations and upward-anchored scaling.
On desktop, streak sits beside the workouts chart; on mobile, above it.
2026-03-23 12:25:51 +01:00
9f45a1525b fitness: add kcal estimation based on Lytle et al. (2019) regression model
Estimate strength workout energy expenditure using the Lytle et al. multiple
linear regression model. Maps all 77 exercises to 7 studied categories with
confidence levels. Shows kcal on stats page (cumulative), session cards,
workout detail, and workout completion screen. Supports sex/height demographics
via profile section on measure page. Includes info tooltip with DOI reference.
2026-03-23 10:23:06 +01:00
fd580ecfe7 replace ß with ss for Swiss High German throughout codebase
All checks were successful
CI / update (push) Successful in 2m5s
2026-03-23 07:46:42 +01:00
9a27e50495 fitness: add German translations for all 77 exercises
Add per-exercise de property with translated name and instructions.
Add shared term translation map for bodyPart, equipment, target, and
muscle names. Add localizeExercise() and translateTerm() helpers.
Update all display components to use localized fields (localName,
localBodyPart, localEquipment, etc.) and pass lang to search/lookup.
2026-03-23 07:44:35 +01:00
69b3ac2aa4 fitness: add weekly workout goal with streak counter on stats page
All checks were successful
CI / update (push) Successful in 2m3s
Store a per-user weekly workout target (1-14) in a new FitnessGoal model.
Compute consecutive-week streak from WorkoutSession history via a new
/api/fitness/goal endpoint. Display streak as a 4th lifetime card on the
stats page with an inline goal editor modal.
2026-03-22 21:56:54 +01:00
f5420badc1 fitness: add bilingual EN/DE support for all fitness routes and components
All checks were successful
CI / update (push) Successful in 2m4s
Use SvelteKit param matchers for bilingual URL routing (e.g. /fitness/stats
and /fitness/statistik). Add centralized i18n module with translation
dictionary, language detection from URL, and path conversion utilities.
Translate all UI text across pages, components, and navigation.
2026-03-22 21:25:03 +01:00
f83bc7fa1e fitness: add page titles to all fitness routes
All checks were successful
CI / update (push) Successful in 2m4s
2026-03-22 21:00:04 +01:00
852cb978fc fitness: restart rest timer when completing a new set while one is running
All checks were successful
CI / update (push) Successful in 2m4s
2026-03-22 19:54:02 +01:00
f4e8b5fe85 fitness: add RPE input to template editor 2026-03-22 19:48:48 +01:00
6eb8c305be fitness: move workout controls to FAB, track rest timer position in store
All checks were successful
CI / update (push) Successful in 2m5s
2026-03-22 19:44:25 +01:00
b8f2a1e098 fitness: rest timer dark styling, wider weight input, hide spinners, shorten PREV header
All checks were successful
CI / update (push) Successful in 2m7s
2026-03-22 19:37:19 +01:00
2ad93b5ad1 fitness: more space for map-preview 2026-03-22 15:54:03 +01:00
c5bfba5440 fitness: add exercise reorder buttons in template editor and active workout
All checks were successful
CI / update (push) Successful in 2m6s
2026-03-21 16:46:42 +01:00
56bb606740 fitness: move add-template to header, remove FAB, fix dark mode contrast
All checks were successful
CI / update (push) Successful in 2m3s
- Replace floating action button with a subdued + icon in the templates
  header row next to the Schedule button
- Use --primary-contrast (white/nord0) instead of hardcoded white for
  text on primary-colored backgrounds so dark mode has proper contrast
- Respect data-theme="light"/"dark" attrs in addition to prefers-color-scheme
2026-03-21 10:59:49 +01:00
6103bb75a0 fitness: add workout schedule rotation with next-workout suggestion
All checks were successful
CI / update (push) Successful in 2m2s
Users can define a custom order of templates (e.g., Push → Pull → Legs).
Based on the last completed session, the next workout in rotation is
recommended via a prominent banner and the floating action button.

- New WorkoutSchedule MongoDB model (per-user template order)
- GET/PUT /api/fitness/schedule API endpoints
- Schedule editor modal with reorder and add/remove
- Action button starts next scheduled workout when schedule exists
2026-03-21 10:53:44 +01:00
2bede967c2 fitness: rename to "Fitness" on homepage
All checks were successful
CI / update (push) Successful in 2m3s
2026-03-21 10:40:32 +01:00
17c7cd2cce fitness: offer to update template with new weights/reps on workout completion
All checks were successful
CI / update (push) Successful in 2m4s
When finishing a template-based workout, compares completed sets against
the source template. If weights, reps, or set counts differ, shows a
visual diff with old→new values and a button to update the template,
letting templates grow with the user's strength progression.
2026-03-21 09:44:44 +01:00
529d004516 fitness: fix template edit validation and allow empty sets
All checks were successful
CI / update (push) Successful in 2m6s
- Validate exerciseId instead of name (templates use exerciseId, not name)
- Remove mandatory reps minimum from template sets
- Allow exercises with empty sets in schema and API validation
2026-03-21 09:39:32 +01:00
81711f1f09 fix: cache auth session on locals to prevent cookies.set after response
All checks were successful
CI / update (push) Successful in 2m19s
The authorization hook already calls locals.auth() which can set cookies.
Layout server loads calling auth() again caused a race where cookies.set()
fired after the response started streaming. Now the hook stashes the session
on locals.session and all layouts reuse it.
2026-03-20 16:28:31 +01:00
82c4c39462 fitness: fix workout name input losing characters during sync
All checks were successful
CI / update (push) Successful in 2m12s
Decouple name input from live sync by using a local variable that only
commits to workout state on blur/Enter. Remote name updates are applied
only when the input is not focused, preventing the sync layer from
overwriting in-progress edits.
2026-03-20 16:21:08 +01:00
bdf2932bf3 fitness: theme-reactive chart colors, bar outline fix, and stats label polish
All checks were successful
CI / update (push) Successful in 2m17s
- Stats and exercise pages: chart colors adapt to light/dark theme reactively
- FitnessChart: remove bar outline (borderWidth 0 for bar type)
- Stats: workouts icon/card use --color-primary, plural-aware label, rename labels
2026-03-20 15:46:08 +01:00
2ba08c51c0 fitness: fix GPS preview aspect ratio, theme-reactive colors, and UI polish
All checks were successful
CI / update (push) Successful in 2m17s
- SessionCard SVG: cosine-corrected coordinates with proper aspect ratio (xMidYMid meet)
- SessionCard: use --color-primary for track/distance/pace, add Gauge icon for pace
- History detail: theme-reactive pace chart colors via MutationObserver + matchMedia
- History detail: add Gauge icon, accent color for distance/pace stats, remove "avg" label
- Move GPS remove button from info view to edit screen
- Add Leaflet map preview to edit screen
- Remove data points count from GPS indicators
2026-03-20 14:59:31 +01:00
fe7c9ab2fe fitness: disable chart grow-in animation, add trendlines to exercise charts
All checks were successful
CI / update (push) Successful in 2m16s
Disable initial animation on all Chart.js charts (FitnessChart and
cospend BarChart) while keeping transition animations for interactions.
Add linear regression trendline with ±1σ uncertainty bands to exercise
charts (Est. 1RM, Max Weight, Total Volume).
2026-03-20 13:44:04 +01:00
6835f5479e fitness: add GPX upload with map, pace chart, and km splits
All checks were successful
CI / update (push) Successful in 2m18s
Add GPX file upload for cardio exercises in workout history. Parses
GPX track points and stores them in the session. Shows route map
(Leaflet), pace-over-distance chart (Chart.js), and per-km splits
table with color-coded fast/slow pacing. Auto-fills distance and
duration on single-set exercises. Disables Chart.js animations.
2026-03-20 13:30:52 +01:00
0e5d6dceb9 fitness: add workout completion summary with PR detection
All checks were successful
CI / update (push) Successful in 2m6s
Show summary screen after finishing a workout instead of immediately
redirecting. Displays duration, tonnage, distance, per-exercise stats
(pace, e1RM, top weight), and detected PRs compared to previous session.
2026-03-20 07:14:24 +01:00
8522d5a444 fitness: make recorded measurements editable with history list
All checks were successful
CI / update (push) Successful in 2m16s
Show measurement history with edit/delete per entry. Editing reuses the
add form pre-filled with existing values and saves via PUT.
2026-03-20 07:00:57 +01:00
f57e5a19a5 fitness: require authentication for all fitness routes 2026-03-20 06:53:06 +01:00
bbe60c82a9 fitness: add inline rest timer, set removal, previous set improvements, and session editing
Redesign rest timer as inline bar with linear decay placed after completed set.
Add set removal (X button), @ separator column for RPE, and N/A for missing
previous values. Enable editing past workouts (date, duration, exercises, sets)
from the history detail page.
2026-03-20 06:50:23 +01:00
828d4a83b0 fitness: add per-exercise metrics, cardio support, and stats page
All checks were successful
CI / update (push) Successful in 2m0s
- Add metrics system (weight/reps/rpe/distance/duration) per exercise type
  so cardio exercises show distance+duration instead of weight+reps
- Add 8 new cardio exercises: swimming, hiking, rowing outdoor, cycling
  outdoor, elliptical, stair climber, jump rope, walking
- Add bilateral flag to dumbbell exercises for accurate tonnage calculation
- Make SetTable, SessionCard, history detail, template editor, and exercise
  stats API all render/compute dynamically based on exercise metrics
- Rename Profile to Stats with lifetime cards: workouts, tonnage, cardio km
- Move route /fitness/profile -> /fitness/stats, API /stats/profile -> /stats/overview
2026-03-19 18:57:52 +01:00
14da4064a5 add fzf-style fuzzy search to exercises, recipes, and prayers
All checks were successful
CI / update (push) Successful in 2m1s
Replace substring matching with a shared fuzzy scorer that matches
characters in order (non-contiguous) with bonuses for consecutive
and word-boundary hits. Results are ranked by match quality.
2026-03-19 10:10:38 +01:00
640a986763 fitness: fix duration display treating minutes as seconds
All checks were successful
CI / update (push) Successful in 1m58s
The DB stores duration in minutes but formatDuration was dividing
by 3600/60 as if receiving seconds, always showing 0m.
2026-03-19 09:46:25 +01:00
c9e8e9919c fitness: add multi-device workout sync via SSE and rest timer improvements
Enables real-time workout synchronization across devices using
Server-Sent Events and an ephemeral MongoDB document (24h TTL).
Rest timers now use absolute timestamps instead of interval-based
countdown for accurate cross-device sync. Adds +/-30s rest timer
adjust buttons.
2026-03-19 09:44:24 +01:00
292ec20320 fitness: limit workouts-per-week chart to 10 weeks and trim empty leading weeks
Reduce the chart window from 12 to 10 weeks and trim leading weeks
with zero workouts so the chart starts from the first week with data.
2026-03-19 09:14:47 +01:00
6c6abe9f6c fitness: fix light/dark theme with semantic CSS variables
All checks were successful
CI / update (push) Successful in 1m57s
Replace hardcoded Nord color references with semantic CSS variables
across all fitness components and pages. Use --color-primary instead
of --nord8 for interactive elements (auto-switches between --nord10
in light mode and --nord8 in dark mode). Change RPE color from
--nord13 (yellow) to --nord12 (orange) for better light mode contrast.
Fix mobile responsiveness on measure page form inputs.
2026-03-19 09:08:30 +01:00
48f381e215 fitness: fix type errors, hydration warning, and add gym link
All checks were successful
CI / update (push) Successful in 2m0s
- Add exerciseId to WorkoutSession model (interface + schema)
- Fix button-in-button hydration warning in TemplateCard (use div)
- Expand FitnessChart dataset type to include all Chart.js properties
- Fix getTime type error in session update with proper cast
- Fix weight nullable type in profile stats with non-null assertion
- Fix $or query typing in templates list endpoint
- Re-add gym link on homepage pointing to /fitness
2026-03-19 08:42:51 +01:00