foodsnap/supabase
marciobever eb2ceab354 fix(webhook): move Coach state update outside setTimeout + re-read state before Food Scan + simplify menu
Root cause: the COACH_FRONT state was being saved inside setTimeout,
creating a race condition where the next message arrives before state
is persisted. Now state is saved synchronously before returning.

Also added a safety guard that re-reads state from DB right before
entering Food Scan flow, making it impossible for coach photos to
be incorrectly processed as food.

Menu simplified to two clear options: Analisar Prato / Coach Corporal.
2026-04-22 16:33:20 -03:00
..
.temp feat: premium UI redesign, WhatsApp list menus, freemium coach flow, Stripe direct checkout 2026-04-14 11:36:48 -03:00
functions fix(webhook): move Coach state update outside setTimeout + re-read state before Food Scan + simplify menu 2026-04-22 16:33:20 -03:00
migrations feat: premium UI redesign, WhatsApp list menus, freemium coach flow, Stripe direct checkout 2026-04-14 11:36:48 -03:00
config.toml feat: premium UI redesign, WhatsApp list menus, freemium coach flow, Stripe direct checkout 2026-04-14 11:36:48 -03:00