Context. surface studio · domain hathor · route /studio/hathor/pre-production-project-management · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/pre-production-project-management/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)' - '2026-07-03 focused real-dev-infra walk — apps/oshun/web/e2e/studio-hathor-pre-production-project-management.spec.ts now covers anonymous redirect, Hathor-admin live category catalog, real @hathor/pre-production default / healthy / lopsided project-health scores through the local BFF, browser bearer propagation, client/BFF/malformed/ transport errors, loading/503/malformed catalog states, non-admin fail-closed state, pending lockout, route-map and quick-action selectors, mobile 44px/no-overflow checks, scoped axe, and direct BFF auth/schema gates. Evidence: WALKTHROUGH/results/v1-real-infra-run-2026-06-22.md §275.
Purpose#
Admin lane console for the real @hathor/pre-production project-health scorer.
The operator enters a task board as one line per task
(taskId | category | status), and the lane returns the health score out of
100, blocked-task count, category breakdown, and any human-readable deductions.
Blocked tasks cost a share of 20 points proportional to the board, and lopsided
category distribution costs a flat 10. Admin-scoped and fail-closed.
Entry points#
- Direct URL / bookmark —
/studio/hathor/pre-production-project-management;alternates.canonicalis set. - Quick-action from siblings — e.g. Hathor Pre-Production and Hathor World Version Branching link here; this page links to Visual Storyboarding.
- Studio overview — see
../../studio-overview.md.
Layout regions#
page.tsx renders inside <ShellLayout active="studio">:
- Workspace (
StudioHathorPreProductionProjectManagementWorkspace,data-hathor-pre-production-project-management-workspace):<h1>WorkspaceHeading— "Hathor Pre-Production Project Management Workspace"- Summary
<p data-hathor-pre-production-project-management-summary> - Project Health Lane: catalog state, then the task-board form, pending state, result, or inline error.
- Route Map panel
(
<section data-hathor-pre-production-project-management-route-map>,data-hathor-ppm-route-count="5",<h2>Route Map</h2>): 5 entries fromSTUDIO_HATHOR_PRE_PRODUCTION_PROJECT_MANAGEMENT_ROUTE_MAP, each carryingdata-hathor-ppm-route-map-entryanddata-route-path. - Quick-action lane (
data-hathor-ppm-quick-actions,data-hathor-ppm-quick-action-count="2"): Visual Storyboarding and Back to Studio workspace index. Each link carriesdata-hathor-ppm-quick-action.
States#
- Loading —
<p data-hathor-ppm-loading role="status" aria-live="polite">"Loading project-health engine…" while the GET catalog request is in flight. - Unauthorized —
data-hathor-ppm-unauthorized role="alert"notice on 401/403 (admin-scope required). - Error —
data-hathor-ppm-error role="alert"notice on a non-OK catalog response, malformed catalog payload, or network failure. - Ready (form) —
data-hathor-ppm-categories role="status" aria-live="polite"+data-hathor-ppm-form data-hathor-ppm-form-state="idle" aria-busy="false"with the task textarea and submit button. - Pending scoring —
data-hathor-ppm-form-state="pending",aria-busy="true", disabled textarea, disabled submit button,data-hathor-ppm-submit-state="pending", and "Scoring…" button copy. - Result —
data-hathor-ppm-result role="status" aria-live="polite"withdata-hathor-ppm-score,data-hathor-ppm-counts,data-hathor-ppm-breakdown, and eitherdata-hathor-ppm-issuescontaining per-issuedata-hathor-ppm-issueentries ordata-hathor-ppm-no-issues. - Validation error —
data-hathor-ppm-parse-error role="alert"for live line-format parsing anddata-hathor-ppm-assess-error role="alert"for submit-time client validation, BFF 400 detail responses, malformed 200 result payloads, or transport failure.
Interactions#
-
data-hathor-ppm-tasks(textarea,aria-label="task board") — edit one task per line astaskId | category | status; disabled while scoring is pending. -
data-hathor-ppm-submit("Score project health" / "Scoring…") — parses the task board and POSTs it to the assess endpoint; on 200 with a validresultit renders score/counts/issues/breakdown, otherwise setsdata-hathor-ppm-assess-errorfromdetailor the fail-closed fallback. - Route Map entries — verify against
STUDIO_HATHOR_PRE_PRODUCTION_PROJECT_MANAGEMENT_ROUTE_MAP(5 entries), with stabledata-route-pathordering. - Quick-action links — Visual Storyboarding
(
data-hathor-ppm-quick-action="visual-storyboarding"→/studio/hathor/visual-storyboarding), Back to Studio (data-hathor-ppm-quick-action="studio-index"→/studio).
Data & contracts#
- Reads:
GET /v1/admin/hathor/pre-production-project-management(catalog:categories). - Writes:
POST /v1/admin/hathor/pre-production-project-management/assesswith{ tasks: [{ taskId, category, status }] }. - Realtime: none.
- Caching: client fetch on mount,
cache: 'no-store',buildBffAuthHeaders(),AbortControlleron unmount. - Auth: admin-scoped, fail-closed (401/403 → unauthorized state); route is behind the signed-in + studio proxy gate.
- Client parsing: GET catalog requires
categories: string[]; POST success requires numericscore, numerictotalTasks, numericblockedTasks, string-arrayissues, and numerictasksByCategoryentries before rendering a result.
Cross-references#
- Parent:
../../studio-overview.md - Shell:
../../../shell/04-auth-session.md - Component sources:
apps/oshun/web/src/components/studio/StudioHathorPreProductionProjectManagementWorkspace.tsxapps/oshun/web/src/components/studio/StudioHathorPreProductionProjectManagementRouteMap.ts
- Sibling routes:
./studio-hathor-visual-storyboarding.md,./studio-hathor-pre-production.md,./studio-hathor-world-version-branching.md
Automated coverage#
apps/oshun/web/e2e/studio-hathor-pre-production-project-management.spec.tscovers: anonymous redirect, Hathor-admin shell entry, live project-health category catalog, default blocked-board score, edited healthy-board score, edited lopsided-board score, browser bearer propagation, scoped axe, 44 px controls, route map, quick actions, client-only malformed line validation with zero POSTs, BFF detail surfacing, malformed success payload handling, transport failure, catalog loading/503/malformed states, non-admin fail-closed state, pending scoring lockout, mobile no-overflow containment, and direct BFF auth/schema gates.- Focused component tests:
StudioHathorPreProductionProjectManagementWorkspace.test.tsxandStudioHathorPreProductionProjectManagementWorkspace.integration.test.tsx. - Focused BFF route test:
apps/oshun/bff/src/__tests__/admin-hathor-pre-production-project-management-route.test.ts.
Open questions / known gaps#
- Hathor is
unconfirmed-v1perWALKTHROUGH/matrix/routes.csv; confirm whether the dedicated/studio/hathor/*admin lanes ship V1 or are internal-only. Confirmed in V1 viaV1/TODOS.md§34 and the 2026-05-29 surface inventory. - The route-map sub-routes are listed but their concrete
page.tsxfiles are not present; confirm whether they remain route-map placeholders or need dedicated deep-link pages. - Manual assistive-technology pass remains pending; automated scoped axe and touch-target assertions pass for this route.