Une seule feature livree en une seule PR, en 5 phases : - Phase 1 : enrichit le corpus NLP (tech-step-training-data.ts) et ajoute un harness d'evaluation (precision/rappel/F1) avec un jeu de test etiquete - la premiere metrique objective de qualite pour ce classifieur. - Phase 2 : schema Prisma (StepTechStepCorrection, TechStepTrainingSuggestion) + endpoints utilisateur (POST/GET corrections, ouverts a tout viewer, pas seulement l'auteur) + endpoints internes /internal/tech-steps/* proteges par secret partage (requireInternalWorker). - Phase 3 : UI de highlight/correction cote web (selection de texte -> association a une technique, ou clic sur un highlight existant pour le corriger/supprimer) - verifiee via Cypress (component + e2e, en Chrome reel). - Phase 4 : worker LLM autonome (services/tech-step-llm-worker, hors du monorepo pnpm comme experiments/llm-tech-step-poc) qui audite les clauses a faible confiance et transforme les corrections utilisateur en suggestions d'entrainement, sans jamais toucher le chemin interactif. - Phase 5 : script retrain-tech-steps.ts (gate de regression F1 + backfill) et list-pending-training-suggestions.ts pour la revue humaine avant application au corpus. Verification effectuee cette session : tsc/biome sur l'ensemble du repo, build complet (pnpm build), suite Cypress complete (component 39/39, e2e 75/76 - le seul echec est preexistant et sans rapport, cote recipe-form.feature/ingredient-picker), tests unitaires du worker (6/6) et son install/typecheck reels contre node-llama-cpp. Les tests Mocha d'apps/api (Phases 1 et 2) n'ont pas pu etre executes dans cette session (pas de Postgres local disponible) - a lancer avant merge. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
53 lines
2.3 KiB
Gherkin
53 lines
2.3 KiB
Gherkin
Feature: Managing a recipe from the catalog
|
|
As a signed-in user
|
|
I want to favorite or delete one of my recipes
|
|
So that I can curate my catalog as it grows
|
|
|
|
Background:
|
|
Given I am signed in as "Alice" "Martin"
|
|
And my household id is 1
|
|
And the disliked ingredients list is empty
|
|
|
|
Scenario: Toggles a recipe's favorite from the detail panel and reflects it in the table
|
|
Given the recipe catalog contains "Omelette"
|
|
And recipe 2's detail is available
|
|
And toggling recipe 2's favorite will succeed
|
|
When I visit "/recettes/2"
|
|
Then the recipe "Omelette" should not be marked as favorite
|
|
When I click the favorite star
|
|
Then the favorite request should have been made
|
|
And the favorite star should be marked as favorite
|
|
And the recipe "Omelette" should be marked as favorite
|
|
|
|
Scenario: Highlights a detected technique in a step, with its name shown on focus
|
|
Given the recipe catalog contains "Omelette"
|
|
And recipe 2's detail is available
|
|
When I visit "/recettes/2"
|
|
Then I should see the highlighted technique "Cuire"
|
|
When I focus the highlighted technique "Cuire"
|
|
Then the tooltip should show "Cuire"
|
|
|
|
Scenario: Corrects a detected technique from its highlight
|
|
Given the recipe catalog contains "Omelette"
|
|
And recipe 2's detail is available
|
|
And the tech steps reference list has options
|
|
And correcting step 2's "Cuire" match will succeed
|
|
When I visit "/recettes/2"
|
|
And I click the highlighted technique "Cuire"
|
|
Then I should see the technique correction options
|
|
When I choose "Mijoter" as the correct technique
|
|
Then the correction request should have been made
|
|
And I should see "Merci, votre correction a été enregistrée."
|
|
|
|
Scenario: Deletes a recipe after a two-step confirmation, then clears the selection
|
|
Given the recipe catalog contains "Omelette"
|
|
And recipe 2's detail is available
|
|
And deleting recipe 2 will succeed
|
|
When I visit "/recettes/2"
|
|
Then the recipe detail panel heading should be "Omelette"
|
|
When I click "Supprimer" in the recipe detail panel
|
|
And I confirm the deletion in the recipe detail panel
|
|
Then the delete request should have been made
|
|
And the URL should match the recipes list
|
|
And the recipe "Omelette" should not be visible in the table
|
|
And I should see "Sélectionnez une recette dans le tableau"
|