Context. surface studio · domain aja · route /studio/aja/segmentation · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/aja/segmentation/page.tsx
Last walked. 2026-07-02 cleanup-lane console addendum — Playwright real-dev-infra coverage now proves signed-in render, route-map contract, quick-action href order, ready JSON form, 44 px submit target, malformed-JSON client guard with no POST, duplicate-region BFF validation detail, real IoU/Dice result, fail-closed loading/unauthorized/catalog-error states, mobile no-overflow, and direct BFF 401/403/400/200 gates. Spec: apps/oshun/web/e2e/studio-aja-cleanup-lane-consoles.spec.ts.' '2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified; live screen-reader, touch, offline, and telemetry-delivery checks pending a manual AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md; body re-derived 2026-06-03 from current source (lane-console architecture)
Purpose#
Admin lane console for segmentation-quality scoring. Its quality lane wires the
IoU / Dice segmentation-quality evaluator via /v1/admin/aja/segmentation: per
region compute IoU and Dice from the predicted / ground-truth / intersection
areas, mark each region pass/fail against the IoU threshold, and aggregate mean
IoU / mean Dice and the passed count.
Entry points#
- Direct URL / bookmark —
/studio/aja/segmentation; metadata setsalternates.canonical - Linked from
/studioDomain-bridge studios section (Aja sub-area) - Quick action — "Open Aja Gap Filling workspace"
(
/studio/aja/gap-filling)
Layout regions#
page.tsx renders inside <ShellLayout active="studio">:
- Workspace
StudioAjaSegmentationWorkspace—<h1>"Aja Segmentation Workspace" + summary (data-aja-segmentation-summary), then the embeddedSegmentationQualityLane(data-seg-lane) - Route Map panel (
data-aja-segmentation-route-map,<h2>) — 5 entries fromSTUDIO_AJA_SEGMENTATION_ROUTE_MAP - Quick-action lane —
quickActionlinks: gap-filling,/studio
States#
- Loading —
data-seg-loading"Loading segmentation evaluator…" whileGET /v1/admin/aja/segmentationis in flight - Unauthorized (gated) —
data-seg-unauthorizedon 401/403; admin scope message ("Aja workspace scope required to evaluate segmentation.") - Error —
data-seg-erroron non-OK / network failure - Ready (form) —
data-seg-formonce the catalog loads - Result —
data-seg-result(-headlinemean IoU / mean Dice / passed,-regionsper-region table) after a successful POST; payload error indata-seg-evaluate-error - Offline — SSR shell; lane error state when
fetchunavailable - Standalone PWA — desktop layout;
quickActionanchors wrap - Empty — N/A; route map is constant
Interactions#
Segmentation Quality lane#
- Segmentation regions JSON (
<textarea data-seg-payload>, label "segmentation regions json") —{ iouThreshold, regions }, where each region carriesregionId,predictedArea,groundTruthArea, andintersectionArea - "Evaluate segmentation" (
<button data-seg-submit>) — POSTs the parsed JSON to/v1/admin/aja/segmentation/evaluate
Route Map panel#
- 5 entries (
<article>perpath+purpose) — non-interactive
Quick-action lane#
- "Open Aja Gap Filling workspace" →
/studio/aja/gap-filling - "Back to Studio workspace index" →
/studio
E2E coverage#
apps/oshun/web/e2e/studio-aja-cleanup-lane-consoles.spec.tscovers signed-in shell render, the ready segmentation JSON form, malformed JSON client guard with noPOST, real BFF duplicate-region validation detail, real IoU/Dice output (mean IoU0.6325, mean Dice0.725,r3fail), route-map count, exact quick-action hrefs, 44 px submit target, loading / unauthorized / catalog-error fail-closed states, mobile no-overflow, and direct BFF auth/schema/happy-path gates.
Data & contracts#
- Reads:
GET /v1/admin/aja/segmentationon mount,cache: 'no-store',buildBffAuthHeaders() - Writes:
POST /v1/admin/aja/segmentation/evaluate - Realtime: none
- Caching: client fetch on mount (no-store); SSR shell
- Auth/role check: BFF endpoints admin-scoped, fail-closed (401/403 → unauthorized render); route gated signed-in + studio via the proxy
Cross-references#
- Parent:
../../studio-overview.md - Sibling routes:
./studio-aja-gap-filling.md - Component sources:
apps/oshun/web/src/components/studio/StudioAjaSegmentationWorkspace.tsxapps/oshun/web/src/components/studio/StudioAjaSegmentationRouteMap.ts
Known downstream boundaries#
- The lane scores supplied region areas; it does not run actual mask segmentation over an image or video frame.
- Route-map sub-routes are descriptive contracts; implementation status of those child pages is tracked separately from this leaf console.