- MealSlot.isSkipped: opcion "No planificar esta comida" en el picker de
hueco vacio — cuenta como resuelto (semana completa, notificaciones,
stats) y el autocompletado lo respeta; vista gris con guion, tap para
desmarcar; viaja en undo, snapshot KV (junto con isEatingOut, que
faltaba en el payload) y exports (— en imagen, omitido en texto)
- ShoppingItem.isDismissed: "Ya lo tengo" por ingrediente (swipe
izquierdo) y "Ya esta hecho" por plato entero (boton en la cabecera de
su seccion); van a la seccion "Ya en casa" con restauracion de un tap,
y quedan fuera del export de texto. No se borran porque reconcile los
recrearia
- Esquema CloudKit Development: CD_isSkipped, CD_isDismissed y el record
type CD_ShoppingItem entero, que no existia — la lista de la compra no
estaba sincronizando entre dispositivos (mismo bug que photoData)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- Header elegante: logo fijado a la izquierda y titulo centrado de verdad
(ZStack), fecha a la derecha
- School transpuesto: dias como columnas y comidas como filas — antes con
1-2 comidas quedaba media pagina A4 apaisada en blanco
- Default: las celdas del grid se expanden para llenar la pagina (mismo
sintoma de hueco que el school)
- Estilo nuevo "Story" (9:16, 2160x3840) para stories de IG/WhatsApp y
"Minimal (imprimir)" en A4 con lineas finas sin fondos (ahorro tinta)
- Picker del preview pasa de segmentado a chips desplazables (5 estilos)
- WeekPlanTextExporter + boton "Copiar como texto (WhatsApp)" en el
preview: menu semanal con *negritas* y emojis listo para pegar en
WhatsApp/Telegram (evento analytics format=text)
- Harness de render en tests: genera PNG de los 5 estilos con datos de
ejemplo en /tmp/mealmood-export-previews para revisar el diseno
- Nombres de estilos en espanol corregidos (estaban en ingles)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
En school/vertical el logo centrado sobre el titulo quedaba mal; ahora
va a la izquierda con el rango de semana y el titulo alineados al lado,
y la fecha de export a la derecha.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- Logo real de la app en el header de los 3 estilos (antes solo en el
default, y pequeno) y en el footer junto a un wordmark MealMood en
degradado coral->verde con tagline localizada en cursiva
- "Powered by MealMood" y "Scan me" estaban hardcodeados en ingles;
ahora share_footer_tagline y share_footer_scan en 6 idiomas
- Titulo del header default con el mismo degradado; QR con borde coral
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- WeekExportPreviewSheet: preview renderizado del export con picker
segmentado de los 3 estilos (cachea cada render); compartir usa el
estilo elegido sin tocar el predeterminado (salvo primera vez)
- Sustituye al WeekExportStylePickerSheet de thumbnails y al doble
sheet picker+share de HomeView; strings nuevas en 6 idiomas
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- MealSlot.secondaryDishId (opcional, aditivo CloudKit); se limpia al
sustituir/quitar/vaciar/marcar comer fuera y viaja en swaps, copia de
semana anterior, undo y snapshot KV de iCloud (retrocompatible)
- Picker de hueco lleno: toggle "anadir como segundo plato" + boton para
quitarlo; HomeViewModel.assignSecondaryDish/removeSecondaryDish
- Se muestra "Plato + Segundo" en calendario, widget y export; la lista
de la compra incluye los ingredientes del segundo; stats lo cuentan
- Evento analytics secondary_dish_added; strings en 6 idiomas
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- Dish.fixedDayOfWeek/fixedMealType (opcionales, aditivos para CloudKit)
- Toggle + pickers de dia/comida en el formulario de plato
- AutocompleteEngine: pre-pasada que asigna los platos fijos a su hueco
antes del bucle MRV, de modo que cuentan para el resto de reglas
- Evento analytics dish_fixed_slot_set; strings en 6 idiomas
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- attemptAddDish/attemptCreateDish: el limite gratuito se comprueba en el
tap de anadir plato (DishListView y los 3 puntos de Home) y muestra el
DishLimitModal -> paywall directamente; antes solo se comprobaba al
guardar el formulario y el usuario podia rellenarlo entero para nada
- DishLimitModal compartido (era private de DishFormView) y
PaywallPresentation promovido a PremiumView.swift; DishListView usa
sheet(item:) tambien para el banner (source dish_counter vs dish_limit)
- Boton en la toolbar de Mis Platos que alterna orden alfabetico
(persistido en dish_list_alphabetical_sort); borrado por swipe corregido
para usar la lista mostrada
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- requestForExistingPremiumUser(): prompt nativo una sola vez para quien
ya era premium antes del ask post-compra (evento review_prompt_premium_user)
- Funnel de semanas completadas emite review_funnel_shown/positive/negative/dismissed
- Paywall de Home via sheet(item:) con PaywallPresentation: el source viaja
con la presentacion; antes dos @State separados hacian que a veces se
registrara paywall_viewed con source=unknown (post_onboarding nunca llegaba)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
- Tras una compra exitosa se pide la review nativa (una vez por usuario,
con 2s de delay para que se vea el estado premium activo)
- El boton de ajustes abre el formulario de resena del App Store via
?action=write-review en vez de SKStoreReviewController, que Apple
limita a 3 prompts/ano y el resto de veces no muestra nada
- Evento analytics review_prompt_post_purchase para medirlo
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
El bug de los pasos 5 y 6 era invisible a los tests unitarios: el contrato de
datos estaba bien, lo que fallaba era que la vista se desmontaba antes de pintar
el aha moment y el paywall. Hace falta recorrer la UI de verdad.
Anade el target MealMoodUITests (solo simulador, sin firma) y un test que hace
el onboarding entero en instalacion limpia y comprueba que Week Ready y el
paywall aparecen antes de la Home.
Los CTA del onboarding llevan ahora accessibilityIdentifier para que el test no
dependa de los textos, que estan en 6 idiomas.
Validado en los dos sentidos: pasa con el fix, y revirtiendo temporalmente
markFinished: false falla en la asercion de Week Ready. Suite completa: 27 tests.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Ks8uUcMA9mjypVK7F2Pkt
completeOnboarding escribia settings.onboardingCompleted al terminar el paso
de platos. Ese flag es el que ContentView observa para cambiar de OnboardingView
a HomeView, asi que el save destruia el flujo antes de que nextStep() pudiera
pintar el paso 5. WeekReadyStepView (el aha moment de la 1.2.0) y PaywallStepView
no se han visto nunca. GA4 lo confirma: 3 onboarding_completed en 28 dias y cero
eventos con step 5 o 6.
Se separa persistir los datos de marcar el onboarding como terminado:
completeOnboarding(markFinished:) commitea platos y plan sin tocar el flag, y el
nuevo finishOnboarding() lo escribe al salir del paywall. HomeView ya difiere su
prompt premium a la segunda sesion, asi que no hay paywall duplicado.
De paso, los nombres de paso en AnalyticsService estaban desalineados: el indice
5 decia "5_paywall" cuando el paso 5 es WeekReady, y el 6 no tenia nombre.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Ks8uUcMA9mjypVK7F2Pkt
- El banner "ready to export" ya no aparece con la semana incompleta; solo
cuando no quedan slots vacíos (y sigue siendo descartable con la X).
- Se añade un icono de compartir en la toolbar (cuando hay algo planificado)
para no perder el acceso a exportar en semanas parciales; misma lógica de
premium/paywall que el banner.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3HaWmmtTQ1vdTERtSYU6p
- El banner "Your week is ready to export" ahora tiene botón de cerrar (X)
que lo oculta para esa semana (persistido en AppStorage).
- iPad/Mac: handle arrastrable entre calendario y platos para rebalancear
el alto (fracción persistida, clamp 0.28–0.72); el calendario y la lista
se recalculan al arrastrar. Sustituye la altura fija anterior.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3HaWmmtTQ1vdTERtSYU6p
Fatal error "Duplicate values for key" al construir diccionarios con
Dictionary(uniqueKeysWithValues:) sobre dishes/tags/slots cuyos UUID se
duplican por la sincronización CloudKit de 2.0. Se sustituyen todas las
ocurrencias por Dictionary(_, uniquingKeysWith:) para tolerar duplicados
(se conserva el primero) en lugar de abortar. La app ya no crashea al
abrir con datos duplicados; la deduplicación real queda pendiente aparte.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3HaWmmtTQ1vdTERtSYU6p
- Dictado por voz (Speech/SFSpeechRecognizer, on-device) en el nombre de
plato y en ingredientes, con transcripción en vivo.
- Un solo texto dictado se separa en ingredientes individuales vía Apple
Foundation Models on-device (IngredientParser), con fallback heurístico.
- Permisos de micrófono y reconocimiento de voz en Info.plist.
- Cadenas de dictado en los 6 idiomas.
- iPad/Mac: el calendario reclama ~50% de la altura disponible en lugar
de quedar fijo a ~240px; iPhone (compact) sin cambios.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3HaWmmtTQ1vdTERtSYU6p
- Shopping list: dishes under "No ingredients yet" now open the dish editor on
tap (pencil affordance); list reconciles on dismiss. This was a dead end on
devices without Apple Intelligence (no Generate button, e.g. iPhone 14).
- Planner: dish photo as a scrimmed card background in the week calendar,
behind a new Settings toggle (settings_show_dish_photos, default on). New
optional AppSettings.showDishPhotosInPlanner (CloudKit/migration safe).
- FilledSlotView: inlines the meal-card chrome to support the photo layer.
- Toggle localized in all 6 languages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
Foundation for 2.1 family sharing (CKShare needs these models + container).
SwiftData cannot share across Apple IDs today, so 2.0 ships true multi-device
sync for the same account instead:
- Models made CloudKit-compatible: dropped @Attribute(.unique) on all 5,
inline defaults on every attribute, WeekPlan.slots stored as optional
relationship (name preserved → lightweight migration) with non-optional
slotList facade; ~73 call sites renamed.
- Container: cloudKitDatabase .automatic, falling back to the local-only
store when CloudKit is unavailable; failures recorded to Crashlytics.
- Entitlements: iCloud CloudKit service (container already existed);
remote-notification background mode for push-driven sync.
- Legacy KV snapshot sync (ICloudSyncService) stays inert when CloudKit is
active — kept only for 1.x devices.
- DeduplicationService collapses cross-device duplicates deterministically on
launch (settings singleton, default tags with tagId remapping, same-week
plans).
- Note: AppSettings.isPremium now syncs across same-Apple-ID devices; StoreKit
(PremiumSyncService + Transaction.updates) remains the source of truth and
reconciles on every launch/foreground.
All 21 unit tests pass, including ICloudSyncPremiumIsolationTests.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
- MealType gains breakfast/snack (chronological order drives slot/row order).
- AppSettings.activeMealTypes: single source of truth for enabled meals, backed
by new optional enabledMealTypesRaw with legacy mealWindows fallback —
additive migration, keeps pre-2.0 installs and iCloud snapshots working.
Legacy field kept coherent by the setter. time(for:) resolves per-meal event
times (breakfast 8:00 / snack 17:00 defaults on old stores).
- Replaced the 5 duplicated mealWindows→[MealType] derivations (slot sync,
default plan creation, week calendar, export view) with activeMealTypes.
- CalendarService: per-type event names and times.
- Export styles: per-type accent colors and gradients.
- Widget: generic meals list (N rows) instead of hardcoded lunch/dinner;
compact families fall back to main meals when >2 are active.
- Settings: 4 meal toggles (min 1) replace the 3-option picker.
- Onboarding: meal step is now multi-select over the 4 types.
- iCloud sync: enabledMealTypesRaw synced (optional, pre-2.0 compatible).
- Localized breakfast/snack in all 6 languages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
- PhotosPicker with downscaling (1024pt max, JPEG 0.8) before storing in
photoData; change/remove actions.
- Ingredients: editable line list (add/edit/remove) + on-device "Generate"
from the dish name (hidden when Foundation Models unavailable; paywall
after the free generation quota, source=ingredient_generation).
- DishViewModel: drafts ingredients/photo, cleans empty lines on save.
- Localized in all 6 languages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
- ShoppingItem model (per-week lines; dish-derived or free-text) + schema.
- ShoppingListService.reconcile mirrors planned dishes' ingredients into the
list, preserving check-off state and user items; plain-text export helper.
- ShoppingListView: grouped by dish, check-off, swipe-delete, free-text adds,
clear-checked, ShareLink export, and inline on-device "Generate" for planned
dishes without ingredients (paywall after 3 free generations,
source=ingredient_generation).
- Home toolbar: cart entry point (all users) + sheet.
- Analytics: shopping_list_opened, shopping_item_added, ingredients_generated.
- Localized in all 6 languages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
The exact-copy-from-previous-week action already existed but was buried in the
magic-wand long-press context menu. Expose it as a visible secondary button on
the auto-assign banner (shown only when the previous week actually has a menu),
so users landing on a fresh week can one-tap copy last week's plan and then tweak
it. Confirms before overwriting a week that already has dishes.
- Extract requestCopyPreviousWeek() shared by the menu and the banner.
- Add week_copied_previous analytics (copied_slots + source: empty_banner|menu).
- Reuses the existing localized home_copy_previous_week string (all 6 languages).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
- "Redeem promo code" button in PremiumView via offerCodeRedemption
(hidden on Mac where the sheet is unavailable); entitlement re-checked
on success — unblocks influencer/blog promo campaigns
- System share sheet now includes a localized text with the mealmood.app
link next to the exported image (viral loop no longer QR-only)
- 2 new strings × 6 languages
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UtWT52pAE91D7mbDda1cAM
- Tapping the widget now deep-links via mealmood://today back to the current
week (URL scheme registered, onOpenURL handler in Home)
- New Lock Screen widget families: accessoryRectangular (weekday + both
meals) and accessoryInline (next relevant meal)
- One-time dismissable widget promo card on Home from the 2nd session,
with widget_promo_shown/dismissed analytics
- 2 new strings × 6 languages
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UtWT52pAE91D7mbDda1cAM
- New "Week Ready" onboarding step: auto-fills the first week inline right
after dish creation, then pitches the Sunday reminder with context before
requesting OS notification permission (no more cold prompt on Home)
- Notifications section in Settings: weekly reminder toggle, deep-link to
system settings when permission is denied
- NotificationService: remindersEnabled preference, requestPermission(),
authorizationStatus(), cancelAllReminders()
- Post-onboarding premium prompt deferred to 2nd session (paywall was just
shown as the final onboarding step — 2s-later alert was prompt fatigue)
- Back navigation blocked after onboarding commit to avoid duplicate dishes
- 10 new strings × 6 languages
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UtWT52pAE91D7mbDda1cAM
Land new users on a ready, auto-planned week (with confetti) instead of an
empty one, to improve activation. Only fires when the user added dishes;
otherwise keeps the current empty-week + auto-assign prompt behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A) Implicit: HomeViewModel tracks auto-assigned slot IDs after each
autocomplete run. When the user manually replaces one of those dishes,
the rejected dish ID is recorded in FeedbackStore (UserDefaults).
AutocompleteEngine applies a 25% penalty per rejection (floor 0.30).
B) Explicit: WeekPlan gains userRating (0/1/-1). Past weeks with dishes
show a compact 👍/👎 row (Premium only). Liked weeks boost their
dishes (+0.20 each, max +0.50); disliked weeks penalise them
(-0.25 each, max -0.50). Signal is intentionally modest so the
period cycle score remains dominant.
Also adds Stats + week-rating localization strings to all 6 languages
(were missing from the previous commit).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AutocompleteEngine: MRV heuristic picks the most-constrained slot first
at each step; historical scoring deprioritises dishes used in recent
weeks (decay: 0.20 last week → 0.90 four+ weeks ago)
- HomeViewModel: passes last 4 weeks as recentPlans to autocomplete
- StatsView (Premium): streak, weeks planned, completion rate, top 8
dishes with bar charts, top 6 tags with colour bars — 6 languages
- StoreManager: update product ID to approved bundle-ID convention
- Version bump to 1.1.3 / build 48
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Dish.isPriority: mark dishes as priority; auto-assign gives them 2.5x weight
- Tag.dayRestriction: restrict tags to weekdays or weekend only
- Auto-assign CTA banner shown when there are empty slots (was hidden in context menu)
- Tap on filled slot opens picker to replace dish directly (no need to remove first)
- Export callout visible as soon as ≥1 slot is filled (not only when week is complete)
- WeekPlanShareView shows localized "TBD" / "Eating out" for empty/eating-out slots
- Second Sunday 17:00 push notification to plan next week
- DishDrawer sorts: priority first, then by historical usage, then alphabetically
- Search in SlotDishPickerSheet already shipped in 1.0.5 (verified ✓)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Eating out: tap any empty slot → "Mark as eating out"; shows teal indicator,
skipped by auto-assign, counts as complete, tap again to unmark
- Rule violations panel: access via wand long-press context menu when conflicts exist;
shows all isRuleOverridden slots with Fix (clear) or Ignore (acknowledge) actions
- Firebase Crashlytics integrated: CrashlyticsService + dSYM upload build phase,
isPremium property tracked per session
- PremiumSyncService: extracted premium state machine, StoreKit Transaction.updates
listener, isPremium no longer synced via iCloud to avoid stale state
- StoreManager: analytics on purchase/restore, bundle ID fallback for product ID lookup
- Search bar contrast bug fixed: TextField now has explicit foreground color for dark mode
- WelcomeStepView: redesigned onboarding welcome screen with week preview
- Version bump: 1.0.5 build 22
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AutocompleteEngine: no-repeat rule now applies to all dishes (not just tagless ones); fallback still allows repeats when no alternative exists
- CalendarService: update existing events instead of delete+create to prevent duplicates; fix weekStartDate using plan date instead of currentWeekStart
- DishFormView: form stays open after saving in create mode for quick multi-dish entry; Done button to close; saved feedback banner
- OnboardingViewModel/FirstDishesStepView: dishes are now optional during onboarding; Finish button always enabled
- AnalyticsService: new events — onboarding_step_viewed(step) and auto_assign_used(filled, unfilled)
- Localization: dish_done and first_dishes_optional_hint added in 6 languages; release notes updated in all 6 languages
- Version bump: 1.0.3 → 1.0.4 (build 19)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add localisations for German, French, Italian, and Brazilian Portuguese
- Redesign WeekPlanShareView with richer layout and sharing options
- Improve HomeView with various UI enhancements
- Update AppSettings and Tag models for new features
- Minor iCloud sync and Settings fixes
- Add archive & upload script for App Store submissions
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>