Skip to content

Render page: not ready until the analysis is coloured - #771

Merged
adamjohnwright merged 4 commits into
mainfrom
render-overlay-wait-4
Nov 2, 2026
Merged

adamjohnwright merged 4 commits into
mainfrom
render-overlay-wait-4

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

This replaces #770 after its review (which replaced #769 and #768).

Changed from #770:

  • Render page: not ready until the analysis is coloured #770's head did not build. It was committed from an index that held main's copies of five files, staged for a red run. That removed AnalysisService.settled, the views' markers and __renderState.analysis. They are restored here, and the committed tree equals the tested one.
  • Reading order: the page reads the result's error before anything reads the result, which would throw the error with its URL and token.
  • Gone or unread: the page tells a result that is gone (404/410, which a release removes) from one that could not be read just now.
  • Token stripping: an error's URL loses a token in its path as well as its query.
  • The 410 test asks for "gone", and checks that the token is not in the error.

With an analysis token, the render page reported ready as soon as a view was drawn. That was before its analysis colouring arrived, and, for a result holding one resource besides TOTAL, before the second load that colours it for that resource, as the pathway browser shows it. The render service then cached the figure under the token, uncoloured or coloured for TOTAL. A token whose result could not be read was dropped, and the figure was drawn with no colouring at all and reported ready.

What changes

  • AnalysisService.settled: the result on show is the one the address settles on, including the default resource's second load.
  • Each view says what it shows:
    • the diagram and the illustration say which analysis they last coloured;
    • the overview says whether its tree is the one fetched for the current token and resource.
  • The render page:
    • waits on these before it is ready;
    • publishes what it carries in __renderState.analysis;
    • reports an error when the analysis cannot be read, saying whether it is gone;
    • strips any token from an error's URL;
    • leaves the reaction view, which is never coloured, out of all of this.
  • Render cache key v12, so figures cached without their colouring are not served.

Tests (e2e, with a made-up token answered in the test, replaying the suite's Release 97 recordings)

  • For a diagram, an illustration and the genome-wide view: the result for the default resource is held back 3 s, and the load each view's colouring comes from is held back 6 s. No load may arrive after the page says it is ready.
  • A gone token (410) is an error, not a figure.

Proofs

  • On the previous page code, all four tests fail.
  • With only the diagram's own check removed, its test fails. This is new since Render page: not ready until the analysis is coloured #769: there, every load was held back alike, so a page ready on the result alone passed.
  • The illustration colours itself in the same update that delivers its result, so no timing separates its own check from the result's. The check stays as a guard, and the code and the tests say so.

Belongs to pdf-export's spec 002 (the analysis report), whose plan makes this its step 0. It also fixes figures rendered with a token today. Moving the whole e2e suite to Release 98 is a separate change.

🤖 Generated with Claude Code

adamjohnwright and others added 4 commits November 2, 2026 02:43
With a token, the render page reported ready as soon as a view was drawn,
before its analysis colouring arrived, and before a result holding one
resource besides TOTAL was loaded again for that resource. The render
service then cached the figure uncoloured, or coloured for TOTAL, under the
token. A token whose result could not be read was dropped and the figure
drawn with no colouring at all.

- AnalysisService.settled: the result on show is the one the address
  settles on (the default resource's load included).
- The diagram and the illustration say which analysis they last coloured;
  the overview says whether its tree is the one fetched for the current
  token and resource. The page waits on these, publishes the analysis in
  __renderState.analysis, and fails when the analysis cannot be read.
- Render cache key v12, so figures cached without their colouring are
  not served.
- e2e: each view held back for its default resource, and an unreadable
  token; each fails on the previous page code.

pdf-export spec 002 needs this first (its plan's step 0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new tests were recorded against the Release 98 graph, so their content
service answers were new bodies of routes whose known type problems are
counted (tools/api-types/known-problems.json), and two counts went up. Every
answer they read is already recorded from Release 97, so they replay those,
and the Release 98 bodies and release files are dropped. Moving the whole
suite to Release 98 is its own change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and the reaction view

- The tests held every UNIPROT load back alike, so a page ready on the result
  alone passed them: with the diagram's own check removed they stayed green.
  Each view now waits for the load its own colouring comes from, held back
  longer than the result, and the diagram's mutation fails. The illustration
  colours itself as its result arrives, which no timing here can separate;
  its check stays as a guard and the tests say so. Titles no longer claim a
  colour they do not check.
- An unreadable analysis keeps the analysis service's own reason; an error's
  URL loses any token; the reaction view, never coloured, skips the analysis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r unread; tokens in paths

- cd74f0c was committed from an index holding main's copies of five files
  (restored there for a red run), so it removed AnalysisService.settled, the
  views' appliedAnalysis and showsCurrentData, and __renderState.analysis,
  and did not build. They are back as 5573238 had them.
- The page reads the result's error before anything reads the result, which
  would throw it with its URL and token, and tells a result that is gone
  (404/410: a release removed it) from one that could not be read now.
- An error's URL loses a token in its path as well as its query.
- The 410 test asks for "gone", and that the token is not in the error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 8662a11 into main Nov 2, 2026
8 checks passed
@adamjohnwright
adamjohnwright deleted the render-overlay-wait-4 branch November 2, 2026 04:38
adamjohnwright added a commit that referenced this pull request Nov 2, 2026
Render page, from #771's review: one "not here", the reaction's analysis, tested scrubbing
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