fix: variations/adapt-recipe silent errors and no-op duplicates

AI adapt/variations flows had no catch on their fetch calls, so a
network failure surfaced as nothing happening rather than an error
toast. They also unconditionally persisted the AI's output even when
it was identical to the source recipe, and the adapt route never
recorded a recipeVariations row (only plain forks did) or enforced
the per-tier recipe-count limit other create paths already check.

v0.39.0
This commit is contained in:
Arnaud
2026-07-17 16:48:38 +02:00
parent 31ff7b9ac0
commit d8dc0aa465
10 changed files with 147 additions and 48 deletions
+2
View File
@@ -97,6 +97,7 @@
"imported": "Recipe imported! Review before publishing.",
"adapted": "Adapted recipe saved as draft",
"adaptFailed": "Failed to adapt recipe",
"adaptUnchanged": "The adapted recipe came out identical to the original — nothing was saved.",
"adaptConstraintRequired": "Select at least one ingredient to exclude or add a constraint",
"adaptTooltip": "Adapt",
"adaptTitle": "Adapt this recipe",
@@ -292,6 +293,7 @@
"success": "Variation created — review and edit before publishing.",
"error": "Failed to generate variations",
"saveError": "Failed to save variation",
"noChanges": "This variation didn't actually change anything — nothing was saved.",
"wait": "This may take 2030 seconds",
"directions": "Directions",
"optional": "optional",