V1 Web PWA · Surface walkthrough

Studio Aja · Segmentation

A per-surface walkthrough of the V1 Web PWA studio surface: layout, states, interactions, data, and cross-references.

walked + e2e-covered
9sections2 minread

On this page

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 sets alternates.canonical
  • Linked from /studio Domain-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 embedded SegmentationQualityLane (data-seg-lane)
  • Route Map panel (data-aja-segmentation-route-map, <h2>) — 5 entries from STUDIO_AJA_SEGMENTATION_ROUTE_MAP
  • Quick-action lanequickAction links: gap-filling, /studio

States#

  • Loadingdata-seg-loading "Loading segmentation evaluator…" while GET /v1/admin/aja/segmentation is in flight
  • Unauthorized (gated)data-seg-unauthorized on 401/403; admin scope message ("Aja workspace scope required to evaluate segmentation.")
  • Errordata-seg-error on non-OK / network failure
  • Ready (form)data-seg-form once the catalog loads
  • Resultdata-seg-result (-headline mean IoU / mean Dice / passed, -regions per-region table) after a successful POST; payload error in data-seg-evaluate-error
  • Offline — SSR shell; lane error state when fetch unavailable
  • Standalone PWA — desktop layout; quickAction anchors 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 carries regionId, predictedArea, groundTruthArea, and intersectionArea
  • "Evaluate segmentation" (<button data-seg-submit>) — POSTs the parsed JSON to /v1/admin/aja/segmentation/evaluate

Route Map panel#

  • 5 entries (<article> per path + 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.ts covers signed-in shell render, the ready segmentation JSON form, malformed JSON client guard with no POST, real BFF duplicate-region validation detail, real IoU/Dice output (mean IoU 0.6325, mean Dice 0.725, r3 fail), 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/segmentation on 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#

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.