V1 Web PWA · Surface walkthrough

Research Hub · Veritas

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

walked
9sections6 minread

On this page

Context. surface customer · domain veritas · route /domains/veritas/research · auth signed-in · source apps/oshun/web/src/app/domains/veritas/research/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. 2026-06-28 Codex Research Hub addendum — authenticated browse filters/search/empty branch, detail sections, citation graph, dedicated citations view, compare workflow, compare-paper switching, reduced motion, keyboard close, standalone PWA restore, offline mobile use, and horizontal overflow checks are covered by the E2E evidence below.

Purpose#

The Veritas Research Hub is a full-screen, fixture-backed workspace for reviewing research papers. A signed-in user can search and filter papers by field or evidence grade, open a paper detail view, inspect methodology and citation evidence, switch into a dedicated citation-network view, and compare two papers side-by-side.

Entry Points#

  • Direct URL / bookmark/domains/veritas/research (auth required)
  • /domains/veritas index — internal Veritas tool grid
  • Linked from Veritas workspaces — claim detail and topic hub follow-up actions can route into the research workspace.
  • Shell navigation history — opening after /library lets the Close control return with router.back()

Layout Regions#

page.tsx is a client route that renders an sr-only <h1> ("Research Hub · Veritas · OSHUN") and mounts <VeritasResearchHub onClose={() => router.back()} />.

  • Overlay root: [data-veritas-research-hub] with current data-veritas-research-view, selected paper, compare paper, total/filtered paper counts, filter state, query state, and reduced-motion state.
  • Header: [data-veritas-research-header], title, optional tablist [data-veritas-research-tabs], and [data-veritas-research-close].
  • Browse view: [data-veritas-research-browse-view] with search input, field filters, grade filters, result count, paper cards, and empty branch.
  • Detail view: [data-veritas-research-detail-view] with header metrics, abstract, expandable findings/methodology/citation/conflict sections, Compare, and Citations actions.
  • Citations view: [data-veritas-research-citations-view] with a citation graph, reference list, and cited-by list or empty cited-by state.
  • Compare view: [data-veritas-research-compare-view] with two paper columns, metric rows, key findings, and compare-paper selector buttons.

States#

  • Authenticated render — route opens through the signed-in shell and renders [data-veritas-research-hub].
  • Browse populated — paper-card count matches SAMPLE_PAPERS.
  • Field-filtered browse — field filter buttons update active state and data-veritas-research-results-count.
  • Grade-filtered browse — grade buttons update active state and visible paper count.
  • Search no matches — a query with no matching title/summary/author renders [data-veritas-research-empty].
  • Detail populated — selected paper, grade, peer-review status, methodology, publication data, and metrics are asserted from the fixture.
  • Detail sections expanded/collapsed — findings, methodology, citations, and conflicts expose section-open state and item counts where applicable.
  • Citation graph populated — graph data attributes expose references and cited-by counts for the selected paper.
  • Dedicated citations view — the previously declared citations view is reachable from detail and renders reference/cited-by rows.
  • Compare view — selected paper and compare paper render in responsive side-by-side columns with fixture-backed metrics and findings.
  • Compare-paper switch — selector buttons replace the compare paper and expose active state.
  • Offline — standalone mobile test switches the browser context offline and still searches, opens detail, opens citations, and compares from local fixture state.
  • Standalone PWAmockStandaloneLaunch() restores directly into the route from /?surface=pwa.
  • Reduced motion — card, detail, graph, and section animations collapse to none under prefers-reduced-motion.
  • Mobile horizontal overflow — standalone/offline test asserts no document overflow at 390×844 across browse, detail, citations, and compare.

Interactions#

  • Close[data-veritas-research-close] has accessible name "Close Research Hub", a 44×44 target, keyboard activation, and returns to /library in the desktop path.
  • Tabsbrowse, detail, compare, and citations expose active state through data-veritas-research-tab-active; tabs that require a paper are disabled until the required state exists. The tablist appears after leaving browse.

