Fix AI prompt wiring, asset generation flow, and signup trigger#8
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10c36de9f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const initialStatus = await pollStatus() | ||
| if (initialStatus === 'completed' || initialStatus === 'failed') return | ||
|
|
There was a problem hiding this comment.
Allow regeneration when status is already completed
startGeneration now exits immediately when the first status poll returns completed, which prevents the subsequent /api/assets/generate call from ever being sent. In the current UI, the preview screen always exposes a retry/regenerate action, so retrying a previously completed project will no longer trigger a new generation and will silently keep the old assets.
Useful? React with 👍 / 👎.
| const { data: startedProject, error: startError } = await supabase | ||
| .from('projects') | ||
| .update({ status: 'generating', pipeline_stage: 'icon_resolve' }) | ||
| .eq('id', projectId) | ||
| .eq('user_id', user.id) |
There was a problem hiding this comment.
Move generating status update after prerequisite checks
The project is marked status='generating' before validating dependent records (for example, the style preset lookup just below). If that lookup fails (missing/deleted preset or query error), the handler throws before entering the pipeline try/catch that resets status, leaving the row stuck as generating; later generate attempts then return ASSET_GENERATION_IN_PROGRESS even though no pipeline is running.
Useful? React with 👍 / 👎.
Summary
public.usersfromauth.users.emailVerification
yarn tsc --noEmityarn vitest run tests/lib/ai/prompt-config.test.tsyarn build013_fix_handle_new_user_email.sqland verified remote migration alignment/api/assets/generaterequestpublic.usersrows;auth.users/public.usersmismatch query returned zero rows