feat(ui): pre-processing recipes as the Dataset's fourth view, chosen at export - #801
Merged
Conversation
… at export A Pre-processing tab between Assets and Releases: the project's recipes as a dense list, an editor of four always-visible steps (target model, resize, augmentation, preview) preset from the target's hints, and Save recipe as the page's filled control while the view is open — the navigation column steps back through contentOwnsTheAction, as it does for the Overview's invitation. The Export dialog gains a Pre-processing recipe control, None by default, sending recipe=<name>; the two 409s an export can answer render as prose. The preview renders three sample assets through the preview route — the newest split release's train fold, else the project's first assets — as the base64 image alone; the static overlay pattern drops into PreviewCell.
The preview route answers the annotations already placed on the transformed image; each cell now hands them, completed with the rendering's asset, to StaticAnnotationOverlay with the schema's classes, so a box after a letterbox is drawn where the export writes it. A rendering with no size shows the picture alone.
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.
Stack
Position 4 of the pre-processing stack (#785); based on
main, which holds P1–P3 (#799, #793, #797) and the static overlay pattern (#800).What changed
The Dataset section gains a fourth view, Pre-processing, between Assets and Releases. It is the fourth tab of the pre-processing epic (#785): a recipe is a named project resource chosen at export beside the target model, so it lives where releases are exported from.
Overview · Assets · Pre-processing · Releases, the product's one tab shape, with the recipe count on the label like its two counted siblings. The view is component state, as the section's other three are;ProjectScreennow holds which view is open and passestab/onTabChangetoDatasetScreen, because the navigation column has to know when the editor holds the filled control.patterns/RecipeList.tsx) is the dense list — one<button>per row, the chosen one tinted with a 2px left rule, the one-line summary beneath the name and the target's label as aquietchip — a small secondaryNew, and the line Applied at export. Choose a recipe in the Export dialog; exports without one apply no transform. With no recipe the panel is an invitation with one verb-first action.patterns/RecipeEditor.tsx) is four always-visible steps whose markers settle as each is decided — the ingest flow's numeral, extracted topatterns/StepMarker.tsxand consumed by both screens. Target model reusesExportTargetSelect; choosing one preselects the strategy chips (marked suggested) and the size from the target's hints, and a later change of target rewrites only the fields nobody typed in (screens/recipeDraft.ts,touched). Resize leads with the trainer's ambient line whentrainer_resizesis set, then Letterbox / Stretch / None, width × height, the pad value for a letterbox and the Geometry exact line. Augmentation is three checkboxes, the amount beside brightness/contrast, variants per image, and the train-fold line. Every bound of the request body is restated beside its field so a shut Save recipe has its reason in the footer.POST /projects/{id}/preprocessing-preview— the newest split release's first three train-fold members, else the project's first three assets — in three columns (original, after resize, first augmented variant), each cell one request keyed on the spec it renders, the spec settling for 400 ms before a cell asks. Cells draw the placed labels throughStaticAnnotationOverlaywith the schema's classes.contentOwnsTheAction, the Overview invitation's mechanism): the column's Annotate or Ingest steps back tosecondary, and Save recipe (or the invitation's Write a recipe) is the page's oneprimary. The header's Publish release issecondaryon every view, as it was. Tested in both directions.Noneby default, every recipe with its one-line summary, sent asrecipe=<name>. A project with no recipes says so in a line rather than offering a one-row picker.AUGMENTATION_REQUIRES_SPLITandPREPROCESSING_STEP_UNSUPPORTED_GEOMETRYrender as prose with the remedy — refusals, never consents.screens/queries.ts(usePreprocessingRecipes, create/update/delete,usePreprocessingPreview,useReleaseAssignment;useExportReleasetakesrecipe); four new entries indata/refusals.ts; exports appended toindex.ts.Premise notes
docs/content/ui.md, the sitemap block), and what app: split the project view into tabs instead of one stacked page #171 put in the URL is the project's section as a path segment. The new view follows its siblings;frontend/app/src/routes.tsxis untouched.Input, and a chip is not a field.Sitemap
The sitemap block in
.agents/skills/frontend/information-architecture/SKILL.mdanddocs/content/ui/navigation.mdgain the fourth view and the rule that a view inside a section can own the filled control.docs/content/ui.mddescribes the view;docs/content/preprocessing.mdgains its UI row.Found, not fixed
Nothing.
Checks
Per commit:
pnpm --filter @visionset/ui-core test,pnpm -r lint,pnpm -r build, all green.Full local gate once on the final tree,
bash scripts/check.sh:bash scripts/check.sh docs: