Skip to content

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

Closed
adamjohnwright wants to merge 1 commit into
mainfrom
render-overlay-wait
Closed

adamjohnwright wants to merge 1 commit into
mainfrom
render-overlay-wait

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

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 coloured in __renderState.analysis (token and resource);
    • reports an error when the analysis cannot be read.
  • Render cache key v12, so figures cached without their colouring are not served. The README's readiness notes say why.

Tests
Four new e2e tests on the render page, with a made-up token answered in the test:

  • the diagram, the illustration and the genome-wide view, each with the loads for the result's resource held back three seconds;
  • a token whose result is gone (410).

All four fail on the previous page code: it was ready before the held-back colouring arrived, and the 410 case gave a figure rather than an error. All four pass with this change.

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.

🤖 Generated with Claude Code

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>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

Replaced by the next PR (render-overlay-wait-2): recordings on Release 97, as the rest of the suite's.

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