Shared from Yui | Playground
Flow: a plate to macros
One screen from Yui, drawn from 24 lines of Yui Lines.
Drawing the screen...
The lines the agent sends:
flow@plate "A plate to macros" submit="Save to my meals"
flowchart TD
%% hi: page "Snap a plate, get the macros" body="Pick a plate. I guess what's on it and say how sure I am. You fix what I got wrong, and it goes in your log." points="Pick a photo|My guess, and how sure|Fix the portion|Today's totals"
hi([Start]) --> photo
%% photo: choose "Which plate is yours?" Pancakes|Salmon|"Poke bowl"
photo{Plate}
photo -->|photo=Pancakes| stack
photo -->|photo=Salmon| fish
photo --> bowl
%% stack: page "Pancakes with berries" /demo/meal-pancakes.jpg body="About 520 kcal. Fairly sure on the stack. The syrup is a guess: I can see the pool, not how much soaked in." points="How sure: fairly|Protein 12 g|Carbs 88 g|Fat 14 g"
stack[Pancakes] --> syrup
%% syrup: choose "How much syrup?" None|"A drizzle"|"A lot"
syrup[Syrup] --> portion
%% fish: page "Grilled salmon" /demo/meal-salmon.jpg body="About 560 kcal. Sure on the salmon, and it's most of the plate, so no questions." points="How sure: very|Protein 42 g|Carbs 12 g|Fat 38 g"
fish[Salmon] --> portion
%% bowl: page "Salmon poke bowl" /demo/meal-poke.jpg body="About 650 kcal. A rough guess: the rice is under the toppings, so its size is the big unknown." points="How sure: a rough guess|Protein 32 g|Carbs 78 g|Fat 22 g"
bowl[Poke bowl] --> rice
%% rice: choose "How much rice was under it?" "A small scoop"|"A regular bowl"|"A big bowl"
rice[Rice] --> portion
%% portion: choose "How much did you eat?" Half|"All of it"|"A bit more"|Double
portion[Portion] --> meal
%% meal: choose "Which meal was it?" Breakfast|Lunch|Dinner|Snack
meal[Meal] --> logged((Saved))
end

