Context. surface studio · domain hathor · route /studio/hathor/sophia-citation-service · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/sophia-citation-service/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 @kalika/citations engine. The single Citation
Operations Lane serializes citation records to BibTeX / RIS / CSL-JSON and
canonicalizes raw DOI / arXiv identifier strings. Admin-scoped and fail-closed.
Entry points#
- Direct URL / bookmark —
/studio/hathor/sophia-citation-service;alternates.canonicalis set. - Quick-action from siblings — this page links to the Entity Version Management lane.
- Studio overview — see
../../studio-overview.md.
Layout regions#
page.tsx renders inside <ShellLayout active="studio">:
- Workspace (
StudioHathorSophiaCitationServiceWorkspace,data-hathor-sophia-citation-service-workspace):<h1>WorkspaceHeading— "Hathor Sophia Citation Service Workspace"- Summary
<p data-hathor-sophia-citation-service-summary> - Citation Operations Lane (
<h2 data-hathor-scs-lane-heading>): catalog state, then the export form and the identifier-canonicalize form, each with its own result.
- Route Map panel (
<section data-hathor-sophia-citation-service-route-map>,<h2>Route Map</h2>): 5 entries fromSTUDIO_HATHOR_SOPHIA_CITATION_SERVICE_ROUTE_MAP(path + purpose). - Quick-action lane (
className="quickAction"Links): Entity Version Management, Back to Studio workspace index.
States#
- Loading —
<p data-hathor-scs-loading>"Loading citation engine…". - Unauthorized —
data-hathor-scs-unauthorizedon 401/403 (admin-scope). - Error —
data-hathor-scs-erroron a non-OK catalog response or network failure. - Ready (forms) —
data-hathor-scs-engine-summary, thendata-hathor-scs-export-formanddata-hathor-scs-identify-form. - Export result —
data-hathor-scs-export-result(data-hathor-scs-export-meta+data-hathor-scs-export-output<pre>). - Identify result —
data-hathor-scs-identify-result(data-hathor-scs-identify-isdoi/-doi/-arxiv). - Validation errors —
data-hathor-scs-export-error/data-hathor-scs-identify-errorfor bad input or a failed POST.
Interactions#
-
data-hathor-scs-records(textarea,aria-label="citation records json") — the citation records array. -
data-hathor-scs-format(select fromcatalog.exportFormats) anddata-hathor-scs-export-submit("Export citations") — POSTs{ records, format }to the export endpoint. -
data-hathor-scs-identify-input(input,aria-label="identifier") anddata-hathor-scs-identify-submit("Canonicalize") — POSTs{ value }to the identify endpoint. - Route Map entries — verify against
STUDIO_HATHOR_SOPHIA_CITATION_SERVICE_ROUTE_MAP(5 entries). - Quick-action links — Entity Version Management
(
/studio/hathor/entity-version-management), Back to Studio (/studio).
Data & contracts#
- Reads:
GET /v1/admin/hathor/sophia-citation-service(catalog:summary,exportFormats,citationTypes,doiPattern). - Writes:
POST /v1/admin/hathor/sophia-citation-service/exportwith{ records, format };POST /v1/admin/hathor/sophia-citation-service/identifywith{ value }. - 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/StudioHathorSophiaCitationServiceWorkspace.tsxapps/oshun/web/src/components/studio/StudioHathorSophiaCitationServiceRouteMap.ts
- Siblings:
./studio-hathor-entity-version-management.md,./studio-hathor-research-grounding.md,./studio-hathor-sophia-integration.md
Open questions / known gaps#
- Backed by
@kalika/citations; confirm whether the Sophia-branded route name should be reconciled with the Kalika engine it actually calls. - Hathor is
unconfirmed-v1perWALKTHROUGH/matrix/routes.csv; confirm whether the dedicated/studio/hathor/*admin lanes ship V1 or are internal-only.