Browse View#

  • Search[data-veritas-research-search] filters title, summary, and author text, including an empty-results branch.
  • Field filter[data-veritas-research-field-filter="<field>"] applies the field and exposes active state.
  • Grade filter[data-veritas-research-grade-filter="all|A|B|C|D"] applies grade filtering and exposes active state.
  • Paper details[data-veritas-research-paper-details="<paper-id>"] selects a paper and opens detail view.
  • Paper compare[data-veritas-research-paper-compare="<paper-id>"] selects a paper, chooses a default alternate comparison paper, and opens compare view.

Detail View#

  • Back to browse[data-veritas-research-action="back-to-browse"] returns to browse.
  • Section toggle[data-veritas-research-section-toggle="findings|methodology|citations|conflicts"] expands/collapses section content.
  • Methodology metrics[data-veritas-research-methodology-metric="sample-size|controls|reproducibility"] exposes assessment values.
  • Citation graph[data-veritas-research-citation-graph] exposes the selected paper, reference count, and cited-by count.
  • Compare selected paper[data-veritas-research-action="compare-selected"] opens compare with a default alternate paper.
  • View citations[data-veritas-research-action="view-citations"] opens the dedicated citations view.

Citations View#

  • Back to detail[data-veritas-research-action="back-to-detail"] returns to detail.
  • Reference list[data-veritas-research-citations-reference="<paper-id>"] renders each cited paper with citation count.
  • Cited-by list / empty[data-veritas-research-citations-cited-by="<paper-id>"] renders citing papers; [data-veritas-research-citations-cited-by-empty] covers papers with none.

Compare View#

  • Back to detail[data-veritas-research-action="back-to-detail"] returns to the selected paper detail.
  • Compare columns[data-veritas-research-compare-column="<paper-id>"] exposes grade, citation count, and methodology for both papers.
  • Compare metrics[data-veritas-research-compare-metric="<metric>"][data-veritas-research-compare-metric-paper="<paper-id>"] exposes grade, citations, impact factor, methodology, and reproducibility.
  • Compare option[data-veritas-research-compare-option="<paper-id>"] swaps the comparison paper and exposes active state.

Data & Contracts#

  • Reads: SAMPLE_PAPERS from apps/oshun/web/src/lib/veritas/veritas-extended-simulation.ts.
  • Types: ResearchPaper, EvidenceGrade, PeerReviewStatus, and MethodologyType from veritas-extended-types.ts.
  • Writes: local React state only (view, selectedPaper, comparePaper, searchQuery, fieldFilter, gradeFilter, expandedSections).
  • Realtime / external network: none for the core route; the hub remains usable while the browser context is offline.
  • Telemetry: no route-local telemetry import or event dispatch.
  • Auth/role check: shell middleware gates /domains/veritas/*.
  • Page metadata: no Metadata export in this client page; the screen-reader <h1> reads "Research Hub · Veritas · OSHUN".

Current E2E Evidence#

  • apps/oshun/web/e2e/veritas-research-hub.spec.ts
    • Desktop browse: fixture total, field and grade filtering, empty search, reduced-motion cards, detail selection, accessible 44×44 close, and keyboard close.
    • Detail/citations: selected-paper data, metric values, findings, methodology metrics, conflict disclosures, section toggling, citation graph, dedicated citations view, and compare-selected action.
    • Compare: browse-to-compare flow, selected/compare paper columns, impact factor metric, compare-paper switching, and return to detail.
    • Standalone/offline mobile: PWA relaunch, offline search, detail, citations, compare, reduced motion, and no horizontal overflow at 390×844.

Cross-References#

Open Questions / Known Gaps#

  • Research selection, compare state, and expanded sections are session-local only; they do not persist through reload or sync to Library.
  • No telemetry currently records selection, search, filtering, section expansion, citation viewing, or comparison.
  • SAMPLE_PAPERS currently includes only peer-reviewed A/B evidence; grade C/D, preprint, under-review, accepted, and retracted branches need fixture coverage if V1 expects those states in the shipped UI.
  • Citations are local fixture objects only; no DOI resolver, external link, or live citation graph service is wired.