V1 Web PWA · Surface walkthrough

Studio Hathor · Screenplay Compilation

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

walked
8sections2 minread

On this page

Context. surface studio · domain hathor · route /studio/hathor/screenplay-compilation · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/screenplay-compilation/page.tsx

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)

Purpose#

Admin lane console for the real @hathor/lore-compiler ScreenplayCompiler. Compile a source story (scenes + characters) into a screenplay and export it to a film artifact format (Fountain / JSON / HTML / FDX / PDF / Avid log); each scene becomes an uppercased slugline (INT./EXT. LOCATION - TIME), and a scene missing its location is reported as a compile error rather than crashing the build. Admin-scoped and fail-closed.

Entry points#

  • Quick-action link from /studio/hathor/lore-compilation-for-engines (this page links out to lore-compilation-for-engines)
  • Aggregator embed: StudioHathorLoreCompilerWorkspace mounts this workspace inline as its "Screenplay Compilation Lane"
  • Direct URL / bookmark — yes; alternates.canonical set
  • Studio overview — see ../../studio-overview.md

Layout regions#

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

  • Workspace <section data-hathor-screenplay-compilation-workspace>:
    • <h1> (WorkspaceHeading) "Hathor Screenplay Compilation Workspace"
    • Summary <p data-hathor-screenplay-compilation-summary>
    • The compile form lane: data-hathor-scrpl-compile-form
  • Route Map panel (data-hathor-screenplay-compilation-route-map): <h2> "Route Map" + 5 entries from STUDIO_HATHOR_SCREENPLAY_COMPILATION_ROUTE_MAP
  • Quick-action lane: two Link.quickAction anchors — Lore Compilation for Engines, Back to Studio workspace index

States#

  • Loading<p data-hathor-scrpl-loading>
  • Unauthorizeddata-hathor-scrpl-unauthorized on 401/403 (admin Hathor scope required); fail-closed
  • Errordata-hathor-scrpl-error on non-OK GET / malformed catalog
  • Ready (form)data-hathor-scrpl-compile-form once the catalog loads
  • Resultdata-hathor-scrpl-result after a 200 compile; data-hathor-scrpl-compile-error for invalid JSON / non-200

Interactions#

Workspace body (compile form lane)#

  • Source story (JSON)<textarea data-hathor-scrpl-story> (aria-label "story json")
  • Export format<select data-hathor-scrpl-format> (Fountain / JSON / HTML / FDX / PDF / Avid log)
  • Compile screenplay<button data-hathor-scrpl-compile-submit type="submit"> → POST /v1/admin/hathor/screenplay-compilation/compile
  • Resultdata-hathor-scrpl-verdict plus the compiled data-hathor-scrpl-output

Route Map panel#

  • 5 route entries — verify match with STUDIO_HATHOR_SCREENPLAY_COMPILATION_ROUTE_MAP

Quick-action lane#

  • "Open Hathor Lore Compilation for Engines workspace" (→ /studio/hathor/lore-compilation-for-engines)
  • "Back to Studio workspace index" (→ /studio)

Data & contracts#

  • Reads: GET /v1/admin/hathor/screenplay-compilation on mount
  • Writes: POST /v1/admin/hathor/screenplay-compilation/compile
  • Realtime: none
  • Caching: client fetch on mount, cache: 'no-store'; buildBffAuthHeaders
  • Auth/role check: admin-scoped fail-closed (401/403); behind the signed-in
    • studio proxy gate

Cross-references#

Open questions / known gaps#

  • Hathor is unconfirmed-v1 per WALKTHROUGH/matrix/routes.csv. Confirm whether the dedicated /studio/hathor/* admin lane consoles ship in V1.
  • Route Map advertises drafts/, acts/, exports/, and governance/ sub-routes with no page.tsx yet.