Skip to content

feat(ui): pre-processing recipes as the Dataset's fourth view, chosen at export - #801

Merged
JArmandoAnaya merged 3 commits into
mainfrom
feat/preprocessing-p4-ui
Aug 26, 2026
Merged

feat(ui): pre-processing recipes as the Dataset's fourth view, chosen at export#801
JArmandoAnaya merged 3 commits into
mainfrom
feat/preprocessing-p4-ui

Conversation

@JArmandoAnaya

Copy link
Copy Markdown
Contributor

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.

  • The tab roster is 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; ProjectScreen now holds which view is open and passes tab/onTabChange to DatasetScreen, because the navigation column has to know when the editor holds the filled control.
  • The left panel (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 a quiet chip — a small secondary New, 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.
  • The editor (patterns/RecipeEditor.tsx) is four always-visible steps whose markers settle as each is decided — the ingest flow's numeral, extracted to patterns/StepMarker.tsx and consumed by both screens. Target model reuses ExportTargetSelect; 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 when trainer_resizes is 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.
  • The preview renders three sample assets through 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 through StaticAnnotationOverlay with the schema's classes.
  • One filled control per view. While the Pre-processing view is showing, its content owns the action (contentOwnsTheAction, the Overview invitation's mechanism): the column's Annotate or Ingest steps back to secondary, and Save recipe (or the invitation's Write a recipe) is the page's one primary. The header's Publish release is secondary on every view, as it was. Tested in both directions.
  • The Export dialog gains a second control, Pre-processing recipe, under the target block: None by default, every recipe with its one-line summary, sent as recipe=<name>. A project with no recipes says so in a line rather than offering a one-row picker. AUGMENTATION_REQUIRES_SPLIT and PREPROCESSING_STEP_UNSUPPORTED_GEOMETRY render as prose with the remedy — refusals, never consents.
  • Hooks in screens/queries.ts (usePreprocessingRecipes, create/update/delete, usePreprocessingPreview, useReleaseAssignment; useExportRelease takes recipe); four new entries in data/refusals.ts; exports appended to index.ts.

Premise notes

  • The dispatch says the tab should sit "in the query string like its siblings". It does not: the Dataset's views are component state (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.tsx is untouched.
  • The mockup's "numerals that fill on completion" is rendered with the ingest flow's marker vocabulary — a settled step is the check in a muted circle, an unsettled one the outlined numeral — so a decided step reads the same on both screens (principle 8, consistent over novel).
  • The mockup's "amount chip" is an input: a number a person types is an Input, and a chip is not a field.
  • The mockup draws no name field; a recipe cannot be saved without one, so the editor opens with Name above the steps.
  • No Delete control was drawn and none is added; the CLI and MCP carry it. A decision is needed before the view offers one.

Sitemap

The sitemap block in .agents/skills/frontend/information-architecture/SKILL.md and docs/content/ui/navigation.md gain the fourth view and the rule that a view inside a section can own the filled control. docs/content/ui.md describes the view; docs/content/preprocessing.md gains 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:

4745 passed, 33 skipped in 38.82s
frontend/annotator test:       Tests  1071 passed (1071)
frontend/ui-core test:       Tests  1377 passed (1377)
frontend/app test:       Tests  11 passed (11)
  281 passed (43.7s)
  1 passed (28.6s)
check.sh: PASSED  ran=python,frontend,generated,browser  skipped=docs

bash scripts/check.sh docs:

docs projection is current (48 pages)
check.sh: PASSED  ran=docs  skipped=python,frontend,generated,browser

… 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.
@JArmandoAnaya
JArmandoAnaya merged commit 2d6d505 into main Aug 26, 2026
15 checks passed
@JArmandoAnaya
JArmandoAnaya deleted the feat/preprocessing-p4-ui branch August 26, 2026 12:29
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.

1 participant