Context. surface customer · domain veritas · route /domains/veritas/topics/[topicId] · auth signed-in · source apps/oshun/web/src/app/domains/veritas/topics/[topicId]/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; content re-verified 2026-06-03 against current source
Purpose#
The Veritas Topic Hub workspace, parameterised by a topicId route param.
Renders the same VeritasTopicHubWorkspace as /domains/veritas/topics, but
the topicId is taken from the URL — this is the canonical, shareable address
for a topic hub.
Entry points#
- Direct URL / bookmark — yes (auth required); the
topicIdsegment carries topic identity (e.g.,/domains/veritas/topics/renewable-energy) - Linked from
/domains/veritas/story/[id]— the story workspace builds a topic-hub href to/topics/<STORY_TOPIC.slug> - Linked from
/domains/veritas/topics— the topic follow-up "Topics" link in the default-topic workspace points back here - Linked from
/explore— topic discovery cards may target by id - Linked from
/library— verify whether saved topics restore via this route
Layout regions#
page.tsx is a 'use client' component:
const params = useParams<{ topicId: string }>();
<VeritasTopicHubWorkspace
topicId={params.topicId}
onClose={() => router.back()}
origin="explore"
/>;
The component contents are identical to /domains/veritas/topics. See
domains-veritas-topics.md for the full layout
breakdown (top toolbar with follow toggle, hero, two-column main+aside grid with
current read / timeline / clusters / claim posture / sources / alert controls /
follow-ups, plus the inspection overlay).
The topicId is resolved by getTopicKey(topicId):
function getTopicKey(topicId?: string): TopicKey | null {
if (topicId === undefined) {
return 'renewable-energy';
}
return isKnownTopicKey(topicId) ? topicId : null;
}
KNOWN_TOPIC_KEYS is ['renewable-energy', 'quantum-computing']. A known id
resolves to its key; only an absent id defaults to 'renewable-energy'; an
unknown id returns null, and the workspace renders
VeritasTopicNotFoundPanel ("Topic not found", data-veritas-topic-not-found,
~329-352). The code comment (~359-360) is explicit: "Earlier builds silently
rerouted unknown topic IDs to renewable-energy; that behaviour is gone."
States#
Same as domains-veritas-topics.md. Route-
specific notes:
-
topicId = 'renewable-energy'— renewable energy topic loads -
topicId = 'quantum-computing'— quantum topic loads -
topicId = <any other>—getTopicKeyreturnsnull→VeritasTopicNotFoundPanelrenders ("Topic not found",data-veritas-topic-not-found) listing the known hubs, not a silent reroute to renewable energy - No id — Next routing prevents this for
[topicId]segments
Interactions#
Same as domains-veritas-topics.md. The route
param flows through into telemetry:
- Follow toggle —
trackVeritasTopicFollowed/trackVeritasTopicUnfollowedpayloads includetopicId: topic.topicIdandtopicTitle: topic.title; these come from the resolvedTOPIC_HUBS[topicKey], not the raw URL param - Alert frequency change —
trackVeritasTopicAlertFrequencyUpdatedpayloads carry the sametopicIdandtopicTitlederived from the resolved topic - Inspection telemetry —
trackVeritasInspectionOpenedincludesworkspace: 'topic-hub'; the topic context lives implicitly in theitemIdof the claim/source being inspected
Data & contracts#
Same as domains-veritas-topics.md.
Additionally:
- Route param:
topicIdis captured viauseParams<{ topicId: string }>()and passed into the workspace getTopicKeymapping: returnsTopicKey | null— a known id (renewable-energy/quantum-computing) resolves to its key, an undefined id defaults torenewable-energy, and an unknown id returnsnull→ not-found panel
Cross-references#
- Component:
apps/oshun/web/src/components/domains/veritas/VeritasTopicHubWorkspace.tsx(shared with the default route) - Default-route counterpart:
domains-veritas-topics.md - Story workspace target:
domains-veritas-story-id.md(links to topic viaSTORY_TOPIC.slug) - Claim detail handoff:
domains-veritas-claims-claimId.md - Customer-facing alternate:
veritas-topic.md - Feature spec:
V1/features.md
Open questions / known gaps#
-
getTopicKeyrecognisesrenewable-energyandquantum-computing; an unknown id already surfacesVeritasTopicNotFoundPanelrather than a reroute. Confirm V1 plan to expand the topic dictionary when real data is wired (and whether the not-found panel should be a true 404) - No
loading.tsxorerror.tsxco-located; the workspace renders synchronously today - Library items resume via topic slug (
STORY_TOPIC.slug) — verify the slug values match the expectedtopicIdURL shape - No deep-link parameters for opening a specific claim/source inspection in the overlay on first render (compare with the Sophia bundle inspection)
- When V1 wires real data, decide whether unknown topic ids should 404 or redirect to a default topic