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:
@@ -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 20–30 seconds",
|
||||
"directions": "Directions",
|
||||
"optional": "optional",
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
"imported": "Recette importée ! Vérifiez avant de publier.",
|
||||
"adapted": "Recette adaptée enregistrée comme brouillon",
|
||||
"adaptFailed": "Échec de l'adaptation de la recette",
|
||||
"adaptUnchanged": "La recette adaptée est identique à l'originale — rien n'a été enregistré.",
|
||||
"adaptConstraintRequired": "Sélectionnez au moins un ingrédient à exclure ou ajoutez une contrainte",
|
||||
"adaptTooltip": "Adapter",
|
||||
"adaptTitle": "Adapter cette recette",
|
||||
@@ -292,6 +293,7 @@
|
||||
"success": "Variation créée — vérifiez et modifiez avant de publier.",
|
||||
"error": "Échec de la génération des variations",
|
||||
"saveError": "Échec de l'enregistrement de la variation",
|
||||
"noChanges": "Cette variation n'a rien changé — rien n'a été enregistré.",
|
||||
"wait": "Cela peut prendre 20 à 30 secondes",
|
||||
"directions": "Instructions",
|
||||
"optional": "facultatif",
|
||||
|
||||
Reference in New Issue
Block a user