Report View
A flexible, JSON-driven report layout with a floating left nav, collapsible sections, superscript citation links, and a bibliography. Inspired by theTarget Nexus RunReportView.
How it works
The report is driven entirely by a ReportData JSON object. The server (or an AI agent) returns this JSON, and the component renders it — no hardcoded sections. As new data arrives (new evidence, new risks, new citations), the lists grow and the report updates.
Sections are data, not code
Each section in the sections[] array has atype that determines how it renders:
| Type | Renders as | Grows over time? |
|---|---|---|
summary | Prose paragraph with inline citation links | Content is replaced |
list | Bullet list with variant styling (strengths, risks, gaps, steps) | Yes — items are appended |
metrics | Grid of key-value cards with directional indicators | Metrics are updated |
table | Data table with headers and rows | Yes — rows are appended |
text | Multi-paragraph text with citation support | Content is replaced |
Floating left nav
A sticky sidebar on the left tracks which section is in view usingIntersectionObserver. Clicking a nav item smooth-scrolls to that section. The nav is auto-generated from the sections[] array — add a section to the JSON and it appears in the nav.
On mobile (lg: breakpoint), the nav is hidden and sections stack vertically.
Collapsible sections
Any section can be made collapsible by settingcollapsible: true in the JSON. Set defaultCollapsed: true to start collapsed. This is useful for detailed sections (safety data, resistance mechanisms) that most readers skip on first pass.
{
id: "safety-assessment",
title: "Safety Assessment",
type: "text",
collapsible: true,
defaultCollapsed: true,
content: "Preclinical safety evaluation..."
}Superscript citation links
Text containing [1] or[2,3] markers is parsed into superscript links. The pattern works in two ways:
- Inline markers — write
[1]directly in the text string. The parser extracts them and creates superscript links. - Citations array — add citation keys to the
citationsfield of a list item. They are appended to the text automatically.
Hover a superscript to see the full citation in a tooltip. Click it to smooth-scroll to the bibliography entry, which highlights briefly with a blue background.
// Inline marker in text
{ text: "KRAS G12C is present in ~13% of NSCLC [1]" }
// Citations array (appended automatically)
{ text: "Strong GWAS signal across ancestries", citations: ["1", "6"] }
// Both produce superscript links that:
// hover → tooltip with title, authors, year, DOI
// click → smooth-scroll to bibliography entryUsage
import { ReportView } from
'./report-view/ReportView';
<ReportView data={reportJson} />ReportData shape
interface ReportData {
id: string;
title: string;
subtitle?: string;
timestamp: string;
status: "draft"|"review"|"final";
metadata: Record<string, string>;
sections: ReportSection[];
bibliography: BibliographyEntry[];
}Section types
- •
summary— prose with citations - •
list— cited items (strengths, risks, gaps, steps) - •
metrics— KPI cards - •
table— data table - •
text— multi-paragraph
List variants
- • strengths — green check icon
- • risks — red warning icon
- • gaps — amber question icon
- • steps — blue chevron icon
- • neutral — gray list icon
Key features
- • Floating sticky left nav
- • Scroll-spy highlights active section
- • Collapsible sections (accordion)
- • Superscript citation tooltips
- • Click citation → scroll to bib entry
- • JSON-driven — no hardcoded sections
- • Lists grow as data arrives
- • Status badge (draft/review/final)
- • Metadata pills from key-value pairs
Origin
Based on the RunReportView component fromTarget Nexus, generalized into a reusable pattern for any JSON-driven report.
Live Demo
A target druggability assessment report with 9 sections, 8 bibliography entries, and collapsible detail sections. Try hovering and clicking the superscript citation numbers.
Target Druggability Assessment: KRAS G12C
Comprehensive evaluation of KRAS G12C as a therapeutic target in non-small cell lung cancer
Generated May 28, 2026 at 02:30 PM
Executive Summary
Key Metrics
Overall Confidence
High (0.85)
Genetic Evidence
Strong
Druggability Score
8.2 / 10
Safety Risk
Moderate
Competitive Intensity
High
IP Freedom
Favorable
Key Strengths
- KRAS G12C mutation is present in ~13% of NSCLC patients, representing a well-defined patient population with established companion diagnostics [1]
- Covalent binding mechanism provides high selectivity for the mutant form over wild-type KRAS, reducing off-target toxicity concerns [2]
- Clinical validation through approved therapies (sotorasib, adagrasib) de-risks the target biology [3]
- Internal compound RCH-4471 demonstrates Kd < 5nM with >200x selectivity vs WT-KRAS in biochemical assays [5]
- Strong GWAS signal across multiple ancestries supports causal role in tumorigenesis [1][6]
5 items
Key Risks
- Acquired resistance develops in most patients within 6-12 months, primarily through KRAS amplification, secondary mutations (Y96D), and bypass pathway activation [4]
- Competitive landscape is crowded with multiple next-generation inhibitors in Phase II/III trials [7]
- Brain penetration of current compound series is suboptimal (Kp,uu brain = 0.15), limiting efficacy against CNS metastases [5]
3 items
Knowledge Gaps
- Optimal combination partners for overcoming resistance remain undefined — SHP2 and SOS1 inhibitors show promise but lack clinical validation in combination [4]
- Long-term safety profile of covalent KRAS inhibitors beyond 24 months is not yet characterized [3]
- Biomarker strategy for identifying patients most likely to benefit from combination therapy needs development
- Impact of tumor heterogeneity on treatment response is poorly understood in the KRAS G12C context
4 items
Recommended Next Steps
- Complete 28-day GLP toxicology studies in two species (target Q3 2026)
- Initiate combination screening with SHP2 inhibitor (RCH-8832) in PDX models
- Develop CNS-penetrant backup series with target Kp,uu > 0.5
- File IND application targeting Q1 2027 for first-in-human dose escalation
- Engage regulatory affairs for companion diagnostic strategy alignment
5 items
Bibliography
KRAS G12C mutation frequency in non-small cell lung cancer: a systematic review and meta-analysis
Chen H, Zhang J, Wang L, et al. (2024). Journal of Thoracic Oncology
doi:10.1016/j.jtho.2024.01.015Covalent targeting of KRAS G12C: from chemical biology to clinical translation
Ostrem JM, Shokat KM (2023). Nature Reviews Drug Discovery
doi:10.1038/s41573-023-00784-xSotorasib versus docetaxel for previously treated KRAS G12C-mutated NSCLC: CodeBreaK 200 final analysis
de Langen AJ, Johnson ML, Mazieres J, et al. (2024). New England Journal of Medicine
doi:10.1056/NEJMoa2404613Mechanisms of acquired resistance to KRAS G12C inhibition in cancer
Awad MM, Liu S, Rybkin II, et al. (2024). Nature Medicine
doi:10.1038/s41591-024-02891-5RCH-4471: a next-generation covalent KRAS G12C inhibitor with enhanced selectivity and pharmacokinetic properties
Internal Report — Roche Discovery Chemistry (2026). Internal Technical Report RCH-TR-2026-0089
Cross-ancestry genome-wide association study of lung adenocarcinoma identifies novel susceptibility loci
McKay JD, Hung RJ, Han Y, et al. (2023). Nature Genetics
doi:10.1038/s41588-023-01525-xCompetitive landscape of KRAS G12C inhibitors: next-generation approaches and combination strategies
Hallin J, Engstrom LD, Hargis L, et al. (2025). Cancer Discovery
doi:10.1158/2159-8290.CD-25-0142Single-cell transcriptomic profiling of KRAS G12C-mutant NSCLC reveals variant-specific immune microenvironment features
Xue JY, Zhao Y, Aronowitz J, et al. (2025). Cell
doi:10.1016/j.cell.2025.02.018Report ID: RPT-2026-0042
Generated May 28, 2026