feat(ui): delete a pre-processing recipe from the recipe list - #807
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
DELETEroute 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
RecipeListtakes anonDeleteand 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.PreprocessingTabmounts aDeleteRecipeDialogon theDeleteBatchpattern: theDialogprimitive, adestructivesubmit, a refusal rendered as prose throughrefusalProsein aFieldError, 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 noallowed_actionsby decision, so the control is always offered.PREPROCESSING_RECIPE_NOT_FOUNDrendered as prose with the code absent from the DOM, and a cancel sending nothing.DELETEanswers 204, so it joins the pinned list of aborted calls with the other two.docs/content/ui.mdand the UI row of the surface table indocs/content/preprocessing.mdsay the verb.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'stitle. The preview test asserts three cells per sample.Found, not fixed
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: annotatorTests 1071 passed (1071), ui-coreTests 1395 passed (1395), appTests 11 passed (11), lintDonefor all threeCI=1 pnpm exec playwright test -c playwright.cycle.config.ts:1 passed (33.3s)bash scripts/check.shon 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)pnpm --filter @visionset/ui-core exec vitest run preprocessingTests 27 passed (27)andpnpm --filter @visionset/ui-core lintcleanCloses #785