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
32 changes: 31 additions & 1 deletion CURATOR-REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ open an issue on the WebsiteAngular repository — either reaches us. A screensh
and the URL is usually enough; if a diagram is involved, the pathway's stable id
saves us guessing.

Last updated: 2026-08-22
Last updated: 2026-09-20

## Please check on beta.reactome.org

Expand All @@ -39,6 +39,22 @@ Each of these was broken when curators last looked, and each is now covered by a
test — `RELEASE-TESTING.md` names the spec for every row, and says plainly where
a check can only be made by eye.

- **Downloading an illustrated pathway produced nothing at all.** All 218
illustrated pathways sent their SVG, PNG and JPEG downloads to the content
service's exporter, which draws nothing and reads pre-made files from disk —
and the files are not on this machine. The page draws the illustration itself,
so it now makes the file from what is already on screen, at a higher
resolution than the server was offering. **Worth a click on any illustrated
pathway other than Apoptosis**, which is the one the tests happened to use and
the one that kept passing.
- **96 of the 218 illustrations rendered as a picture of the zoom control.** A
140×140 image of four arrows where the pathway should be, on downloads and on
the picture a content detail page shows — Signal Transduction, Developmental
Biology and Cytokine Signaling in Immune System among them. The renderer
decided it was finished as soon as any drawing existed, and the zoom control
is drawn before the illustration arrives, so the heavier the illustration the
likelier it lost. It now waits for the illustration. Re-scanned after the fix:
1 of 218 left, and that one is the artwork question below.
- **Diagrams for every species other than human were blank.** One node without
graph data threw for the whole diagram build, so switching species left an
empty canvas with the rest of the page updated around it.
Expand Down Expand Up @@ -188,6 +204,20 @@ named after papers (Dunn2005, Kaufman2002 ×3, Rutter2006) had been withdrawn fo
licensing, and whether `man7a.png` should be renamed. Both questions are closed:
the fix happened elsewhere.

**Circadian clock's illustration cannot be saved as PNG or JPEG, and this one
needs an artwork change rather than a code change.**
`R-HSA-9909396.svg` builds six of its shapes out of `<foreignObject>` — an
element that embeds an HTML box inside the drawing, which is how a design tool
exports a conic gradient, since SVG has no such gradient of its own. A browser
refuses to turn any drawing containing one into a picture file; it is a security
rule, not a bug we can work around. SVG downloads fine, and the page displays
normally.

It is the only one of the 218 that does this. If the file is re-exported with
those six shapes flattened — or the gradient redrawn with the radial gradients
SVG does have — every format works again. Until then the download says exactly
that rather than failing with a browser error.

**A protein page shows the experimental structure whenever there is one.**
Decided on a sitewide call, 19 Sep 2026, and implemented: if the entity carries a
PDB cross-reference the viewer opens on it, and AlphaFold's predicted model is
Expand Down
22 changes: 11 additions & 11 deletions RELEASE-TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ offer it.

## Downloads and figures

| Item | Status |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Every diagram format produces a file of the type it claims | **auto** — `downloads.spec.ts` checks magic bytes, not just that a file arrived |
| Illustrated pathways export the whole illustration | **auto** — `downloads.spec.ts` |
| GIF animates one frame per analysis sample | **auto** — `downloads.spec.ts`, skipped with a message when the render service is not running |
| PPTX opens in PowerPoint and converts to editable shapes | **human** — needs PowerPoint. This is the one item we cannot close |
| Sub-pathway highlighting checkbox changes the exported figure | **auto** — `downloads.spec.ts` |
| Animated SVG timeline: play/pause, click to seek, hover names the sample | **human** — the timeline scrubs a canvas, so seeking and hovering can only be judged by eye. Asserting pixels fails on font rendering rather than on behaviour, as with the sub-pathway hover row |
| A pathway page's figure is drawn by the site's own renderer | **auto** — `detail-contents.spec.ts`, for a cytoscape diagram and an illustration. _It came from the old server-side exporter until 21 Aug, so the picture on the page and the one the download gave you were in different styles_ |
| Figures on entity pages render, from the release bucket | **auto** — `e2e/release/download-files.spec.ts` checks the host and that the image really drew. _Every figure on the site was broken before 21 Aug: they were served from a legacy path, and our origin answers those paths with index.html — a 200 that is not an image_ |
| PNG quality tiers produce three different sizes | **auto** — `downloads.spec.ts` reads the width out of each PNG's header and checks all three differ |
| Item | Status |
| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Every diagram format produces a file of the type it claims | **auto** — `downloads.spec.ts` checks magic bytes, not just that a file arrived |
| Illustrated pathways export the whole illustration | **auto** — `downloads.spec.ts`, for a light illustration and a heavy one. _The heavy case is the row that matters: every illustration test used Apoptosis, which is 502 SVG elements and arrives quickly, while 96 of the 218 illustrations came out as a 140×140 picture of the zoom control_ |
| GIF animates one frame per analysis sample | **auto** — `downloads.spec.ts`, skipped with a message when the render service is not running |
| PPTX opens in PowerPoint and converts to editable shapes | **human** — needs PowerPoint. This is the one item we cannot close |
| Sub-pathway highlighting checkbox changes the exported figure | **auto** — `downloads.spec.ts` |
| Animated SVG timeline: play/pause, click to seek, hover names the sample | **human** — the timeline scrubs a canvas, so seeking and hovering can only be judged by eye. Asserting pixels fails on font rendering rather than on behaviour, as with the sub-pathway hover row |
| A pathway page's figure is drawn by the site's own renderer | **auto** — `detail-contents.spec.ts`, for a cytoscape diagram and an illustration. _It came from the old server-side exporter until 21 Aug, so the picture on the page and the one the download gave you were in different styles_ |
| Figures on entity pages render, from the release bucket | **auto** — `e2e/release/download-files.spec.ts` checks the host and that the image really drew. _Every figure on the site was broken before 21 Aug: they were served from a legacy path, and our origin answers those paths with index.html — a 200 that is not an image_ |
| PNG quality tiers produce three different sizes | **auto** — `downloads.spec.ts` reads the width out of each PNG's header and checks all three differ |

