Commit Graph

909 Commits

Author SHA1 Message Date
Alexander 6c4367b939 feat: add 7 new shopping icons and deploy hook
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
Alexander 71ae0a2212 fix: align MysterySelector buttons with site-wide design language
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
Alexander c439f2f6b0 feat: redesign LinksGrid with semantic theming, rounded corners, and new layout
- 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
Alexander a7491d6f08 fix: extend recipe hero images into status bar safe area
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
Alexander 29059b8197 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
Alexander 32a26f781e fix: compute round-off card visibility server-side to prevent flicker
Server pre-computes initialShowRoundOff from food log totals and goals.
SSR uses this value; client $effect sets hasHydrated=true after mount,
switching to the reactive $derived for live updates.
2026-04-09 21:13:08 +02:00
Alexander d8c472c594 feat: include custom meals in round-off combinatorial food pool
Custom meals are now resolved to per100g nutrition data and added
to the base food pool, allowing them to appear in 1-3 food combo
suggestions alongside pantry items and favorites.
2026-04-09 21:06:31 +02:00
Alexander f3f55f1cae feat: replace P/F/C text labels with Lucide macro icons across fitness routes
Use Beef (protein), Droplet (fat), Wheat (carbs) icons consistently in
ring graphs, macro bars, food cards, detail rows, ingredient lists, and
stats page. Add labelIcon snippet prop to RingGraph/StatsRingGraph. Show
macro split legend always (was hidden on mobile) and group it with the
title in horizontal layout.
2026-04-09 21:00:46 +02:00
Alexander 1e23ed02c2 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
Alexander 6029cfe18c feat: add food detail pages for OFF and custom meal sources
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
Alexander 765fbf4613 feat: add muscle visualization to exercise detail page
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
Alexander 234c3adcf3 feat: add concise bilingual overviews for all 254 exercises
- 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
Alexander 28f927126f feat: add recipe food detail route with hero image, favorites, and logged nutrition
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
Alexander c2af12c8d7 refactor: extract RingGraph, StatsRingGraph, MacroBreakdown components
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
Alexander 1b7eb4eb44 fix: use --color-text-on-primary for all primary button text
Replace hardcoded white/#fff text on --color-primary buttons with
var(--color-text-on-primary) for proper theme contrast across:
- nutrition meals page (create btn + modal buttons)
- history detail page (save btn + start workout btn)
- recipe page (active filter chips)
- nutrition quick-log confirm button
2026-04-08 21:44:36 +02:00
Alexander fb0a33daa3 feat: custom meal detail screen, favorites tab, enhanced food search detail
- 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
Alexander 1f20601103 feat: add Today quick-navigate button to nutrition and period tracker
Shows a Today button when not viewing current date/month. Nutrition
page button appears right-aligned in the date nav. Period tracker
button appears top-right of the calendar header with centered
month title and chevrons.
2026-04-08 20:46:58 +02:00
Alexander d8ae18ec5a fix: SSR improvements for nutrition desktop layout
Move favorites and recent foods fetching to server load (parallel with
existing queries). Replace client-side $effect DOM manipulation for
fitness-content max-width with reactive CSS variable in layout via
route detection. Removes client-side fetch-on-mount pattern.
2026-04-08 20:42:46 +02:00
Alexander 7be5161757 feat: add favorite toggle to food detail page
Heart button in food header to add/remove favorites via the
existing favorite-ingredients API. Checks status on load, toggles
optimistically with error handling.
2026-04-08 20:38:18 +02:00
Alexander a0eecbbbeb fix: remove tap highlight on interactive mobile elements
Add -webkit-tap-highlight-color: transparent to muscle heatmap,
water cups, exercise filter pills, and flip stats legend target
triangle 180 degrees.
2026-04-08 20:34:10 +02:00
Alexander a1ae8889f5 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
Alexander 30b6d537ac feat: desktop micronutrient card below water tracker
Micros use a snippet to render in two locations: inline inside the
daily-summary card on mobile (toggle accordion, unchanged), and as a
standalone always-visible card below the water tracker on desktop.
Also bumps desktop max-width to 1400px.
2026-04-08 20:13:08 +02:00
Alexander 4e5ff0f597 feat: two-column desktop layout for nutrition page
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
Alexander ead3a1a1cd fix: remove redundant back links from nutrition sub-pages
Header navigation and browser history already provide this
functionality — the inline back links were unnecessary clutter.
2026-04-08 16:58:37 +02:00
Alexander 72ed5ef016 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
Alexander 376fbf1ba7 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
Alexander 7fb47717f4 fix: macro split sidebar breakpoint to 750px, polish legend icons
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
Alexander 71a43475fa 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
Alexander ba5e08971d 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
Alexander 4a3e85bcf7 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
Alexander 47b690257e 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
Alexander 9af36b0c14 feat: add EN/DE internationalization to cospend section
Move cospend routes to parameterized [cospendRoot=cospendRoot] supporting
both /cospend (DE) and /expenses (EN). Add cospendI18n.ts with 100+
translation keys covering all pages, components, categories, frequency
descriptions, and error messages. Translate BarChart legend, ImageUpload,
UsersList, SplitMethodSelector, DebtBreakdown, EnhancedBalance, and
PaymentModal. Update LanguageSelector and hooks.server.ts for /expenses.
2026-04-08 15:46:01 +02:00
Alexander b7c7b37c94 feat: add Swiss German aliases for shopping list categorization
Add Rahm, Rüebli, Poulet, Cervelat, Crevetten, Weggli, Bürli, Zopf,
Glacé, Konfitüre, Nüsslisalat, Federkohl, Peperoni, and other Swiss
German terms to category items and alias map so they categorize correctly
instead of falling back to embedding similarity (e.g. Rahm→Schwamm).
2026-04-08 14:15:24 +02:00
Alexander 39ffe1732f fix: eliminate all 167 svelte-check warnings
Refactor page components to use $derived + invalidateAll() where data
is read-only or re-fetched after mutations. Suppress state_referenced_locally
for intentional patterns (form state, optimistic updates, pagination).
Fix a11y issues with role="presentation", add standard line-clamp properties,
remove unused CSS selectors and empty rulesets.
2026-04-08 14:06:15 +02:00
Alexander 5093db8281 fix: exclude today from nutrition stats to avoid incomplete data 2026-04-08 13:18:22 +02:00
Alexander 4bbd733968 feat: inline custom meals, calorie ring overflow animation, theme fixes
Add custom meals tab to inline food add section with search/meals toggle.
Animate calorie ring overflow (red) after primary fill completes, with
separate glow elements so red overflow glows red independently. Apply same
delayed overflow animation to macro progress bars. Replace hardcoded nord8
with --color-primary throughout nutrition page (today badge, ring, tabs,
buttons). Add custom clear button to FoodSearch, hide number input spinners
globally.
2026-04-08 13:15:48 +02:00
Alexander f4cb56291a feat: add nutrition statistics to fitness stats page
Add protein g/kg (7-day avg using trend weight), calorie balance
(surplus/deficit vs goal), diet adherence (since first tracked day),
and macro split rings with target markers to the stats dashboard.
2026-04-08 12:39:03 +02:00
Alexander 49cae21666 fix: use --color-text-on-primary for profile save button text 2026-04-08 11:38:01 +02:00
Alexander 686f6bd830 fix: close profile editor on save, reactively update period tracker
Profile editor closes on successful save. Period tracker visibility
uses a reactive savedSex state variable that updates on save, so
changing sex to female/male immediately shows/hides the tracker
without requiring a page refresh.
2026-04-08 11:32:50 +02:00
Alexander 0cca6948e6 fix: period tracker day count off by one due to timezone mismatch
ongoingDay compared today (local time with hours) against startDate
parsed as UTC midnight, causing Math.floor to undershoot by 1 day.
Use todayMidnight and parseLocal to normalize both to local midnight.
2026-04-08 11:28:02 +02:00
Alexander aaaff031ef fix: barcode scanner WASM initialization with eager loading and error handling
Use fireImmediately: true to load WASM eagerly during init instead of
lazily on first detect() call, catching load errors immediately. Bail
out after 5 consecutive detection errors instead of looping forever.
Remove verbose debug messages, keeping only error output.
2026-04-08 11:11:56 +02:00
Alexander cf62ce00fa fix: correct BLS 4.0 category mapping for food search results
The CATEGORY_MAP was based on BLS 3.x letter codes which were completely
reshuffled in version 4.0. This caused wrong categories like Schwarztee
showing "Wurstwaren" instead of "Getränke". Remapped all 20 letter codes
to match actual BLS 4.0 Hauptlebensmittelgruppen and regenerated blsDb.
2026-04-08 10:40:26 +02:00
Alexander 28fac452ed feat: add inline portion size editing and edit/delete action buttons on food cards
Pencil button toggles inline gram editor; second tap saves via PUT API.
Both edit and delete buttons appear on hover (bottom-right on desktop).
Removed separate checkmark save button in favor of toggling the pencil.
2026-04-08 10:33:29 +02:00
Alexander 3af9186a2f feat: show macro/calorie overflow with red reverse-fill indicators
When intake exceeds goals, macro bars show a red segment growing from
the right edge backwards and the calorie ring draws a red arc backwards
from the 100% mark, clearly visualizing the overrun amount.
2026-04-08 10:28:37 +02:00
Alexander 3c7bc03379 feat: add liquid tracking card to nutrition page with water cups and beverage detection
Track water intake via interactive SVG cups (fill/drain animations) using
BLS Trinkwasser entries for mineral tracking. Detect beverages from food log
(BLS N-codes + name patterns) and include in liquid totals. Configurable
daily goal stored in localStorage. Cups show beverage fills (amber) as
non-removable and water fills (blue) as adjustable.
2026-04-08 10:24:12 +02:00
Alexander 3df81be78f feat: store-based category sorting presets for shopping list
Add toggleable store presets (Coop Max-Bill Platz, Migros Seebach) that
reorder categories to match the physical store layout. Selection persisted
in localStorage.
2026-04-08 09:18:21 +02:00
Alexander 572eab1c8a feat: group icons by category in edit modal, reorder categories, mobile padding 2026-04-08 09:13:54 +02:00
Alexander 27a6e42f03 fix: reorder shopping list categories 2026-04-08 09:13:46 +02:00
Alexander e92fc1cc25 feat: shareable shopping list links with token-based guest access
- Generate temporary share links (default 24h) that allow unauthenticated
  users to view and edit the shopping list
- Share token management modal: create, copy, delete, and adjust TTL
- Token auth bypasses hooks middleware for /cospend/list routes only
- Guest users see only the Liste nav item, other cospend tabs are hidden
- All list API endpoints accept ?token= query param as alternative auth
- MongoDB TTL index auto-expires tokens
2026-04-08 09:04:58 +02:00
Alexander 423877073d feat: stronger checked-off effect, long-press edit modal, SyncIndicator icon
- Diagonal strikethrough line + lower opacity on checked cards
- Long press opens edit modal to manually assign category and icon (saved to DB)
- Replace floating status toasts with inline SyncIndicator (Cloud/CloudOff/RefreshCw)
- Move category count badge next to title instead of right-aligned
2026-04-08 08:21:42 +02:00