Commit Graph

42 Commits

Author SHA1 Message Date
Sven (AAMOS AI) 53c9d9d01d feat(mobile): klickbara högtids-chips som söker högtidsmaten (MIKRO E2)
CI / Typecheck, test & build (push) Failing after 47s
2026-08-14 22:51:52 +07:00
Sven (AAMOS AI) cd6a9eb556 feat(mobile): redigera kost/allergier/religion i profilen när som helst (MIKRO 63)
CI / Typecheck, test & build (push) Failing after 43s
2026-08-14 21:17:55 +07:00
Sven (AAMOS AI) f102288676 feat(mobile): välj religiös kosthållning (halal m.fl.) i onboarding – filtrerar fläsk (MIKRO 62)
CI / Typecheck, test & build (push) Failing after 42s
2026-08-14 20:53:35 +07:00
Sven (AAMOS AI) 1e6407d9e6 feat(mobile): slutför-profil-prompt samlar kost & allergier progressivt (MIKRO 57)
CI / Typecheck, test & build (push) Failing after 42s
2026-08-14 18:59:39 +07:00
Sven (AAMOS AI) 9390cc0e66 fix(mobile): receptdetalj på användarens språk (MIKRO 56)
CI / Typecheck, test & build (push) Failing after 43s
2026-08-14 18:56:42 +07:00
Sven (AAMOS AI) 1f67e1532f polish(mobile): cooking-avbryt, scan-review useEffect, stack-titlar, död kod (MIKRO 55)
CI / Typecheck, test & build (push) Failing after 42s
2026-08-14 18:45:36 +07:00
Sven (AAMOS AI) d95c67d979 fix(mobile): plan/hushåll/profil felhantering + streckkod pausar kamera (MIKRO 54)
CI / Typecheck, test & build (push) Failing after 42s
2026-08-14 18:38:15 +07:00
Sven (AAMOS AI) 13689d5f8e fix(mobile): Nya förslag bläddrar bland recept + laddindikator (MIKRO 53)
CI / Typecheck, test & build (push) Failing after 44s
2026-08-14 18:31:41 +07:00
Sven (AAMOS AI) 491daace86 fix(mobile): onError på 15 mutationer – inga tysta miss (MIKRO 52)
CI / Typecheck, test & build (push) Successful in 1m37s
2026-08-14 18:03:36 +07:00
Sven (AAMOS AI) ea1f9a113a fix(scan): timeout i uploadImage + rätt API_BASE_URL så mock-upload når telefonen (MIKRO 51)
CI / Typecheck, test & build (push) Successful in 1m36s
2026-08-14 17:49:40 +07:00
Sven (AAMOS AI) bea9f54ed5 fix(mobile): visa fel när samtyckestoggeln fallerar (tyst miss förut)
CI / Typecheck, test & build (push) Successful in 1m36s
2026-08-14 05:46:28 +07:00
Sven (AAMOS AI) f5aeb28a24 fix(mobile): tydlig bakåt-etikett (Tillbaka) istället för (tabs) i navigationen
CI / Typecheck, test & build (push) Successful in 1m34s
2026-08-14 05:38:29 +07:00
Sven (AAMOS AI) 72b1d9d5a3 fix(mobile): samtyckesgrinden hämtar om status efter accept (fastnade annars)
CI / Typecheck, test & build (push) Successful in 1m35s
2026-08-14 05:29:01 +07:00
Sven (AAMOS AI) 815b400eea feat(mobile): ny slogan på inloggningen – Mindre svinn, mindre stress, mer kvar i plånboken
CI / Typecheck, test & build (push) Successful in 1m39s
2026-08-14 04:11:29 +07:00
Sven (AAMOS AI) 5f9526cb07 fix(mobile): keyboard-avoidance i Screen så formulär inte göms bakom tangentbordet (FAS 35)
CI / Typecheck, test & build (push) Successful in 1m40s
2026-08-14 04:01:44 +07:00
Sven (AAMOS AI) e3d50707e8 feat(mobile): veckoplan – skapa inköpslista från planen (stänger plan→laga→handla-loopen)
CI / Typecheck, test & build (push) Successful in 1m34s
2026-08-14 03:12:49 +07:00
Sven (AAMOS AI) 4d9c69d0ce feat(mobile): veckoplan – markera lagad/hoppa över (smart omplanering) + aktivera plan
CI / Typecheck, test & build (push) Successful in 1m48s
2026-08-14 02:48:18 +07:00
Sven (AAMOS AI) c5f8d63964 feat(mobile): veckoplan – hämta plan, rendera dagens måltider + generera-knapp med polling
CI / Typecheck, test & build (push) Successful in 1m34s
2026-08-14 02:38:59 +07:00
Sven (AAMOS AI) ebc3b75cea i18n(mobile): plan.portions i 12 locales
CI / Typecheck, test & build (push) Successful in 1m34s
2026-08-14 02:01:04 +07:00
Sven (AAMOS AI) e6c5d3bb08 feat(mobile): veckoplan-skärm scaffold (månadsheader + veckostrip + dagsvy) + flik
CI / Typecheck, test & build (push) Successful in 1m34s
2026-08-14 01:47:33 +07:00
Sven (AAMOS AI) 435af14bc4 i18n(mobile): nycklar för veckoplaneraren (tabs.plan, plan.today, plan.emptyDay) i 12 locales
CI / Typecheck, test & build (push) Successful in 1m35s
2026-08-14 01:30:26 +07:00
Sven (AAMOS AI) c32a7e33c7 ci: trigga på master + formatfix inför Gitea Actions
CI / Typecheck, test & build (push) Failing after 2s
2026-08-13 17:25:14 +07:00
Sven (AAMOS AI) 61d60931ad feat(mobile): tallriksfoto → meal-review + i18n (otestad, väntar Expo-test) 2026-08-13 07:04:10 +07:00
Sven (AAMOS AI) ceaa52a097 feat(mobile): consent-texter pa 11 sprak 2026-08-13 02:31:25 +07:00
Sven (AAMOS AI) dd715c3f61 feat(mobile): consent-gate i auth-flödet 2026-08-13 02:17:52 +07:00
Sven (AAMOS AI) e88bbb50a6 feat(mobile): ConsentScreen + consent api 2026-08-13 02:14:03 +07:00
Sven (AAMOS AI) f86a37dd33 S5: onboarding → minne + smaksignaler (user_stated) 2026-08-11 04:43:43 +07:00
Sven (AAMOS AI) 74f95daab2 feat(3d): meal-box merge, stored mutations, undo, mobile undo UI + i18n ×12
- Merge leftovers into existing meal_box when same recipeId + cookedAt date + frozen + available.
- Store mealBoxMutations JSONB on cooking_sessions for deterministic undo.
- Undo decrements portions/remaining, discards box at zero, appends correction ledger rows.
- Mobile: undo button in cooking/[id].tsx after-flow and meal-boxes.tsx within 24h window.
- i18n undo strings across all 12 locales; parity test green.
- 6 new integration tests: merge, no cross-date merge, frozen split, undo restore, undo discard, ledger invariant.
- Update FAS3 audit doc with 3d semantics.

