---
path: /studio/aja/retiming
surface: studio
domain: aja
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/aja/retiming/page.tsx
status: walked + e2e-covered
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 curve catalog, 44 px submit target, non-positive-parameter client guard
  with no POST, real BFF linear retiming samples, fail-closed
  loading/unauthorized/malformed-catalog 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)'
---

# Studio Aja · Retiming

## Purpose

Leaf lane console that wires the real `@aja/motion-processing` time-warp curve
factories. The operator picks a warp curve and parameter and the lane samples
the `(t)->t'` speed profile across normalized time — the remapping a
`MotionRetimer` applies to resample a clip.

## Entry points

- **Direct URL / bookmark** — `/studio/aja/retiming`.
- **Studio nav** — Domain-bridge studios section of `/studio`.
- **Sibling quick-action** — "Open Aja Physics Cleanup workspace"
  (`/studio/aja/physics-cleanup`).

## Layout regions

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

- **Workspace** `<StudioAjaRetimingWorkspace />`:
  - `<h1>` "Aja Retiming Workspace" + summary (`data-aja-retiming-summary`).
  - The catalog curve descriptor list (`data-aja-rt-curves`, rows
    `data-aja-rt-curve=<curve>`) + the sample form (states below).
- **Route Map panel** (`data-aja-retiming-route-map`, `<h2>` "Route Map"): 5
  `STUDIO_AJA_RETIMING_ROUTE_MAP` entries — primary, scenes, exports, revisions,
  governance.
- **Quick-action lane**: two `Link.quickAction` anchors. No breadcrumb panel.

## States

The lane fetches `GET /v1/admin/aja/retiming` on mount.

- [x] **Loading** — `data-aja-rt-loading` "Loading retiming curves…".
- [x] **Unauthorized** — `data-aja-rt-unauthorized` (401/403; default "Aja
      workspace scope required to view retiming.").
- [x] **Error** — `data-aja-rt-error`.
- [x] **Ready (form)** — `data-aja-rt-sample-form`.
- [x] **Result** — `data-aja-rt-result` with `data-aja-rt-result-curve` and the
      sampled rows (`data-aja-rt-sample-row`).
- [x] **Validation error** — `data-aja-rt-sample-error` (e.g. "Parameter must be
      a positive number." / "Sample count must be an integer ≥ 2.").

## Interactions

### Sample form (`data-aja-rt-sample-form`)

- [x] **Curve** — select `data-aja-rt-field-curve` (catalog `curves`; default
      `linear`).
- [x] **Parameter** — input `data-aja-rt-field-parameter` (default `2`).
- [x] **Sample count** — input `data-aja-rt-field-samples` (default `5`).
- [x] **Sample curve** — submit `data-aja-rt-sample-submit`; fires
      `POST /v1/admin/aja/retiming/sample` with
      `{ curve, parameter, sampleCount }`.

### Route Map

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

### Quick-action lane

- [x] **"Open Aja Physics Cleanup workspace"** → `/studio/aja/physics-cleanup`
- [x] **"Back to Studio workspace index"** → `/studio`

## E2E coverage

- [`apps/oshun/web/e2e/studio-aja-cleanup-lane-consoles.spec.ts`](../../../../apps/oshun/web/e2e/studio-aja-cleanup-lane-consoles.spec.ts)
  covers signed-in shell render, four-curve catalog, non-positive-parameter
  client guard with no `POST`, real BFF linear sample output
  (`0, 0.5, 1, 1.5, 2` warped times), route-map count, exact quick-action hrefs,
  44 px submit target, loading / unauthorized / malformed-catalog fail-closed
  states, mobile no-overflow, and direct BFF auth/schema/happy-path gates.

## Data & contracts

- **Reads**: `GET /v1/admin/aja/retiming` (catalog: `curves` — each
  `{ curve, parameter, defaultParameter, description }`).
- **Writes**: `POST /v1/admin/aja/retiming/sample` →
  `{ curve, parameter, sampleCount, 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/physics-cleanup`
- Component sources:
  - `apps/oshun/web/src/components/studio/StudioAjaRetimingWorkspace.tsx`
  - `apps/oshun/web/src/components/studio/StudioAjaRetimingRouteMap.ts`

## Known downstream boundaries

- Route-map sub-routes are descriptive contracts; implementation status of those
  child pages is tracked separately from this leaf console.
