Skip to content

feat(ui): delete a pre-processing recipe from the recipe list - #807

Merged
JArmandoAnaya merged 2 commits into
mainfrom
feat/preprocessing-closeout-frontend
Aug 26, 2026
Merged

feat(ui): delete a pre-processing recipe from the recipe list#807
JArmandoAnaya merged 2 commits into
mainfrom
feat/preprocessing-closeout-frontend

Conversation

@JArmandoAnaya

Copy link
Copy Markdown
Contributor

Summary

The Pre-processing view offered create, list, read and update for a recipe, and no delete, although the hook, the generated check and the DELETE route all existed. Each row in the recipe list now carries a delete control that asks first, and the editor closes when the recipe it held is the one that went. With the companion backend pull request (feat/preprocessing-closeout-backend), this completes the pre-processing epic.

What changed

  • RecipeList takes an onDelete and draws a ghost icon control (Trash2) beside each row. It sits beside the row rather than inside it because the row is itself a button. The selected row's tint and left rule moved to the <li> so both controls share it.
  • PreprocessingTab mounts a DeleteRecipeDialog on the DeleteBatch pattern: the Dialog primitive, a destructive submit, a refusal rendered as prose through refusalProse in a FieldError, and Cancel with no request. On success the editor moves to the next recipe, or to the invitation when the last one goes; the next recipe is chosen from the list as it was rather than left to the open-on-arrival effect, which would reopen the deleted row until the refetch lands. Recipes have no allowed_actions by decision, so the control is always offered.
  • Four screen tests: the request path and the row leaving, the last recipe returning the view to its invitation, a forced PREPROCESSING_RECIPE_NOT_FOUND rendered as prose with the code absent from the DOM, and a cancel sending nothing.
  • The real-server cycle deletes the recipe after the export that needed it has run, and asserts the invitation, the closed editor and the tab's count. Its DELETE answers 204, so it joins the pinned list of aborted calls with the other two.
  • docs/content/ui.md and the UI row of the surface table in docs/content/preprocessing.md say the verb.
  • A second commit, fix(ui): the recipe preview grid spends its width on the three images: the preview grid's leftmost column carried the sample's short id and took width from the three images. The grid is now three equal columns under the same headings, and the id survives as the row's title. The preview test asserts three cells per sample.

Found, not fixed

  • The pinned aborted-call list in the cycle spec grows by one entry for every 204 the walk sends; that is by its own design, and it is recorded here so the next 204 is not read as a regression.

Test plan

  • pnpm --filter @visionset/ui-core exec vitest run preprocessing: Test Files 1 passed (1), Tests 27 passed (27)
  • pnpm -r build && pnpm -r test && pnpm -r lint: annotator Tests 1071 passed (1071), ui-core Tests 1395 passed (1395), app Tests 11 passed (11), lint Done for all three
  • CI=1 pnpm exec playwright test -c playwright.cycle.config.ts: 1 passed (33.3s)
  • bash scripts/check.sh on the first commit: All checks passed. / check.sh: PASSED ran=python,frontend,generated,browser skipped=docs (175s total, browser cycle, real server (chromium) at 29s)
  • After the second commit: pnpm --filter @visionset/ui-core exec vitest run preprocessing Tests 27 passed (27) and pnpm --filter @visionset/ui-core lint clean

Closes #785

@JArmandoAnaya
JArmandoAnaya merged commit d1a1edf into main Aug 26, 2026
15 checks passed
@JArmandoAnaya
JArmandoAnaya deleted the feat/preprocessing-closeout-frontend branch August 26, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pre-processing: resize and augmentation recipes applied at export

1 participant