Commit Graph

114 Commits

Author SHA1 Message Date
1d798c94bf fix(rosary): trigger haptic on pointerup so iOS Safari vibrates
WebKit's hidden <input type="checkbox" switch> haptic trick is gated on
tap-completion, not tap-start. Firing on pointerdown ran the programmatic
click() before iOS committed to "this is a tap" so the switch-toggle
haptic was suppressed. pointerup lands inside iOS's tap-completion
window — still earlier than click (no movement filter, no 300ms wait).
Android native bridge path is unaffected.
2026-04-13 10:54:07 +02:00
61681dd556 feat(nutrition): reactive quick-log recents and favorites
All checks were successful
CI / update (push) Successful in 3m43s
Derive recents from current-day entries merged with historical
server data so logging a food updates the quick-log bar instantly.
FoodSearch now emits onfavoritechange so toggling a heart keeps
the quick-log favorites tab in sync without reloading.
2026-04-13 09:52:31 +02:00
84b45a6d2a feat(fitness): replace ExercisePicker dropdowns with icon pills
Align muscle group and equipment filters in the exercise picker
with the rest of the fitness UI — horizontal pill scrollers, multi-
select, with Lucide icons for each equipment type.
2026-04-13 09:52:25 +02:00
6c160bc6cf feat(nutrition): change meal of logged food via edit pills or drag-and-drop
Edit mode now shows a pill row (breakfast/lunch/dinner/snack with their
icons) beneath the grams input so the entry can be moved to another meal.
Food cards are also draggable; dropping onto a different meal section
optimistically moves the entry (rolls back on API error). Desktop/pointer
only — touch devices use the pill row.
2026-04-13 09:34:47 +02:00
63a10df7c5 feat(fitness): support repeat groups in interval training templates
All checks were successful
CI / update (push) Successful in 4m8s
Allow users to nest steps inside a repeat group (e.g. "5×: 30s sprint,
60s recovery") when building GPS interval templates. Groups are tagged
{ type: 'group', repeat, steps } alongside flat { type: 'step' } entries
and capped at one nesting level. Entries are expanded into a flat list
before handing off to the native Android TTS/interval service, so the
runtime state machine is unchanged.
2026-04-13 09:17:55 +02:00
6e48cfd27c feat(fitness): classify exercises by type and redesign filter UI
Distinguish stretches, strength, cardio, and plyometric exercises
with a curated `exerciseType` field that overrides mislabels in
ExerciseDB for the hand-curated stretch set. Surface the type as
pills on the detail page and as a filter toggle on the list page.

Replace the muscle-group and equipment dropdowns with horizontally
scrolling pill rows; equipment pills carry Lucide icons, and the
type toggle shows a flexed-bicep / person / layers glyph. Selected
muscle groups hoist to the front of the scroller.
2026-04-13 08:59:12 +02:00
5416110e81 feat(recipes): redesign cake-form and baking info with collapsible card pattern
All checks were successful
CI / update (push) Successful in 3m38s
Viewer: cake-form adjust now collapses into a summary trigger with live
factor badge; shape picker replaced with icon-only tiles that flex to
fill the row; numeric inputs gain inline cm suffix; restore-default link
appears when user deviates from the default. Editor: default-Backform
config mirrors the same card + tile pattern (adds "none" tile), plus
inline cm suffixes. Baking info row in instruction editor becomes a
click-to-reveal card with summary chips, mode presets, and editable
fields behind the chevron.
2026-04-12 21:46:51 +02:00
49665c94db feat: align recipe edit page with viewer design
All checks were successful
CI / update (push) Successful in 3m49s
Replace CardAdd with EditTitleImgParallax so /rezepte/edit/[name]
mirrors the hero-parallax layout of /rezepte/[name]. Add Lucide icons
and a width-constrained info-card grid to CreateStepList's additional
info section. Refactor the English translation view to use semantic
theme vars, side-by-side German/English field comparison, and a card
aesthetic matching the rest of the site.

Fix portions binding bug where the shared portions store was being
written by both language ingredient lists. CreateIngredientList now
accepts a bindable portions prop; the English list uses it with
useStore=false to stay isolated from the German value.
2026-04-12 21:22:53 +02:00
be7880304c feat: add tactile haptic feedback to rosary prayer cards
All checks were successful
CI / update (push) Successful in 3m56s
Every prayer card now vibrates on tap — non-decade cards advance to the
next section, decade cards increment the Ave Maria counter with auto-scroll
at 10. Two profiles (bead vs card) give distinct tactile feel; the 10th
bead fires the heavier card haptic to mark decade completion.

Native Android path via AndroidBridge.forceVibrate uses VibrationAttributes
USAGE_ACCESSIBILITY so vibration bypasses silent / Do-Not-Disturb inside
the Tauri app. Browser falls back to the web-haptics npm package. Haptic
fires on pointerdown with touch-action: manipulation for near-zero tap
latency; state change stays on click so scroll gestures don't advance.

- Remove CounterButton (whole card is now the tap target)
- Replace emoji with Lucide BookOpen icon, restyle citation as an
  understated inline typographic link (no background chip)
- Drop decade min-height leftover from the pre-auto-advance layout

Bumps site to 1.27.0 and Tauri app to 0.5.0 (new Android capability).
2026-04-12 20:15:40 +02:00
8023a907de fix: adjust LinksGrid nth-child offsets for earlier, more frequent color pops
Shift pop-b and pop-c selectors so accent colors appear sooner in the
grid and the light/white pop-c repeats more frequently (every 5th
instead of every 7th item).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 21:34:23 +02:00
35a98f6a0a feat: add chat.bocken.org link to homepage links grid
All checks were successful
CI / update (push) Successful in 3m39s
2026-04-11 19:39:32 +02:00
b4da24b572 feat: add hold timer for timed exercises with full sync support
All checks were successful
CI / update (push) Successful in 3m32s
- Play/Stop button replaces checkmark for duration-only exercises
- Green countdown bar with auto-completion and rest timer chaining
- Display duration in seconds (SEC) instead of minutes for holds
- ActiveWorkout model now preserves distance/duration fields on sync
- Hold timer state syncs across devices via SSE
- Workout summary shows per-set hold times for duration exercises
- Template diff compares and displays duration changes correctly
2026-04-11 17:40:58 +02:00
a5daae3fc9 fix: add 15 stretching exercises to exercise database
Exercises used by the Day 6 stretching template were only in
exercisedb-map.ts but missing from exercises.ts, causing the
template detail to show raw IDs instead of proper names.
2026-04-11 16:14:34 +02:00
3b11cb9878 feat: record cadence from step detector during GPS workouts
All checks were successful
CI / update (push) Successful in 3m43s
Use Android TYPE_STEP_DETECTOR sensor in LocationForegroundService to
count steps in a 15s rolling window. Cadence (spm) is computed at each
GPS point and stored alongside lat/lng/altitude/speed. Session detail
page shows cadence chart when data is available.

No additional permissions required — step detector is not a restricted
sensor. Gracefully skipped on devices without the sensor.
2026-04-11 15:28:27 +02:00
b209f6e936 feat: add elevation chart and gain/loss stats to GPS workout detail 2026-04-11 15:17:34 +02:00
9527c253ed feat: add template library for browsing and adding defaults
All checks were successful
CI / update (push) Successful in 3m55s
Replace auto-seed with a browsable template library. Users can
selectively add built-in templates to their collection via a
BookOpen icon or the empty-state prompt. Each library template
tracks its origin via libraryId to prevent duplicates.

- Extract default templates to shared $lib/data/defaultTemplates.ts
- Add GET/POST /api/fitness/templates/library endpoint
- Add library modal with add/added state per template
- Keep seed endpoint as fallback (imports from shared data)
2026-04-11 15:02:58 +02:00
8591e5cff7 feat: add Day 6 stretching template to seed defaults
Full-body stretching session (~30 min) covering all major muscle
groups with 15 bodyweight exercises: neck, shoulders, chest, back,
spine, hips, hamstrings, quads, glutes, calves, and arms.
Each exercise has 2 sets of 60-90s holds with 15s rest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 13:17:05 +02:00
0b86f72d92 feat: project exercise kcal from next scheduled template
All checks were successful
CI / update (push) Successful in 4m2s
When no workout is logged for the day, look up the next template
in the schedule rotation and show the kcal from its most recent
session as a projection. Tappable toggle includes/excludes it
from the calorie goal, ring, and macro bars for meal planning.
2026-04-11 13:11:32 +02:00
e0b932127d fix: increase shopping icon sizes for better visibility
All checks were successful
CI / update (push) Successful in 3m51s
List icons: 44→56px desktop, 36→48px mobile.
Icon picker modal: 42→56px grid cells.
2026-04-11 10:19:17 +02:00
ae33591529 feat: add 11 new shopping icons and processing script
All checks were successful
CI / update (push) Successful in 3m54s
Add processed icons for glasnudeln, grünkohl, kokosnuss, lychee,
mangold, pak choi, pastinaken, reisnudeln, rettich, stroh 80, and
topinambur. Add ImageMagick script to remove Gemini watermark and
black background from raw icons. Update catalog and re-embed.
2026-04-11 09:33:09 +02:00
77badc6a36 fix: make macro progress bar labels concise with goal context
All checks were successful
CI / update (push) Successful in 3m58s
Show remaining as "10/150g left" and over as "10g over 150g".
Remove redundant per-day goal from label. Shorten "remaining" to "left".
2026-04-11 08:44:26 +02:00
1265647963 fix: use Atwater calories for consistent macro/calorie tracking
All checks were successful
CI / update (push) Successful in 3m41s
Calorie ring and macro progress bars now both use Atwater-derived
calories (P×4 + F×9 + C×4) instead of DB calories, so hitting all
three macro goals guarantees hitting the calorie goal exactly.

Also: show full daily TDEE (not time-based), show BMR/NEAT multiplier
breakdown in info tooltip, display macro goal grams on progress bars,
fix TDEE tooltip z-index on desktop.
2026-04-10 21:22:24 +02:00
ee4eda7a32 feat: restyle recipe info cards with grid layout and lucide icons
All checks were successful
CI / update (push) Successful in 3m42s
Align recipe metadata cards with site-wide design language using
surface colors, borders, and rounded corners. Add distinct lucide
icons per card type (Timer, Wheat, Croissant, Flame, CookingPot,
UtensilsCrossed) and switch from flex-wrap to CSS grid for uniform
card widths.
2026-04-10 20:55:48 +02:00
637a918dd8 feat: replace all native date inputs with custom DatePicker component
All checks were successful
CI / update (push) Successful in 3m36s
Add theme-aware DatePicker with pill display, calendar dropdown, prev/next
day arrows, bilingual month/weekday names, and min/max support. Replace all
15 native <input type="date"> elements across fitness, tasks, and cospend.
2026-04-10 08:36:33 +02:00
0ad72ddf24 fix: compute macro targets dynamically from protein goal and body weight
All checks were successful
CI / update (push) Successful in 4m3s
Fat/carb percentages were stored as absolute values that didn't account
for protein g/kg varying with body weight. Now protein calories are
computed first, and remaining calories are split between fat and carbs
by their stored ratio — guaranteeing all macros sum to the calorie goal.

Exercise burned calories also flow into fat/carb targets via a new
effectiveCalorieGoal derived. Goal editor ring preview and labels
updated to show computed actual percentages.
2026-04-10 08:01:08 +02:00
89b3202dc5 fix: include exercise calories in diet adherence calculation
All checks were successful
CI / update (push) Successful in 3m55s
Adherence was comparing intake against the flat calorie goal, ignoring
burned workout calories. Now the per-day target is goal + exercise kcal.
Also expanded workout query from 7 to 30 days to cover the full
adherence window.
2026-04-10 07:53:19 +02:00
0ae16ddd6d fix: correct week count in period tracker relative dates
All checks were successful
CI / update (push) Successful in 3m44s
Math.floor(days/7) was off by one — e.g. 12 days away showed "in 1 week"
instead of "in 2 weeks". Using Math.ceil matches colloquial usage.
2026-04-09 23:51:07 +02:00
fd137bc519 fix: show round-off suggestions on future days, not just today
Allow meal prep planning by relaxing the isToday check to isTodayOrFuture
in both SSR and client-side rendering of the round-off card.
2026-04-09 23:51:00 +02:00
2dfed11fd6 feat: add 7 new shopping icons and deploy hook
All checks were successful
CI / update (push) Successful in 3m36s
Add Gemini-generated icons: aperol, bulgur, emmentaler, magerquark,
quinoa, raeucherlachs, tortilla_wraps. Update catalog with 11 new
entries (including aliases), regenerate embeddings and categories.
Add post-commit hook to rsync shopping icons to bocken.org.
2026-04-09 23:09:09 +02:00
68349fbf46 fix: align MysterySelector buttons with site-wide design language
All checks were successful
CI / update (push) Successful in 3m50s
Replace hardcoded Nord values and manual dark/light overrides with
semantic CSS variables (--color-surface, --color-primary, --shadow-sm,
--radius-card, etc.). Use scale:1.02 hover pattern and remove all
@media(prefers-color-scheme) and :global(:root[data-theme]) blocks.
2026-04-09 22:08:14 +02:00
b5cbc3f74b feat: redesign LinksGrid with semantic theming, rounded corners, and new layout
Some checks failed
CI / update (push) Has been cancelled
- Use semantic CSS variables (--color-surface, --shadow-sm, etc.) instead
  of hardcoded Nord values and manual dark mode overrides
- Add border-radius and overflow:hidden for rounded card corners
- Move icon fill variables (--grid-fill-*) into app.css theme system:
  colorful (red/orange/green) in light, cool blues in dark
- Mottled fill distribution via prime-offset nth-child selectors
- Reorder homepage links: Recipes, Shopping, Fitness, Faith, Tasks first
- Add Nutrition direct link with heart-pulse icon
- Document site-wide design language in CLAUDE.md
2026-04-09 22:05:09 +02:00
62515b95f0 fix: extend recipe hero images into status bar safe area
All checks were successful
CI / update (push) Successful in 3m30s
Account for env(safe-area-inset-top) in the hero negative margin-top
so images fill the status bar area on edge-to-edge Android instead of
leaving empty space.
2026-04-09 21:33:53 +02:00
830a1f98a9 fix: use gradient overlay instead of box-shadow for status bar shadow
The box-shadow rendered outside the pseudo-element, placing the shadow
below the status bar boundary. Switch to a multi-stop linear gradient
inside the element so the shadow fades smoothly through the status bar
area (+20% overshoot for softer transition).
2026-04-09 21:31:26 +02:00
a1b80862f5 feat: add "round off this day" nutrition suggestions
Suggest optimal 1-3 food combinations to fill remaining macro budget using
weighted least-squares solver over a curated pantry (~55 foods) plus user
favorites/recents. Recipes scored individually (no combining). Features:

- Combinatorial solver (singles, pairs, triples) with macro-weighted scoring
- MealTypePicker component (extracted from quick-log, shared)
- Hero card with fit%, macro delta icons (Beef/Droplet/Wheat), ingredient
  cards, animated +/X toggle for logging
- Responsive layout: sidebar on mobile, center column on desktop
- MongoDB cache with ±5% tolerance, SSR on cache hit, TTL auto-expiry
- Cache invalidation on food-log/favorites/custom-meals CRUD
- Recipe per100g backfill admin endpoint
2026-04-09 20:47:32 +02:00
385e21b109 feat: add food detail pages for OFF and custom meal sources
All checks were successful
CI / update (push) Successful in 3m40s
Extend the nutrition detail page to support OpenFoodFacts items (looked up
by barcode) and custom meals (with ingredient breakdown). All food diary
cards and search results now link to detail pages regardless of source.
2026-04-09 18:17:43 +02:00
72b49baeab feat: add muscle visualization to exercise detail page
All checks were successful
CI / update (push) Successful in 3m42s
New MuscleMap component highlights primary muscles at full opacity and
secondary muscles at 40% using the existing body SVG diagrams. Only
renders front/back views that have active muscles.

Responsive layout: centered inline on mobile, sticky sidebar on desktop.
2026-04-09 00:27:05 +02:00
04284a7238 feat: add concise bilingual overviews for all 254 exercises
All checks were successful
CI / update (push) Successful in 3m34s
- Fix ExerciseDB data quality (remove empty calf raise, fix Wall Sit,
  correct muscles, typos)
- Rewrite verbose AI-generated English overviews to concise one-sentence
  descriptions
- Add German translations for all 199 EDB exercises (name, instructions,
  overview)
- Add English and German overviews for 55 static-only exercises
- Display overview above instructions on exercise detail page
2026-04-09 00:21:10 +02:00
133d121f84 feat: add recipe food detail route with hero image, favorites, and logged nutrition
All checks were successful
CI / update (push) Successful in 3m37s
Recipes logged in the food diary now link to a dedicated detail page at
/fitness/nutrition/food/recipe/{id} showing full nutritional breakdown,
hero image, and a link back to the recipe page. When opened from the
diary, the logged per100g snapshot is used; otherwise current recipe
nutrition is computed. Recipe favorites are now supported across the
favorite-ingredients API, nutrition lookup, and search endpoints.
2026-04-08 23:08:52 +02:00
9d8d1ec41f refactor: extract RingGraph, StatsRingGraph, MacroBreakdown components
All checks were successful
CI / update (push) Successful in 3m28s
Consolidate 6 duplicated instances of the SVG arc ring pattern into a
composable component hierarchy: RingGraph (base ring), StatsRingGraph
(ring with target markers), and MacroBreakdown (3 rings + kcal + detail
table). Removes ~400 lines of duplicated SVG/CSS from FoodSearch,
nutrition page, meals page, stats page, food detail page, and recipe
NutritionSummary.
2026-04-08 22:21:24 +02:00
48e277cf19 feat: custom meal detail screen, favorites tab, enhanced food search detail
All checks were successful
CI / update (push) Successful in 3m36s
- Replace inline amount row with full detail screen for custom meals
  showing calorie headline, macro rings, macro breakdown, and ingredients
- Add Favorites tab (with filter) between Search and Custom Meals tabs
- Search tab no longer prepends unmatched favorites
- Enhance FoodSearch selected view with macro rings and nutrient breakdown
- Add filter input to custom meals tab
- Document --color-primary/--color-text-on-primary in CLAUDE.md
2026-04-08 21:38:49 +02:00
54baf9eddb feat: quick-log sidebar with favorites and recent foods
Desktop sidebar (1600px+) for one-click food logging with inline amount
input. Favorites and recent items (last 3 days) shown with meal type
auto-selected by time of day. New /api/nutrition/lookup endpoint for
exact source+id food data retrieval. Parent container width override
via JS class toggle for reliable SvelteKit client-side navigation.
2026-04-08 20:30:13 +02:00
9150d1b8da feat: two-column desktop layout for nutrition page
All checks were successful
CI / update (push) Successful in 3m26s
At 1024px+, nutrition page switches from single-column (600px max) to a
two-column grid: sticky sidebar (summary, goals, water) + scrollable
meals column. Mobile layout unchanged via display:contents fallback.
2026-04-08 17:22:16 +02:00
6e161dc677 fix: remove redundant back links from nutrition sub-pages
All checks were successful
CI / update (push) Successful in 3m39s
Header navigation and browser history already provide this
functionality — the inline back links were unnecessary clutter.
2026-04-08 16:58:37 +02:00
340b4f6023 fix: calorie balance uses per-day TDEE from SMA trend weight + workout kcal
Balance is now intake minus estimated expenditure rather than intake
minus calorie goal. TDEE computed per day using that day's SMA trend
weight (Mifflin-St Jeor BMR × NEAT multiplier) plus tracked workout
calories, so a -500 kcal cut shows ~-500 on the balance card.
2026-04-08 16:58:15 +02:00
111fa91427 feat: replace browser confirm() with reusable ConfirmDialog component
Promise-based modal dialog with backdrop, keyboard support, and animations,
replacing all 18 native confirm() call sites across fitness, cospend, recipes,
and tasks pages.
2026-04-08 16:47:22 +02:00
a54c11145d fix: macro split sidebar breakpoint to 750px, polish legend icons
All checks were successful
CI / update (push) Successful in 3m40s
Lower desktop breakpoint from 1024px to 750px so the macro column
appears on more screens. Legend now uses horseshoe arc for actual
and rounded triangle for target.
2026-04-08 16:34:24 +02:00
6ad394d3a5 fix: invert shopping list icons to black in light mode
White PNG icons were invisible on light backgrounds. Added semantic
--shopping-icon-filter variable (invert(1) in light, none in dark)
applied to card and picker icons.
2026-04-08 16:30:06 +02:00
74d5562fed feat: desktop layout — macro split sidebar next to muscle heatmap
On desktop (≥1024px), protein/balance/adherence cards sit in a row above
the muscle heatmap, with the macro split card as a vertical sidebar on the
right spanning the full height. Includes ring/triangle legend for
actual vs target. Mobile layout unchanged.
2026-04-08 16:26:02 +02:00
61d80fe0bc feat: add info popover tooltips to calorie balance and adherence cards
Clicking the (i) icon on the calorie balance or adherence card now shows
a floating popover explaining how each metric is calculated, with EN/DE
translations.
2026-04-08 16:14:58 +02:00
41a9a0828c feat: auto-track liquids from custom meal ingredients in hydration tracker
When logging a custom meal, liquid ingredients (BLS drinks, water, beverages)
are detected and their volume stored as `liquidMl` on the food log entry.
The liquid tracker cups and list now include these meal-sourced liquids.
2026-04-08 16:06:12 +02:00