## Post-release

Expand Down
78 changes: 77 additions & 1 deletion e2e/downloads.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ import { unzipSync, strFromU8 } from 'fflate';
const DIAGRAM = 'R-HSA-109606'; // Intrinsic Pathway for Apoptosis: a cytoscape diagram
const ILLUSTRATION = 'R-HSA-109581'; // Apoptosis: an EHLD

/**
* A heavy illustration, which is the one that catches the bug this file missed.
*
* Apoptosis' illustration is 502 SVG elements and arrives quickly. Signal
* Transduction's is 2,490 and is one of the 96 illustrations out of 218 that the
* render service drew as a 140x140 picture of the zoom control instead of the
* pathway: the readiness probe accepted any `svg` inside `cr-ehld`, the control
* is in the DOM from the first frame, and a heavy illustration is still loading
* when the light one has arrived. Every existing test here used the light one
* and stayed green throughout.
*/
const HEAVY_ILLUSTRATION = 'R-HSA-162582'; // Signal Transduction: a large EHLD

/** A PNG's own idea of its size, from the IHDR chunk. */
function pngSize(bytes: Buffer) {
return { width: bytes.readUInt32BE(16), height: bytes.readUInt32BE(20) };
}

/** What each format's bytes have to start with, and a floor for "not empty". */
const SIGNATURES: Record<string, { magic: (bytes: Buffer) => boolean; floor: number }> = {
SVG: {
Expand Down Expand Up @@ -70,7 +88,10 @@ function slideOf(bytes: Buffer) {

async function openDownloadTab(page: Page, pathway: string) {
await page.goto(`/PathwayBrowser/${pathway}`);
await page.waitForSelector('#cytoscape canvas, cr-ehld svg', { timeout: 90_000 });
// `#ehld` specifically: `cr-ehld svg` also matches the component's 70x70 zoom
// control, which is there from the first frame, so waiting on it returns
// before the illustration exists.
await page.waitForSelector('#cytoscape canvas, cr-ehld #ehld svg', { timeout: 90_000 });
await page
.locator('[role="tab"]')
.filter({ hasText: /Download/i })
Expand Down Expand Up @@ -120,6 +141,41 @@ test.describe('Diagram downloads', () => {
});
}

test('a heavy illustration downloads the illustration, not the zoom control', async ({
page,
}) => {
await openDownloadTab(page, HEAVY_ILLUSTRATION);
const bytes = await grab(page, 'PNG');
assertLooksLike('PNG', bytes);

// The failure had a shape: the control is 70x70 CSS pixels, so it came out
// at 140x140 and 8,091 bytes -- comfortably over the 5,000-byte floor this
// file already applied, which is why a size check alone never caught it.
// An illustration is 1600x1000 before scaling.
const { width, height } = pngSize(bytes);
expect(
Math.min(width, height),
`the PNG is ${width}x${height}, which is the zoom control rather than the illustration`
).toBeGreaterThan(500);
});

test('a figure that cannot be made says so, rather than doing nothing', async ({ page }) => {
// Circadian clock builds six of its shapes out of <foreignObject>, which is
// how a design tool exports a conic gradient. Chromium taints a canvas the
// moment one is drawn onto it and refuses toDataURL, so this illustration
// cannot be turned into a picture in any browser.
//
// That part is not fixable here. What was fixable: the click produced no
// file, no message and no sign it had registered, because every client-side
// exporter reported failure with console.error and nothing else.
await openDownloadTab(page, 'R-HSA-9909396');
await page.locator('.container.diagram').getByText('PNG', { exact: true }).first().click();

const reason = page.locator('.download-failure');
await expect(reason, 'the reader is told why no file arrived').toBeVisible({ timeout: 30_000 });
await expect(reason).toContainText('foreignObject');
});

test('leaving out sub-pathway highlighting changes the figure', async ({ page }) => {
await openDownloadTab(page, DIAGRAM);
const withTints = await grab(page, 'SVG');
Expand Down Expand Up @@ -161,6 +217,26 @@ test.describe('Server-rendered figures', () => {
}
});
}

test('a heavy illustration renders as the illustration', async ({ request }) => {
const renderServiceUp = await serves(request, '/RenderService/health');
test.skip(!renderServiceUp, 'the render service is not running');

// Not only the download tab: a content detail page takes its picture from
// this service too, so 96 of 218 illustrated pathways showed a 140x140
// zoom control where the pathway should be. Asked here rather than through
// the page because the service caches by URL, and a wrong render was kept
// and served for as long as the cache lived.
const response = await request.get(`/RenderService/render/${HEAVY_ILLUSTRATION}.png`);
expect(response.ok(), 'the render service answers for a heavy illustration').toBe(true);

const bytes = Buffer.from(await response.body());
const { width, height } = pngSize(bytes);
expect(
Math.min(width, height),
`rendered ${width}x${height}, which is the zoom control rather than the illustration`
).toBeGreaterThan(500);
});
});

// The reaction page's own downloads.
Expand Down
1 change: 1 addition & 0 deletions e2e/har/420119b1718a98f62bd1186d4235d2d7b8589221.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[[{"dbId":162582,"displayName":"Signal Transduction","stId":"R-HSA-162582","name":["Signal Transduction","Signaling Pathways"],"stIdVersion":"R-HSA-162582.13","oldStId":"REACT_111102","schemaClass":"TopLevelPathway","speciesName":"Homo sapiens","releaseDate":"2011-09-20","releaseStatus":"UPDATED","hasDiagram":true,"hasEHLD":true,"diagramWidth":631,"diagramHeight":589,"inferred":false,"inDisease":false}]]
1 change: 1 addition & 0 deletions e2e/har/4e6845bc507dcb7cce3bd0e7a074966c3bcbd757.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[[{"dbId":9909396,"displayName":"Circadian clock","stId":"R-HSA-9909396","name":["Circadian clock"],"stIdVersion":"R-HSA-9909396.2","schemaClass":"TopLevelPathway","doi":"10.3180/R-HSA-9909396.1","speciesName":"Homo sapiens","releaseDate":"2025-03-26","hasDiagram":true,"hasEHLD":true,"diagramWidth":655,"diagramHeight":552,"inferred":false,"inDisease":false}]]
1 change: 1 addition & 0 deletions e2e/har/5121a5bb1c914420b5a6df94ba3586b8492bd6cd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"stId":"R-HSA-9909396","name":"Circadian clock","species":"Homo sapiens","url":"/PathwayBrowser/#/R-HSA-9909396","type":"TopLevelPathway"}]

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions e2e/har/f1ce0b5a347857f93456f236120720213713a8e2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"stId":"R-HSA-162582","name":"Signal Transduction","species":"Homo sapiens","url":"/PathwayBrowser/#/R-HSA-162582","type":"TopLevelPathway"}]
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ <h3 class="category">Pathway Diagram</h3>
}
</div>

@if (downloadFailure(); as reason) {
<p class="download-failure" role="alert">{{ reason }}</p>
}

<!-- One preference rather than a second button beside every format: it is a
property of the picture, not a different kind of file. -->
<mat-checkbox class="diagram-option" [(ngModel)]="includeSubpathways">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,12 @@
width: 100cqw;
margin-top: 20px;
}

// A figure that could not be made says so here, in the panel the button is in.
// `--negative` is the theme's own token for this and is redefined for dark
// mode, so the text stays readable in both.
.download-failure {
color: var(--negative);
font-size: 0.85rem;
margin: 8px 0 0;
}
Loading
Loading