V1 Web PWA · Surface walkthrough

Studio Hathor · Workbench Locations

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/workbench-locations · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/workbench-locations/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 @hathor/domain-models location scorers. The assess lane describes a location (condition, danger level, atmosphere, services, economy, districts, defenses) and returns its habitability, prosperity, safety, and defensive-strength scores, each out of 100. Admin-scoped and fail-closed.

Entry points#

  • Direct URL / bookmark/studio/hathor/workbench-locations; alternates.canonical is set.
  • Quick-action from siblings — this page links to the Workbench Characters lane.
  • Studio overview — see ../../studio-overview.md.

Layout regions#

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

  • Workspace (StudioHathorWorkbenchLocationsWorkspace, data-hathor-workbench-locations-workspace):
    • <h1> WorkspaceHeading — "Hathor Workbench Locations Workspace"
    • Summary <p data-hathor-workbench-locations-summary>
    • The catalog state, then the location form (with a reference-enumerations <details>) + the four scored metric bars.
  • Route Map panel (<section data-hathor-workbench-locations-route-map>, <h2>Route Map</h2>): 5 entries from STUDIO_HATHOR_WORKBENCH_LOCATIONS_ROUTE_MAP (path + purpose).
  • Quick-action lane (className="quickAction" Links): Workbench Characters, Back to Studio workspace index.

States#

  • Loading<p data-hathor-wl-loading> "Loading location engine…".
  • Unauthorizeddata-hathor-wl-unauthorized on 401/403 (admin-scope).
  • Errordata-hathor-wl-error on a non-OK catalog response or network failure.
  • Ready (form)data-hathor-wl-form with the location textarea and the reference-enumerations disclosure (data-hathor-wl-conditions, data-hathor-wl-dangers).
  • Resultdata-hathor-wl-result with data-hathor-wl-name and four data-hathor-wl-metric bars (habitability / prosperity / safety / defensive).
  • Validation errordata-hathor-wl-assess-error for malformed JSON or a failed POST.

Interactions#

  • data-hathor-wl-location (textarea, aria-label="location json") — edit the location JSON.
  • data-hathor-wl-submit ("Assess location") — parses the JSON and POSTs { location }; on 200 with a valid result renders the four scores.
  • Route Map entries — verify against STUDIO_HATHOR_WORKBENCH_LOCATIONS_ROUTE_MAP (5 entries).
  • Quick-action links — Workbench Characters (/studio/hathor/workbench-characters), Back to Studio (/studio).

Data & contracts#

  • Reads: GET /v1/admin/hathor/workbench-locations (catalog: conditions, dangerLevels, atmospheres, fortificationLevels).
  • Writes: POST /v1/admin/hathor/workbench-locations/assess with { location }.
  • Realtime: none.
  • Caching: client fetch on mount, cache: 'no-store', buildBffAuthHeaders(), AbortController on unmount.
  • Auth: admin-scoped, fail-closed (401/403 → unauthorized); route is 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 lanes ship V1 or are internal-only.