Context. surface customer · domain veritas · route /domains/veritas/claims/[claimId] · auth signed-in · source apps/oshun/web/src/app/domains/veritas/claims/[claimId]/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. 2026-06-28 Codex claim-detail addendum — canonical claim, open-question fallback claim, unknown-id fallback, source/counterclaim tabs, source/evidence/Sophia/counterclaim inspections, report dialog wiring, library save/unsave, follow-up routing, standalone PWA restore, offline mobile interactions, horizontal overflow, and automatic axe coverage are verified by the E2E evidence below. 2026-06-29 Codex retraction addendum — claim-ai-governance-adoption now renders a retracted-source confidence band with soft-correction and Nisaba notebook-marker actions, covered by veritas-nisaba-bridge.spec.ts.
Purpose#
The dossier view for a single Veritas claim. Mounts
VeritasClaimDetailWorkspace with the route-param claimId and
origin = 'explore'. The workspace ties the claim to its grounded evidence
trail (Sophia), source lineage (Nisaba), counterclaims, and inspection overlay,
plus a Library save toggle and cross-domain inspection actions.
Entry points#
- Linked from
/domains/veritas/claims— verify the expand/detail affordance inVeritasClaimTrackerjumps here for the canonical detail workspace - Linked from
/domains/veritas/story/[id]—VeritasStoryWorkspacebuilds an href to/claims/<objectId>viabuildDomainShellHreffor the primary claim and the open-question claim - Linked from
/domains/veritas/topics/[topicId]— topic-hub claim rows link to the dossier route - Linked from
/veritasevidence rail — verify whether the broadsheet rail rows target this route - Direct URL / bookmark — yes (auth required);
claimIdis the path parameter
Layout regions#
page.tsx is a 'use client' component that reads claimId from useParams()
and renders
<VeritasClaimDetailWorkspace claimId={params.claimId} onClose={() => router.back()} origin="explore" />.
The workspace renders inline (not a fixed overlay) and contains several large
sections — observed in code (line numbers in VeritasClaimDetailWorkspace.tsx):
- Top toolbar: back button, library save toggle (per
claimSaved), cross-domain hrefs (claims directory, sources, research, claim, Nisaba) - Claim hero: claim text, confidence, verdict, evidence-summary chips (supporting / refuting / neutral / inconclusive)
- Retraction confidence band: only when
CLAIM_RETRACTION_STATES[claimKey]exists; rendersdata-veritas-claim-confidence-bandwith cascade/source id, prior/current confidence scores, aretracted_sourcegrounding badge, a private correction-letter link, and a Nisaba notebook-marker link. - Sophia evidence bundle card (
VeritasSophiaEvidenceBundleCard) whensophiaBundleis defined for the claim - Trust display rule callout — wired via
resolveVeritasTrustDisplayRuleonsurface: 'source-summary' - Inspection tabs (around line 1467):
Sources (N)andCounterclaims (M)— pill-style buttons markeddata-veritas-claim-detail-tab={sources|counterclaims} - Sources panel (when
activeTab === 'sources',data-veritas-claim-detail-panel="sources"):- Per
sources[]:SourceListItemwith title, subtitle, meta, tag pills, footer copy, and two trailing actions —Inspect source(opensVeritasInspectionOverlayviahandleSourceInspection) andOpen lane(link tobuildDomainShellHref('veritas', source.href, …))
- Per
- Counterclaims panel (when
activeTab === 'counterclaims',data-veritas-claim-detail-panel="counterclaims"):- Per counterclaim:
EvidenceCardwith confidence-band label and source-quality label; tag pills; "Inspect counterclaim" button (opensVeritasInspectionOverlay) and inspected-source counts
- Per counterclaim:
VeritasInspectionOverlay— overlay modal driven byactiveInspectionstate; opened by inspect-source / inspect-counterclaim buttons; surfaces plain-language read, keep-in-mind, chips, and a list of follow-up actions (e.g., Nisaba source-lineage handoff, including the counterclaim-specific source-lineage handoff)
States#
- Loading — workspace renders synchronously from imported canonical
claim data (
CANONICAL_CLAIMS[claimKey]); no fetch - Populated, supporting evidence > 0 —
claim-renewables-capacityrenders the verified claim with three source rows, two counterclaims, ready Sophia bundle, and hidden fallback state. - Counterclaim/refuting lane —
counterclaim-storage-needs-grid-buildoutopens an inspection overlay with evidence/caution copy for the rebuttal lane. - Unsupported claim fallback —
claim-storage-ramprendersdata-veritas-claim-fallback-state="visible"while still carrying its own source, counterclaim, and Sophia bundle context. - Retracted-source confidence band —
claim-ai-governance-adoptionrendersdata-veritas-claim-retraction-state="retracted-source"and a visibledata-veritas-claim-confidence-bandforcascade-ai-governance-survey-retraction, sourcesource-ai-governance-survey, and confidence54 -> 33. - Unknown id fallback — an unrecognised
claimIdis documented as the current behavior: the workspace preserves the requested id but displaysclaim-renewables-capacity. - Library: saved —
claimSavedbecomes true after the save toggle and is exposed on both root and button state attributes. - Library: unsaved — default and second toggle state verified.
- Active tab: sources — default per
useState<ClaimDetailTab>('sources') - Active tab: counterclaims — switched via the pill button; active tab and panel count attributes update.
- Inspection open —
activeInspection !== nullshows theVeritasInspectionOverlay - Sophia bundle present — both current canonical claims render ready Sophia bundle cards and their inspect/action affordances.
- Offline — workspace uses imported canonical data; mobile test toggles
save, opens source inspection, and switches tabs while
context.setOffline(true). - Standalone PWA —
mockStandaloneLaunch()restores directly to/domains/veritas/claims/claim-storage-ramp. - Reduced motion / axe — the shared Playwright fixture emulates reduced motion and runs the automatic serious/critical axe gate after each route test.
- Mobile horizontal overflow — standalone/offline test asserts no body or document overflow at 390×844.
Interactions#
Top toolbar#
- Back (ChevronLeft,
[data-veritas-claim-back]) — keyboard Enter invokesonClose()→router.back()and returns to/library. - Library save toggle (button, see
handleClaimSaveToggle)- Function: toggles claim in
useOshunWebLibraryStoreviatoggleOshunWebLibraryItem; firestrackLibraryItemSavedortrackLibraryItemUnsavedwith payload including domainveritas,itemId,itemType,source(origin),surface: 'panel', andtargetPath - Telemetry:
library_item_saved/library_item_unsaved
- Function: toggles claim in
- Report (
TrustSafetyFlagButton,targetKind="content")- Function: opens the trust-and-safety report dialog for this claim
(
targetId=veritas://claims/<objectId>,targetLabel= claim title) - Routing: submits through
submitTrustSafetyFlagAction→POST /v1/user-reports; customer reports surface in the admin moderation workspaceuserReportsqueue
- Function: opens the trust-and-safety report dialog for this claim
(
Tabs#
- Sources (N) (button,
data-veritas-claim-detail-tab="sources")- Function:
setActiveTab('sources'); default - Icon:
Files
- Function:
- Counterclaims (M) (button,
data-veritas-claim-detail-tab="counterclaims")- Function:
setActiveTab('counterclaims') - Icon:
Split
- Function:
Sources panel — per source#
- Inspect source (button,
data-veritas-claim-inspect-source={sourceId})- Function:
handleSourceInspection(sourceId)builds aVeritasInspectionModel(withplainLanguageRead,keepInMind, chips, and Nisaba follow-up actions viaresolveVeritasNisabaClaimRelationship), setsactiveInspection, and firestrackVeritasInspectionOpened({ workspace: 'claim-detail', kind: 'source', itemId, source: origin })
- Function:
- Open lane (link,
data-veritas-claim-source-action={sourceId})- Function: navigates to
buildDomainShellHref('veritas', source.href, origin, stack) - Current E2E verifies the generated
source-ieahref preservespath=/sources?sourceId=s3; full destination rendering remains covered by source-directory route specs.
- Function: navigates to
Retraction confidence band#
- Read soft correction (link,
data-veritas-claim-retraction-action="open-soft-correction")- Function: opens
/veritas/retractionwith the cascade and claim query attached so the private correction letter can explain why the confidence band changed.
- Function: opens
- Review notebook marker (link,
data-veritas-claim-retraction-action="open-nisaba-notebook-marker")- Function: opens
/nisaba/notebookwithorigin=veritas-retractionand the cascade id; E2E verifies the destination renders the notebook-level Veritas retraction notice.
- Function: opens
Counterclaims panel — per counterclaim#
- Inspect counterclaim (button,
data-veritas-claim-counterclaim-inspect={objectId})- Function:
handleCounterclaimInspection(counterclaim.objectId)— builds a counterclaim inspection model, firestrackVeritasInspectionOpened, and includesdata-veritas-inspection-action="open-nisaba-counterclaim-lineage"so the disagreement source trail can be opened in Nisaba
- Function:
- Inline canonical text — counterclaim rows render their canonical text inline inside the evidence card body.
- Inspected-source counter pill (
MetaPill) — visual; reads "of sources inspected"
VeritasInspectionOverlay#
- Close —
setActiveInspection(null) - Action button(s) (per
model.actions) — link per action, e.g., "Open source-lineage trail" linking to Nisaba - Counterclaim source-lineage action —
data-veritas-inspection-action="open-nisaba-counterclaim-lineage"links to/domains/nisabawith the counterclaim id in the source-lineage target path; E2E follows it to a real[data-nisaba-surface]
Current E2E evidence#
apps/oshun/web/e2e/veritas-claim-detail-workspace.spec.ts—renders the canonical claim, library toggle, report affordance, inspections, and tab lanescovers direct route load, canonical claim state attributes, source and counterclaim counts, hidden fallback, ready Sophia bundle, save/unsave, Trust & Safety report dialog wiring, source lane hrefs, source/evidence/Sophia and counterclaim inspection overlays, evidence citation rendering, counterclaims tab state, counterclaim confidence/source-quality labels, and keyboard Back.apps/oshun/web/e2e/veritas-claim-detail-workspace.spec.ts—hydrates the open-question claim through the shell and preserves follow-up routingcovers shell query hydration,claim-storage-ramp, visible unsupported-claim fallback, ready Sophia bundle, source inspection, counterclaim inspection, and follow-up navigation back into the Veritas source directory path.apps/oshun/web/e2e/veritas-claim-detail-workspace.spec.ts—documents the unknown-id fallback and keeps the route inspectablecovers the current fallback behavior for an unknown[claimId].apps/oshun/web/e2e/veritas-claim-detail-workspace.spec.ts—restores standalone, remains usable offline on mobile, and avoids horizontal overflowcovers standalone PWA restoration, offline save toggle, offline source inspection, offline counterclaims tab switch, and 390×844 horizontal-overflow assertions.apps/oshun/web/e2e/veritas-nisaba-bridge.spec.ts—retracted source pin opens the notebook marker and Nisaba edition diffcovers theclaim-ai-governance-adoptionretracted-source root attributes, confidence-band cascade/source/score attributes,retracted_sourcegrounding badge, soft-correction href, real navigation into/nisaba/notebook, and the downstream/nisaba/compareedition-diff correction path.apps/oshun/web/e2e/veritas-nisaba-bridge.spec.ts—counterclaim inspection emits telemetry and opens Nisaba counterclaim lineageswitches to the Counterclaims tab, openscounterclaim-capacity-is-not-generation, captures theveritas_inspection_openedanalytics event, asserts theopen-nisaba-counterclaim-lineagehref, and follows it to the real Nisaba surface.
Data & contracts#
- Reads (synchronous, imported):
CANONICAL_CLAIMS[claimKey]— canonical claim recordCLAIM_SOURCES[claimKey]— source listCLAIM_COUNTERCLAIMS[claimKey]— counterclaim listCLAIM_COUNTERCLAIM_SOURCE_RECORDS[claimKey]— counterclaim source dataCLAIM_RETRACTION_STATES[claimKey]— optional retracted-source confidence band and correction/notebook handoff linksVERITAS_CLAIM_SOPHIA_EVIDENCE_BUNDLES[claim.objectId]— Sophia bundle
- Domain helpers (from
libs/oshun/domain-veritas/src):buildVeritasCounterclaimRepresentationresolveVeritasTrustDisplayRuleresolveVeritasNisabaClaimRelationshipresolveVeritasSophiaClaimEvidenceRelationshipresolveVeritasUnsupportedClaimFallbackderiveGroundedEvidenceStatus
- Library store:
useOshunWebLibraryStore(read);toggleOshunWebLibraryItem(write) - Telemetry:
trackLibraryItemSaved,trackLibraryItemUnsaved(@/analytics/librarySaveTelemetry)trackVeritasInspectionOpened(@/analytics/veritasWorkspaceTelemetry)
- Realtime: none
- Caching: imported canonical data — static at build time
- Auth/role check: shell middleware (verify)
- Page metadata: not set (client component); no
sr-only <h1>in this page (unlike sibling tools)
Cross-references#
- Component:
apps/oshun/web/src/components/domains/veritas/VeritasClaimDetailWorkspace.tsx - Tab type:
ClaimDetailTab = 'sources' | 'counterclaims'(line 56) - Inspection overlay component:
apps/oshun/web/src/components/domains/veritas/VeritasInspectionOverlay.tsx - Sophia bundle card:
apps/oshun/web/src/components/domains/veritas/VeritasSophiaEvidenceBundleCard.tsx - Sibling routes:
domains-veritas-claims.md— list/trackerdomains-veritas-story-id.md— links here from the story workspacedomains-veritas-topics-topicId.md— topic hub links here
- Customer-facing alternates:
veritas-claim.md,veritas-counterclaims.md - Feature spec:
V1/features.md
Open questions / known gaps#
- The workspace provides a visible
<h1>via[data-veritas-claim-detail-title]; no separate route-levelsr-onlyheading is required for this route. - If
params.claimIddoesn't match a key inCANONICAL_CLAIMS,getClaimKeyfalls back to the renewable-capacity claim. This behavior is now documented in E2E, but product should still decide whether V1 wants a 404 instead. - Source rows have an "Open lane" link to
source.href; this route spec verifies href generation, while source-directory destination rendering is owned by source-directory route specs. - Counterclaim inspections fire
trackVeritasInspectionOpenedin the same handler path as source/evidence inspections. - Counterclaim inspections expose a counterclaim-specific Nisaba source-lineage action; the browser spec follows the link through the real shell to Nisaba.
- The Library save toggle telemetry uses
surface: 'panel'; verify the analytics schema accepts this constant