V1 Web PWA · Surface walkthrough

Claim Detail Workspace · Veritas

A per-surface walkthrough of the V1 Web PWA customer surface: layout, states, interactions, data, and cross-references.

walked
9sections8 minread

On this page

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 in VeritasClaimTracker jumps here for the canonical detail workspace
  • Linked from /domains/veritas/story/[id]VeritasStoryWorkspace builds an href to /claims/<objectId> via buildDomainShellHref for 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 /veritas evidence rail — verify whether the broadsheet rail rows target this route
  • Direct URL / bookmark — yes (auth required); claimId is 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; renders data-veritas-claim-confidence-band with cascade/source id, prior/current confidence scores, a retracted_source grounding badge, a private correction-letter link, and a Nisaba notebook-marker link.
  • Sophia evidence bundle card (VeritasSophiaEvidenceBundleCard) when sophiaBundle is defined for the claim
  • Trust display rule callout — wired via resolveVeritasTrustDisplayRule on surface: 'source-summary'
  • Inspection tabs (around line 1467): Sources (N) and Counterclaims (M) — pill-style buttons marked data-veritas-claim-detail-tab={sources|counterclaims}
  • Sources panel (when activeTab === 'sources', data-veritas-claim-detail-panel="sources"):
    • Per sources[]: SourceListItem with title, subtitle, meta, tag pills, footer copy, and two trailing actions — Inspect source (opens VeritasInspectionOverlay via handleSourceInspection) and Open lane (link to buildDomainShellHref('veritas', source.href, …))
  • Counterclaims panel (when activeTab === 'counterclaims', data-veritas-claim-detail-panel="counterclaims"):
    • Per counterclaim: EvidenceCard with confidence-band label and source-quality label; tag pills; "Inspect counterclaim" button (opens VeritasInspectionOverlay) and inspected-source counts
  • VeritasInspectionOverlay — overlay modal driven by activeInspection state; 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 > 0claim-renewables-capacity renders the verified claim with three source rows, two counterclaims, ready Sophia bundle, and hidden fallback state.
  • Counterclaim/refuting lanecounterclaim-storage-needs-grid-buildout opens an inspection overlay with evidence/caution copy for the rebuttal lane.
  • Unsupported claim fallbackclaim-storage-ramp renders data-veritas-claim-fallback-state="visible" while still carrying its own source, counterclaim, and Sophia bundle context.
  • Retracted-source confidence bandclaim-ai-governance-adoption renders data-veritas-claim-retraction-state="retracted-source" and a visible data-veritas-claim-confidence-band for cascade-ai-governance-survey-retraction, source source-ai-governance-survey, and confidence 54 -> 33.
  • Unknown id fallback — an unrecognised claimId is documented as the current behavior: the workspace preserves the requested id but displays claim-renewables-capacity.
  • Library: savedclaimSaved becomes 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 openactiveInspection !== null shows the VeritasInspectionOverlay
  • 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 PWAmockStandaloneLaunch() 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 invokes onClose()router.back() and returns to /library.
  • Library save toggle (button, see handleClaimSaveToggle)
    • Function: toggles claim in useOshunWebLibraryStore via toggleOshunWebLibraryItem; fires trackLibraryItemSaved or trackLibraryItemUnsaved with payload including domain veritas, itemId, itemType, source (origin), surface: 'panel', and targetPath
    • Telemetry: library_item_saved / library_item_unsaved
  • 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 submitTrustSafetyFlagActionPOST /v1/user-reports; customer reports surface in the admin moderation workspace userReports queue

Tabs#

  • Sources (N) (button, data-veritas-claim-detail-tab="sources")
    • Function: setActiveTab('sources'); default
    • Icon: Files
  • Counterclaims (M) (button, data-veritas-claim-detail-tab="counterclaims")
    • Function: setActiveTab('counterclaims')
    • Icon: Split