Closes Fas 3d
2026-08-07 17:04:42 +07:00
Sven (AAMOS AI) 0078084a2b field-fix: POST/PUT/PATCH without body sends '{}' in mobile api helper
- api() in apps/mobile/src/lib/api.ts now sends JSON.stringify({}) for
  methods with a body slot when no body is provided, instead of sending
  undefined with content-type: application/json.
- Fixes scan start crash (POST /v1/scans/:id/start) and latent
  resend-verification crash (POST /v1/auth/resend-verification).
- Server strictness left intact; uploadImage unchanged.
- Added unit tests for GET/HEAD/POST/PUT body behaviour.
2026-08-07 15:39:46 +07:00
Sven (AAMOS AI) 8637eaa6c3 3c-fix: partial consumption now deducts eaten + leftovers
- consumptionPortions = min(planned, actualPortionsEaten + leftoverEstimatePortions).
  Meal boxes are a subset of leftovers; raw inventory is only retained for
  portions that were never cooked.
- Added validation leftoverEstimatePortions >= mealBoxPortions with localized
  400 error (cooked.leftoverLessThanBox) in server i18n + all 12 locales.
- Removed unused COOKING_SESSION_STATUSES / MEAL_BOX_STATUSES imports from
  apps/api/src/lib/cooking.ts.
- Hardened test cleanup to delete mealBoxes/meals/recipeCooks/cookingSessions
  by household before dropping storageLocations.
- New regression tests: meal-box double-counting, eaten+leftover split, and
  leftover < box rejection.
