---
path: /studio/yemaya/crew-management
surface: studio
domain: yemaya
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/yemaya/crew-management/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 · Yemaya · Crew Management

## Purpose

Admin lane console wired to the crew-schedule analyzer: paste a JSON array of
crew assignments and the scheduling lane detects double-bookings (same member,
overlapping time windows on the same shoot day) and reports per-member
utilization for call-sheet planning.

## Entry points

- Studio index quick-actions.
- No breadcrumb panel on this page.
- This page links out to `/studio/yemaya/budget-management` (which links back).
- Direct URL / bookmark (signed-in + studio entitlement).

## Layout regions

`page.tsx` renders `ShellLayout active="studio"` and:

- **Workspace panel** (`StudioYemayaCrewManagementWorkspace`,
  `data-yemaya-crew-management-workspace`):
  - `<h1>` "Yemaya Crew Management Workspace".
  - Summary `<p data-yemaya-crew-management-summary>` (describes the real
    crew-schedule analyzer).
  - **Crew Scheduling Lane** — `<h2 data-yemaya-cm-lane-heading>` "Crew Scheduling
    Lane" with loading / unauthorized / error / ready-form / result states.
- **Route Map panel** (`data-yemaya-crew-management-route-map`): `<h2>` "Route
  Map" with five entries.
- **Quick-action panel**: two `quickAction` links.

## States

- [ ] **Loading** — `data-yemaya-cm-loading` ("Loading crew-schedule console…").
- [ ] **Unauthorized** — 401/403 → `data-yemaya-cm-unauthorized` ("Access
      restricted.") with reason "Yemaya workspace scope required to analyze the
      crew schedule.".
- [ ] **Error** — non-OK / malformed catalog → `data-yemaya-cm-error`.
- [ ] **Ready-form** — catalog loaded: `data-yemaya-cm-engine-summary`
      (`catalog.summary`) + `data-yemaya-cm-rule` (`catalog.conflictRule`) + the
      analyze form.
- [ ] **Result** — 200 → `data-yemaya-cm-result` with `data-yemaya-cm-headline`
      (member / assignment / conflict counts), an optional
      `data-yemaya-cm-conflicts-list` (each `data-yemaya-cm-conflict-row`), and
      `data-yemaya-cm-members-list` (each `data-yemaya-cm-member-row`).
- [ ] **Validation error** — invalid JSON, non-array assignments, or a non-200
      POST → `data-yemaya-cm-analyze-error`.

## Interactions

### Crew Scheduling Lane

`<form data-yemaya-cm-form>`:

- [ ] **Crew assignments (JSON array)** — `<textarea data-yemaya-cm-assignments>`
      (aria-label "crew assignments json"), seeded with a sample roster.
- [ ] **"Analyze schedule"** submit (`data-yemaya-cm-submit`) — parses the
      assignments JSON, requires an array, then POSTs `{ assignments }`.

### Route map

`data-yemaya-crew-management-route-map` — five entries:

- [ ] `/studio/yemaya/crew-management`
- [ ] `/studio/yemaya/crew-management/scenes/[sceneId]`
- [ ] `/studio/yemaya/crew-management/exports/[exportId]`
- [ ] `/studio/yemaya/crew-management/revisions/[revisionId]`
- [ ] `/studio/yemaya/crew-management/governance/[policyId]`

### Quick actions

- [ ] **"Open Yemaya Budget Management workspace"** →
      `/studio/yemaya/budget-management`.
- [ ] **"Back to Studio workspace index"** → `/studio`.

## Data & contracts

- **Reads**: `GET /v1/admin/yemaya/crew-management` (catalog; `summary`,
  `conflictRule`) on mount with `buildBffAuthHeaders()`, `cache: 'no-store'`.
- **Writes**: `POST /v1/admin/yemaya/crew-management/analyze` → `{ result: {
  totalAssignments, totalMembers, conflictCount, conflicts[], members[] } }`.
- **Realtime**: None.
- **Caching**: client `fetch` on mount, no-store; aborted on unmount.
- **Auth/role check**: admin-scoped, fail-closed; route additionally signed-in +
  studio via the proxy gate.

## Cross-references

- Workspace source:
  `apps/oshun/web/src/components/studio/StudioYemayaCrewManagementWorkspace.tsx`
- Route map source:
  `apps/oshun/web/src/components/studio/StudioYemayaCrewManagementRouteMap.ts`
- Page source: `apps/oshun/web/src/app/studio/yemaya/crew-management/page.tsx`
- Sibling: [`studio-yemaya-budget-management.md`](./studio-yemaya-budget-management.md)
- Studio overview: [`studio-overview.md`](../../studio-overview.md)
- Feature spec: [`V1/features.md`](../../../../V1/features.md)

## Open questions / known gaps

- [ ] The summary copy still carries the legacy "dense expert-mode controls,
      progressive disclosure" phrasing, but the rendered lane is the single
      scheduling analyzer form — no expert-mode shell remains. Confirm the copy
      should be trimmed.
- [ ] Assignments are entered as raw JSON; verify whether a structured roster
      table is planned.
- [ ] Route-map children (`scenes`/`exports`/`revisions`/`governance`) are a
      sitemap contract; confirm which dynamic pages exist.