Sources panel — per source#

  • Inspect source (button, data-veritas-claim-inspect-source={sourceId})
    • Function: handleSourceInspection(sourceId) builds a VeritasInspectionModel (with plainLanguageRead, keepInMind, chips, and Nisaba follow-up actions via resolveVeritasNisabaClaimRelationship), sets activeInspection, and fires trackVeritasInspectionOpened({ workspace: 'claim-detail', kind: 'source', itemId, source: origin })
  • Open lane (link, data-veritas-claim-source-action={sourceId})
    • Function: navigates to buildDomainShellHref('veritas', source.href, origin, stack)
    • Current E2E verifies the generated source-iea href preserves path=/sources?sourceId=s3; full destination rendering remains covered by source-directory route specs.

Retraction confidence band#

  • Read soft correction (link, data-veritas-claim-retraction-action="open-soft-correction")
    • Function: opens /veritas/retraction with the cascade and claim query attached so the private correction letter can explain why the confidence band changed.
  • Review notebook marker (link, data-veritas-claim-retraction-action="open-nisaba-notebook-marker")
    • Function: opens /nisaba/notebook with origin=veritas-retraction and the cascade id; E2E verifies the destination renders the notebook-level Veritas retraction notice.

Counterclaims panel — per counterclaim#

  • Inspect counterclaim (button, data-veritas-claim-counterclaim-inspect={objectId})
    • Function: handleCounterclaimInspection(counterclaim.objectId) — builds a counterclaim inspection model, fires trackVeritasInspectionOpened, and includes data-veritas-inspection-action="open-nisaba-counterclaim-lineage" so the disagreement source trail can be opened in Nisaba
  • 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#

  • ClosesetActiveInspection(null)
  • Action button(s) (per model.actions) — link per action, e.g., "Open source-lineage trail" linking to Nisaba
  • Counterclaim source-lineage actiondata-veritas-inspection-action="open-nisaba-counterclaim-lineage" links to /domains/nisaba with 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.tsrenders the canonical claim, library toggle, report affordance, inspections, and tab lanes covers 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.tshydrates the open-question claim through the shell and preserves follow-up routing covers 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.tsdocuments the unknown-id fallback and keeps the route inspectable covers the current fallback behavior for an unknown [claimId].
  • apps/oshun/web/e2e/veritas-claim-detail-workspace.spec.tsrestores standalone, remains usable offline on mobile, and avoids horizontal overflow covers 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.tsretracted source pin opens the notebook marker and Nisaba edition diff covers the claim-ai-governance-adoption retracted-source root attributes, confidence-band cascade/source/score attributes, retracted_source grounding badge, soft-correction href, real navigation into /nisaba/notebook, and the downstream /nisaba/compare edition-diff correction path.
  • apps/oshun/web/e2e/veritas-nisaba-bridge.spec.tscounterclaim inspection emits telemetry and opens Nisaba counterclaim lineage switches to the Counterclaims tab, opens counterclaim-capacity-is-not-generation, captures the veritas_inspection_opened analytics event, asserts the open-nisaba-counterclaim-lineage href, and follows it to the real Nisaba surface.

Data & contracts#

  • Reads (synchronous, imported):
    • CANONICAL_CLAIMS[claimKey] — canonical claim record
    • CLAIM_SOURCES[claimKey] — source list
    • CLAIM_COUNTERCLAIMS[claimKey] — counterclaim list
    • CLAIM_COUNTERCLAIM_SOURCE_RECORDS[claimKey] — counterclaim source data
    • CLAIM_RETRACTION_STATES[claimKey] — optional retracted-source confidence band and correction/notebook handoff links
    • VERITAS_CLAIM_SOPHIA_EVIDENCE_BUNDLES[claim.objectId] — Sophia bundle
  • Domain helpers (from libs/oshun/domain-veritas/src):
    • buildVeritasCounterclaimRepresentation
    • resolveVeritasTrustDisplayRule
    • resolveVeritasNisabaClaimRelationship
    • resolveVeritasSophiaClaimEvidenceRelationship
    • resolveVeritasUnsupportedClaimFallback
    • deriveGroundedEvidenceStatus
  • 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#

Open questions / known gaps#

  • The workspace provides a visible <h1> via [data-veritas-claim-detail-title]; no separate route-level sr-only heading is required for this route.
  • If params.claimId doesn't match a key in CANONICAL_CLAIMS, getClaimKey falls 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 trackVeritasInspectionOpened in 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