Skip to content

Spec 018 T013: the render page's overlay wait, on held pages too - #958

Merged
adamjohnwright merged 1 commit into
mainfrom
render/t017-analysis-overlay-ready
Nov 13, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
render/t017-analysis-overlay-ready

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec: 018-render-page-reuse, T013 (added and ticked here). This is pdf-export's spec 002 T017 (its plan, Order of work, step 0; research R3; FR-204), which gates its T019 and T020.

What T017 asks, and what was already there

T017 asks that, with a token, the render page be ready only once the figure carries the overlay for the result's default resource. A token that cannot be read should end in the page's error. The render cache's key should be bumped, and a test should fail when the page is ready first.

#771 (2 Nov) already built this, before held pages existed. pdf-export's R3 was written on 30 Oct, before #771.

  • The wait: analysisShown waits on AnalysisService.settled and on each view's own colouring: the diagram's appliedAnalysis, the illustration's applied result, and the overview's current tree.
  • Unreadable tokens: analysisFailure turns them into an error.
  • The cache key went to v12 for it.
  • Tests: the fresh-page tests in e2e/downloads.spec.ts.

What this adds

Held pages (T005, #957) move to the next figure in the same app. The analysis service there may already have settled for the last figure, and no test covered a token there. New tests in e2e/downloads.spec.ts, each reading readiness on the moved figure's own host (data-render-nav):

  • a diagram with a token, after an illustration without one;
  • the genome-wide overview, after a diagram with the same token (the result is already settled);
  • a dead token (410) after a figure that drew, which must end in the error and not be ready.

Each has its own recording. The analysis is the existing made-up token, answered in the test, with its UNIPROT loads held back.

Seen failing (constitution III)

Each mutant was built by a dev server of this tree and run against the recorded answers:

Mutant Fails
analysisShown always true all 5 overlay tests, fresh and held
only settled kept, no per-view check 4 (not the illustration's, which colours as its result arrives; noted in the test)
settled dropped the illustration's
per-view checks skipped on a moved figure only the 2 held tests alone
analysisFailure never fails the 3 unreadable-token tests

The cache key is not bumped

No output changes here. Every figure cached under v12 or later was drawn with the wait, so a bump would only make the cache cold.

🤖 Generated with Claude Code

pdf-export's analysis report (its spec 002, T017) needs the render page to
be ready only once a figure carries its analysis overlay, for the result's
default resource. The page has waited so since #771 (cache key v12); what was
untested is a held page (T005), where a moved figure is a new component in
an app whose analysis service may already have settled for the last figure.

- e2e: on a held page, a diagram with a token after an illustration with
  none; the overview after a diagram with the same token; and a dead token
  after a figure that drew. Readiness is read on the moved figure's own host.
- Seen failing: with the overlay gate removed (all five overlay tests), with
  the views' checks skipped on a moved figure only (the two held tests
  alone), and with load failures unreported (the three dead-token tests).
- No cache key bump: no output changes, and every figure cached since v12 was
  drawn with the wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 606a4fe into main Nov 13, 2026
8 checks passed
@adamjohnwright
adamjohnwright deleted the render/t017-analysis-overlay-ready branch November 13, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant