Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion PanTS-Demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<main class="bm-static">
<h1>BodyMaps</h1>
<p>The intelligence layer for medical imaging AI</p>
<p>Browse the library in 2D and 3D, upload your own CT for AI segmentation, and annotate or refine the results.</p>
<h2>What you can do here</h2>
<ul>
<li><a href="/dashboard">CT library</a>: search body CT scans from public research datasets, including PanTS and CancerVerse, filter them, and open any scan in a 2D and 3D viewer with its organ and tumor labels.</li>
Expand Down
4 changes: 0 additions & 4 deletions PanTS-Demo/src/helpers/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ export const NONCLINICAL_WARNING =
/** Landing hero subtitle, directly under the wordmark. */
export const LANDING_SUBTITLE = "The intelligence layer for medical imaging AI";

/** One-paragraph orientation for a first-time visitor, under the stats row. */
export const LANDING_OVERVIEW =
"Browse the library in 2D and 3D, upload your own CT for AI segmentation, and annotate or refine the results.";

/** Browser-tab / link-preview title (index.html <title>, og:title, twitter:title). */
export const SITE_TITLE = "BodyMaps: CT library, segmentation, and annotation";

Expand Down
6 changes: 2 additions & 4 deletions PanTS-Demo/src/routes/LandingPage/LandingPage.module.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions PanTS-Demo/src/routes/LandingPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { LIBRARY_CLASS_COUNT, API_BASE } from "../../helpers/constants";
import { useAuth } from "../../contexts/authContext";
import { LANDING_OVERVIEW, LANDING_SUBTITLE } from "../../helpers/copy";
import { LANDING_SUBTITLE } from "../../helpers/copy";
import styles from "./LandingPage.module.css";

// Signed-out visitors only ever see these (the live volume count needs an account), so keep them current.
Expand Down Expand Up @@ -151,7 +151,6 @@ export default function WorkspaceIntro({ collapsed = false }: { collapsed?: bool
</div>
))}
</div>
<p className={styles.heroOverview}>{LANDING_OVERVIEW}</p>
</section>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions PanTS-Demo/src/routes/UploadPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3402,8 +3402,7 @@ const UploadPage: React.FC = () => {
<polyline points="17 8 12 3 7 8" />
<line x1="12" y1="3" x2="12" y2="15" />
</svg>
<div className="dropzone-text">Drop a CT scan here</div>
<p className="workspace-format-note">NIfTI (.nii, .nii.gz) or a DICOM series</p>
<div className="dropzone-text">Drop a medical scan here</div>
</>
) : (
// ── Selected items: NIfTI files + DICOM series, each individually
Expand Down
5 changes: 3 additions & 2 deletions PanTS-Demo/src/test/crawler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { describe, expect, it } from "vitest";
import { readdirSync, readFileSync } from "node:fs";
import { resolve } from "node:path";
import { LANDING_OVERVIEW, LANDING_SUBTITLE, NONCLINICAL_WARNING, SITE_DESCRIPTION } from "../helpers/copy";
import { LANDING_SUBTITLE, NONCLINICAL_WARNING, SITE_DESCRIPTION } from "../helpers/copy";
import { MARKER, NOT_FOR_CRAWLERS, injectPublicSections, renderPublicSections } from "../seo/staticSummary";
import { LAST_UPDATED, PRIVACY, TERMS, TERMS_INTRO } from "../routes/legalText";
import { MEMBERS } from "../routes/TeamPage/members";
Expand Down Expand Up @@ -54,8 +54,9 @@ describe("crawler-readable site", () => {

it("index.html has readable text for non-JavaScript readers, in the canonical copy", () => {
const block = staticBlock();
for (const text of [LANDING_SUBTITLE, LANDING_OVERVIEW, NONCLINICAL_WARNING]) expect(block).toContain(text);
for (const text of [LANDING_SUBTITLE, NONCLINICAL_WARNING]) expect(block).toContain(text);
expect(block).toMatch(/<h1>BodyMaps<\/h1>/);
expect(block).not.toContain("Browse the library in 2D and 3D");
for (const model of ["ePAI", "Atlas-Net", "LesionSegmenter"]) expect(block).toContain(model);
expect(block).not.toMatch(/—/);
expect(read("index.html")).toContain('"application/ld+json"');
Expand Down
15 changes: 7 additions & 8 deletions PanTS-Demo/src/test/landing.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MemoryRouter } from "react-router-dom";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { AuthProvider } from "../contexts/authContext";
import LandingPage from "../routes/LandingPage";
import { LANDING_OVERVIEW, LANDING_SUBTITLE } from "../helpers/copy";
import { LANDING_SUBTITLE } from "../helpers/copy";

// The landing page fetches the live CT count; stub it so the test never
// touches a backend (same shape as routes.smoke.test.tsx).
Expand All @@ -23,7 +23,7 @@ afterEach(() => {
});

describe("landing hero copy", () => {
it("shows the subtitle under the wordmark and the overview under the stats row", () => {
it("shows the subtitle under the wordmark and ends with the stats row", () => {
render(
<AuthProvider>
<MemoryRouter>
Expand All @@ -33,12 +33,11 @@ describe("landing hero copy", () => {
);
const subtitle = screen.getByText(LANDING_SUBTITLE);
expect(subtitle.previousElementSibling?.tagName).toBe("H1");
const overview = screen.getByText(LANDING_OVERVIEW);
// Directly after the stats row, not between subtitle and stats.
expect(overview.previousElementSibling?.textContent).toContain("CT Volumes");
expect(overview.nextElementSibling).toBeNull();
// The nonclinical sentence lives in the footer, not in the paragraph.
expect(overview.textContent).not.toMatch(/nonclinical|research use only/i);
// The stats row is the last thing in the hero: no orientation paragraph under it.
const stats = screen.getByText("CT Volumes").closest("div[class*=heroStats]");
expect(stats).not.toBeNull();
expect(stats?.nextElementSibling).toBeNull();
expect(screen.queryByText(/Browse the library in 2D and 3D/)).toBeNull();
});

it("keeps the existing hero mounted while collapsed and restores its accessible content", () => {
Expand Down
4 changes: 3 additions & 1 deletion PanTS-Demo/src/test/routes.smoke.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ describe("route smoke tests", () => {
it("UploadPage renders", async () => {
renderRoute(<UploadPage />);
expect(
await screen.findByText("Drop a CT scan here"),
await screen.findByText("Drop a medical scan here"),
).toBeInTheDocument();
// The format line under the heading was removed on purpose.
expect(screen.queryByText(/or a DICOM series/)).toBeNull();
});

it("AuthModal opens as a popup with provider options when prompted", async () => {
Expand Down
Loading