- Updated FAS3-COOKING-SESSIONS-AUDIT.md with corrected physics semantics.
2026-08-07 15:35:25 +07:00
Sven (AAMOS AI) cb493010d0 3c: partial consumption + undo for cooking sessions
- Append-only undo via correction transactions tied to cookingSessionId.
- POST /v1/cooking-sessions/:id/undo with 24h UTC window (409 + i18n after expiry).
- Complete undo scope: meals removed, meal boxes discarded, recipe_cooks
deleted, cookCount decremented; activation milestones left intact.
- Deterministic assumption-profile rollback via lastSessionAnswers.sessionId;
profile deleted when observationCount reaches 0.
- New status 'undone' as TEXT validated against COOKING_SESSION_STATUSES.
- Analytics event cooking_session_undone + domain events MEAL_BOX_DISCARDED,
MEAL_REMOVED, COOKING_SESSION_UNDONE.
- Partial consumption uses actualPortionsEaten/plannedPortions factor.
- i18n coverage for cooked.undoWindowExpired across all 12 locales + server.
- Invariant tests: computeBalance(transactions) === item.quantity after
complete, undo, and undo + new complete; transaction count increases on undo.
- Migration 0014_expand_event_types.sql adds new enum values.
- Updated FAS3-COOKING-SESSIONS-AUDIT.md with chosen semantics.
2026-08-07 05:47:54 +07:00
Sven (AAMOS AI) bbe7526ef3 fix(3b): delad kompletteringsväg för legacy /cook + deterministiska cooking-assumptions
- cookRecipeInputSchema utökas med actualPortionsEaten, leftoverEstimatePortions, leftoverNote
- completeCookingSession-wrapper i apps/api/src/lib/cooking.ts hanterar summavalidering,
  persistens av svar, profiluppdateringar och analytics (started+completed) för båda vägarna
- Legacy POST /v1/recipes/:id/cook använder wrappern med emitStartedEvent
- GET /v1/recipes/:id/cooking-assumptions väljer deterministiskt bland icke-valfria ingredienser
- i18n: nyckel cooked.portionsSumExceedsPlanned i samtliga 12 lokaler + server-i18n
- Nya tester för legacy /cook och cooking-assumptions med valfri första ingrediens

Refs: steg 3b-fix, granskningsrunda 2026-08-07
2026-08-07 05:13:35 +07:00
Sven (AAMOS AI) e46281b9b5 Fas 3 steg 3b: minimala efterfrågor + hushållsantagandeprofiler per ingrediens 2026-08-07 03:56:41 +07:00
Sven (AAMOS AI) 4a4f448e1c Fas 2 steg 5: Scan-to-scan-diff + konfliktlösning, samt buggfix depleted-transaktion i reconciliation 2026-08-07 01:30:31 +07:00
Sven (AAMOS AI) 218bc44d08 Fas 2 steg 4: Quick Reconciliation (motor, API, app + 12-språks i18n) 2026-08-07 01:02:08 +07:00
Sven (AAMOS AI) 4385fe5125 Fas 2 steg 3: Household Trust Score (admin + i18n status i appen) 2026-08-06 23:45:28 +07:00
Sven (AAMOS AI) dd66ebedbf Bugfix: what-to-eat utan hushall ger forslag; onboarding mal kan valjas multi 2026-08-06 21:32:32 +07:00
Sven (AAMOS AI) 03e30755dc Förberedelse fas 2: testmiljö fix + analytics tracker i mobilappen 2026-08-06 16:46:30 +07:00
Sven (AAMOS AI) bd8df59138 Fas 1b punkt 6: First Scan Coach + aktiveringsmätning 2026-08-06 04:14:49 +07:00
Sven (AAMOS AI) 2f3cdf8016 FAS 1b: Progressive onboarding (3-layer flow)
- Add PROGRESSIVE_ONBOARDING feature flag to KNOWN_FLAGS
- Add onboarding_step column to users table (a/b/c)
- New backend endpoints:
  - GET /v1/onboarding/status – check current step + feature flag
  - POST /v1/onboarding/quick-start – complete Step A (goal + precision)
  - POST /v1/onboarding/complete-b – complete Step B (diet, allergens, household)
  - POST /v1/onboarding/complete-c – complete Step C (health profile)
  - POST /v1/onboarding/skip – GDPR-friendly skip
- Refactor mobile onboarding screen into 3 progressive layers
- Update auth store with onboardingStep state
- Update tab layout to only block on Step A
- Update registration to set onboardingStep='a'
- Add i18n keys for Step B/C titles across all 12 locales
- Add Zod validation schemas (quickStartInputSchema, onboardingStatusSchema)
- Add tests for validation and feature flag
- Preserve existing /v1/me/onboarding for backward compatibility
- Migration: 0004_progressive_onboarding.sql
2026-08-06 00:40:59 +07:00
Sven (AAMOS AI) d627014425 Fas 1a: product analytics schema + GDPR controls 2026-08-05 19:51:37 +07:00
Sven (AAMOS AI) ac5340195a Initial commit (unpacked platform) 2026-08-05 19:21:11 +07:00