Context. surface studio · domain hathor · route /studio/hathor/workbench-worlds · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/workbench-worlds/page.tsx
Last walked. 2026-06-29 standalone real-BFF route addendum: the dedicated Playwright spec now covers direct admin navigation, real region catalog GET, seeded temperate-forest analysis, edited volcanic-wasteland analysis, client-only malformed JSON rejection, live BFF 400 detail, catalog loading/error state, pending submit disablement, non-admin fail-closed state, route-map and quick-action affordances, 44px touch checks, shared axe, and anonymous redirect. Evidence: WALKTHROUGH/results/v1-real-infra-run-2026-06-22.md §230; apps/oshun/web/e2e/studio-hathor-workbench-worlds.spec.ts. 2026-05-29 automated runtime walk 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 @hathor/domain-models region geography scorers. The
analyze lane describes a world region (terrain coverage, danger level + sources,
biome, flora/fauna diversity, exploration status) and returns its
coverage-weighted travel speed, composite danger (0–10), estimated biodiversity
(0–100), exploration level (0–4), and dominant terrain. Admin-scoped and
fail-closed.
Entry points#
- Direct URL / bookmark —
/studio/hathor/workbench-worlds;alternates.canonicalis set. - Quick-action from siblings — this page links to the Workbench Dashboard lane.
- Studio overview — see
../../studio-overview.md.
Layout regions#
page.tsx renders inside <ShellLayout active="studio">:
- Workspace (
StudioHathorWorkbenchWorldsWorkspace,data-hathor-workbench-worlds-workspace):<h1>WorkspaceHeading— "Hathor Workbench Worlds Workspace"- Summary
<p data-hathor-workbench-worlds-summary> - The catalog state (
data-hathor-ww-catalog), then the region form (with a reference<details>) + pending submit state + result.
- Route Map panel (
<section data-hathor-workbench-worlds-route-map>,data-hathor-ww-route-count="5",<h2>Route Map</h2>): 5 entries fromSTUDIO_HATHOR_WORKBENCH_WORLDS_ROUTE_MAP(path + purpose). - Quick-action lane (
<section data-hathor-ww-quick-actions>,data-hathor-ww-quick-action-count="2"): Workbench Dashboard (data-hathor-ww-quick-action="workbench-dashboard"), Back to Studio workspace index (data-hathor-ww-quick-action="studio-index").
States#
- Loading —
<p data-hathor-ww-loading>"Loading region engine…". - Unauthorized —
data-hathor-ww-unauthorizedon 401/403 (admin-scope). - Error —
data-hathor-ww-erroron a non-OK catalog response or network failure. - Ready (form) —
data-hathor-ww-formwith the region textarea and the reference disclosure (data-hathor-ww-catalog,data-hathor-ww-terrains,data-hathor-ww-biomes). - Pending submit —
data-hathor-ww-submit-state="pending"; submit is disabled witharia-disabled="true"andaria-busy="true"until the BFF response returns. - Result —
data-hathor-ww-resultwithdata-hathor-ww-name,data-hathor-ww-travel,data-hathor-ww-danger,data-hathor-ww-biodiversity,data-hathor-ww-exploration, anddata-hathor-ww-dominant. - Validation error —
data-hathor-ww-analyze-errorfor malformed JSON or a failed POST.
Interactions#
-
data-hathor-ww-region(textarea,aria-label="region json") — edit the region JSON. -
data-hathor-ww-submit("Analyze region") — parses the JSON and POSTs{ region }; on 200 with a validresultrenders the metrics. - Route Map entries — verify against
STUDIO_HATHOR_WORKBENCH_WORLDS_ROUTE_MAP(5 entries). - Quick-action links — Workbench Dashboard
(
/studio/hathor/workbench-dashboard), Back to Studio (/studio).
Data & contracts#
- Reads:
GET /v1/admin/hathor/workbench-worlds(catalog:terrainTypes,dangerLevels,biomes,explorationStatuses). - Writes:
POST /v1/admin/hathor/workbench-worlds/analyzewith{ region }. - Realtime: none.
- Caching: client fetch on mount,
cache: 'no-store',buildBffAuthHeaders(),AbortControlleron unmount. - Auth: admin-scoped, fail-closed (401/403 → unauthorized); route is behind the signed-in + studio proxy gate.
Cross-references#
- Parent:
../../studio-overview.md - Component sources:
apps/oshun/web/src/components/studio/StudioHathorWorkbenchWorldsWorkspace.tsxapps/oshun/web/src/components/studio/StudioHathorWorkbenchWorldsRouteMap.ts
- Siblings:
./studio-hathor-workbench-dashboard.md,./studio-hathor-workbench-world-editor.md,./studio-hathor-geography-modeling.md
E2E coverage#
apps/oshun/web/e2e/studio-hathor-workbench-worlds.spec.tscovers the standalone route against the real dev BFF: direct admin navigation, catalog GET with bearer forwarding, seeded temperate-forest analysis, edited volcanic-wasteland analysis, malformed JSON zero-POST rejection, live BFF 400 detail, catalog loading/error state, pending submit lockout, non-admin fail-closed state, route-map and quick-action affordances, 44px checks for the editor, submit control, and quick-action links, anonymous redirect-before-render, and the shared axe gate.
Open questions / known gaps#
- The analyzer scores a single region; confirm whether multi-region or whole-world aggregation belongs here or in a separate workbench surface.
- Hathor is confirmed in V1 per
WALKTHROUGH/matrix/routes.csvandWALKTHROUGH/matrix/coverage.md(product-owner confirmation recorded 2026-05-29 for Bellona / Hathor / Neith). - Manual screen-reader pass remains for the live browser surface; automated axe and touch-target coverage now pass for the standalone route.