auto: premium UI with interactive recipe cards#15
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…-115315 # Conflicts: # .github/_auto_pr_body.md # .github/_auto_scoreboard.md # api/main.py # web/components/chat.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
auto: premium UI with interactive recipe cards
Why
The agent already outputs a perfectly structured recipe format on every single response (title, cuisine/time, ingredient groups, numbered steps, dietary info, chef's tip), but the frontend renders it as a flat wall of markdown text. 224 traces over 7 days confirm 100% of recipe responses follow this structure — yet none of that structure is surfaced to the user. Transforming these responses into interactive recipe cards makes the cooking-along experience dramatically better and uses zero additional API calls.
The operator focus hint ("go wild on the design, make it the best one ever!") confirms UI is the right investment area.
What
web/lib/parse-recipe.ts: New parser that detects recipe responses and extracts title, meta (cuisine + time), ingredient groups, numbered steps, dietary info, and chef's tip from the agent's consistent output format.web/components/recipe-card.tsx: NewRecipeCardcomponent renders parsed recipes as a structured two-column card — interactive ingredient checklist on the left (per-item checkboxes, checked/total counter), numbered instruction steps on the right (click to mark complete), dietary badges at the top, and a chef's tip callout at the bottom. Non-recipe responses fall back to markdown.web/components/chat.tsx: Whenpremium_uiflag is on, replaces the entire chat layout: gradient hero header with chef hat icon + model tier selector, dietary filter chips in a toolbar, 2×2 starter prompt grid for the empty state, right-aligned user bubbles, animated bouncing-dots loading indicator, andRecipeCardfor all assistant messages. Legacy layout is preserved verbatim when flag is off.api/main.py: Exposespremium_uikey from the/flagsendpoint.Flag
auto_premium_ui— default off. Enable in Flagsmith "cooking" project → Development to activate.Eval delta
No scenarios were modified. Changes are purely in the frontend rendering layer.
Screenshots
.github/_auto_screenshots/before_ui.jpg.github/_auto_screenshots/after_empty_state.jpg.github/_auto_screenshots/after_recipe_card.jpgVisual diff: the "after empty" state shows a gradient hero header with orange gradient "Cooking Agent" text, chef-hat icon, compact tier dropdown, and a 2×2 starter prompt grid. The "after recipe" state shows right-aligned user bubbles and a structured dark recipe card with title + time badge, dietary badges, a two-column body (ingredient checklist with checkboxes on the left, orange numbered step circles on the right), and a chef's tip bar.
How to test
Rollback
Flip
auto_premium_uioff in Flagsmith. No code revert needed.Follow-ups
auto_conversation_historyflag path.