Skip to content

feat(ui): the export dialog chooses a target model, and the lossy consent names it - #796

Merged
JArmandoAnaya merged 3 commits into
mainfrom
feat/targets-t4-ui
Aug 26, 2026
Merged

feat(ui): the export dialog chooses a target model, and the lossy consent names it#796
JArmandoAnaya merged 3 commits into
mainfrom
feat/targets-t4-ui

Conversation

@JArmandoAnaya

Copy link
Copy Markdown
Contributor

Stack

Position 4 of the export-targets stack (#784); based on feat/targets-t3-catalog.

What changed

The export dialog's one control is now Target model rather than Format. It lists the
catalog GET /export-targets answers, grouped under Ultralytics YOLO, Community YOLO and
Other formats, and each option carries a second line saying what the target takes — the
tasks a model accepts, or, for a self-named format with no task vocabulary, the geometries it
carries. The choice is sent as target=; the format it resolves to is the server's to work
out, and the retired yolo alias is never offered. A family this build has no heading for
lands under Other formats rather than out of the list.

The lossy consent banner reads the 409's compatibility report for the chosen target and
opens with one sentence naming the target, what it accepts and how much of the release it
would drop or degrade — YOLOv10 accepts boxes only — 1,204 polygons would be dropped.
with the per-class list beneath it as before. The counts are the report's, summed per
geometry, in the kernel's own order. The pre-attempt hint still comes from FormatOut.lossy,
read through the target's format; a formats read that failed now says so beside the picker
instead of leaving the hint out silently.

  • useExportTargets in screens/queries.ts (key ["export-targets"], the same stale time
    as useFormats); useExportRelease takes { target } and sends target=.
  • patterns/ExportTargetSelect.tsx, a shared grouped picker built on the Select
    primitive's own SelectGroup, SelectLabel and SelectItem meta — no primitive change.
    Exported from index.ts with groupExportTargets, exportTargetMeta and
    describeTargetDrops, so the preprocessing tab can take the same control.
  • data/refusals.ts: describeTargetDrops, a sentence for EXPORT_TARGET_NOT_FOUND, and
    the LOSSY_EXPORT_NOT_CONSENTED sentence now says target.
  • The stale note at the top of DatasetScreen.tsx (and its twins in queries.ts,
    dataset.test.tsx and docs/content/ui.md) said there is no pre-export validation
    route. There is — GET /releases/{id}/export-compatibility — and this screen does not
    call it; the note now says that.
  • cycle.spec.ts exports for yolo11: the release holds a polyline the target drops, so
    the walk meets the real consent (the sentence and the count from the kernel), ticks it,
    and then reads data.yaml out of the downloaded archive and asserts the names mapping.
    The launch's 409 joins the pinned list of refused calls, as the one refusal a person is
    meant to see.
  • docs/content/ui.md's export section describes the target picker and the consent copy.

Found, not fixed

  • frontend/app/e2e/_wire.ts holds only the capability rosters; no e2e spec stubs
    /formats, so there was nothing there to give a targets field or an export-targets
    stub to. The component tests carry the stubs instead.
  • The export docs live in docs/content/ui.md; docs/content/ui/ has no export page.

Checks

Per commit: pnpm --filter @visionset/ui-core test (dataset.test.tsx: 41 passed), pnpm -r lint,
pnpm -r build, and the browser cycle for the spec it touches. bash scripts/check.sh once on
the final tree, then bash scripts/check.sh docs for the doc change:

Timing
     40s  python tests
      0s  ruff (lint)
      1s  ruff (format)
      5s  mypy
      0s  import contracts
      6s  frontend build
     28s  frontend tests
     11s  frontend lint
      1s  openapi drift
      0s  generated client drift
      1s  mcp tool reference drift
      0s  export target catalog drift
      1s  version sync
     45s  annotator + app e2e (chromium)
     29s  browser cycle, real server (chromium)
    168s  total

All checks passed.

check.sh: PASSED  ran=python,frontend,generated,browser  skipped=docs
      5s  docs site build
      0s  docs projection is deterministic
      0s  docs site internal links
check.sh: PASSED  ran=docs  skipped=python,frontend,generated,browser

The base branch has not been through CI (Tier B, no PR), so this branch's CI is the first
verdict on T3's tree as well as this one.

@JArmandoAnaya
JArmandoAnaya force-pushed the feat/targets-t3-catalog branch from b38157d to 1595713 Compare August 26, 2026 11:27
Base automatically changed from feat/targets-t3-catalog to main August 26, 2026 11:33
@JArmandoAnaya
JArmandoAnaya changed the base branch from feat/targets-t3-catalog to main August 26, 2026 11:33
…sent names it

The Format select becomes Target model: the catalog from GET /export-targets,
grouped under Ultralytics YOLO, Community YOLO and Other formats, each option
carrying the tasks it accepts or the geometries it carries. The choice is sent
as target=, never format=, and the retired yolo alias is never offered.

The consent banner reads the 409's report for the chosen target and opens with
a sentence naming the target, what it accepts and how much would be dropped or
degraded, with the per-class list beneath. The grouped picker is a shared
pattern, ExportTargetSelect, for the preprocessing tab to take as well.

The note denying a pre-export validation route is corrected: the route exists
and this screen does not call it.
…read data.yaml

The release holds a polyline the target drops, so the walk meets the real
consent sentence and count before the download, then opens the archive and
asserts the names mapping in data.yaml. The launch's 409 joins the pinned list
of refused calls as the one refusal a person is meant to see.
@JArmandoAnaya
JArmandoAnaya merged commit 0852341 into main Aug 26, 2026
15 checks passed
@JArmandoAnaya
JArmandoAnaya deleted the feat/targets-t4-ui branch August 26, 2026 11:38
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