---
path: /studio/aja/depth-analysis
surface: studio
domain: aja
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/aja/depth-analysis/page.tsx
status: walked
last_walked:
  '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)'
---

# Studio Aja · Depth Analysis

## Purpose

Leaf lane console that wires the real `@aja/pose-lifting` `sampleDepth`
primitive. Given a depth grid (width×height, row-major) and a set of normalized
`(x, y)` keypoint locations, the lane returns the bilinearly-interpolated depth
at each point — the per-joint operation a 2D→3D pose lift relies on.

## Entry points

- **Direct URL / bookmark** — `/studio/aja/depth-analysis`.
- **Studio nav** — Domain-bridge studios section of `/studio`.
- **Sibling quick-action** — "Open Aja Pose Estimation workspace"
  (`/studio/aja/pose-estimation`).

## Layout regions

`page.tsx` renders inside `<ShellLayout active="studio">`:

- **Workspace** `<StudioAjaDepthAnalysisWorkspace />`:
  - `<h1>` "Aja Depth Analysis Workspace" + summary
    (`data-aja-depth-analysis-summary`).
  - Capability Summary panel (`data-aja-depth-analysis-capability-summary`,
    `<h2>`) — a static descriptive block, no cards.
  - Depth Sampling Operations Lane
    (`data-aja-depth-analysis-operations-lane`, `<h2>`) — the form (states
    below); includes `data-aja-da-sampler-summary` (catalog `summary`).
- **Route Map panel** (`data-aja-depth-analysis-route-map`, `<h2>` "Route
  Map"): 5 `STUDIO_AJA_DEPTH_ANALYSIS_ROUTE_MAP` entries — primary, scenes,
  exports, revisions, governance.
- **Quick-action lane**: two `Link.quickAction` anchors (Pose Estimation, Back
  to Studio). No breadcrumb panel on this route.

## States

The lane fetches `GET /v1/admin/aja/depth-analysis` on mount.

- [ ] **Loading** — `data-aja-da-loading` "Loading depth sampler…".
- [ ] **Unauthorized** — `data-aja-da-unauthorized` (401/403; default "Aja
      workspace scope required to sample depth.").
- [ ] **Error** — `data-aja-da-error`.
- [ ] **Ready (form)** — `data-aja-da-form`.
- [ ] **Result** — `data-aja-da-result` with `data-aja-da-headline` (grid size +
      depth range) and `data-aja-da-samples` rows (`data-aja-da-sample-row`).
- [ ] **Validation error** — `data-aja-da-sample-error` (e.g. "Data must be N
      comma-separated numbers." / "Points must be valid JSON.").

## Interactions

### Sample form (`data-aja-da-form`)

- [ ] **Width** — input `data-aja-da-width` (default `2`).
- [ ] **Height** — input `data-aja-da-height` (default `2`).
- [ ] **Depth grid** — input `data-aja-da-data` (default `0, 1, 2, 3`).
- [ ] **Query points (JSON)** — textarea `data-aja-da-points`.
- [ ] **Sample depth** — submit `data-aja-da-submit`; fires
      `POST /v1/admin/aja/depth-analysis/sample` with
      `{ width, height, data, points }`.

### Route Map

- [ ] **Route entries** (5) — non-interactive listing.

### Quick-action lane

- [ ] **"Open Aja Pose Estimation workspace"** → `/studio/aja/pose-estimation`
- [ ] **"Back to Studio workspace index"** → `/studio`

## Data & contracts

- **Reads**: `GET /v1/admin/aja/depth-analysis` (catalog: `sampler`, `summary`,
  `reports`).
- **Writes**: `POST /v1/admin/aja/depth-analysis/sample` →
  `{ width, height, minDepth, maxDepth, samples }`.
- **Realtime**: none.
- **Caching**: client fetch on mount (`cache: 'no-store'`); SSR shell.
- **Auth/role check**: BFF endpoint admin-scoped + fail-closed; route gated
  signed-in + studio via proxy.

## Cross-references

- Parent: [`../../studio-overview.md`](../../studio-overview.md)
- Sibling (quick-action): `/studio/aja/pose-estimation`
- Component sources:
  - `apps/oshun/web/src/components/studio/StudioAjaDepthAnalysisWorkspace.tsx`
  - `apps/oshun/web/src/components/studio/StudioAjaDepthAnalysisRouteMap.ts`

## Open questions / known gaps

- [ ] Route Map lists `scenes`/`exports`/`revisions`/`governance` child routes
      that are not yet implemented as pages.
