Pin the four demo questions and prewarm their popups - #54
Closed
prayaslashkari wants to merge 4 commits into
Closed
prayaslashkari wants to merge 4 commits into
prayaslashkari wants to merge 4 commits into
Conversation
railway-app
Bot
temporarily deployed
to
sawgraph-explorer / explorer-app-pr-54
September 18, 2026 03:19
Destroyed
|
🚅 Deployed to the explorer-app-pr-54 environment in sawgraph-explorer
|
railway-app
Bot
temporarily deployed
to
sawgraph-explorer / explorer-app-pr-54
September 18, 2026 03:26
Destroyed
railway-app
Bot
temporarily deployed
to
sawgraph-explorer / explorer-app-pr-54
September 18, 2026 04:22
Destroyed
Puts the Proto-OKN close-out demo set at the top of PREBUILT_QUERIES so they are the four landing-page cards, with thumbnails built from live runs. Sample popups previously hit the SPARQL endpoints on every click. Adds an `s:` key namespace in the existing result cache, a read-through in useSampleDetails (any miss or error falls back to the live query, as before), and scripts/warm-sample-details.mts to fill it for the demo questions.
The Indiana water-bodies-near-airports demo question serialises to 26.6MB of polygon geometry and was rejected by the route body limit (a bare 413 from express, before our own size check).
Leaflet measures a popup when it opens; react-leaflet calls update() on popupopen and never again. The observation rows arrive after that, so the first open kept the placeholder's size and anchor and the content spilled out of the box. The second open looked right only because React Query already had the rows.
…uestion The demo question asked for facilities in York and Cumberland that are upstream of PFOS samples in those same counties. An upstream source can sit outside the county its sample is in, so the county scope belongs to the samples alone. Both this and samples-downstream-airports-indiana now lead with the target under development's narrowness ranking; check-query-joins expects that. Thumbnail rebuilt from a live run (8670 points, 3925 lines).
prayaslashkari
force-pushed
the
feat/demo-questions-prewarmed
branch
from
September 20, 2026 15:12
f3917c5 to
e9d255c
Compare
railway-app
Bot
temporarily deployed
to
sawgraph-explorer / explorer-app-pr-54
September 20, 2026 15:12
Destroyed
Collaborator
Author
|
Superseded by #59, which is the same work rebased onto current |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For the Proto-OKN close-out demo.
What
The four demo questions are pinned to the top of
PREBUILT_QUERIES, so they are the four landing-page cards:p_26aba422p_87619f3ep_15e83a0cThe first two and the fourth carry the exact question JSON from the shared pages, so they hit the same cache keys. Thumbnails rebuilt from live runs (all four return data).
Sample popups can now be served from the cache.
useSampleDetailsreadsGET /api/results/s:<hash>first and falls back to the live SPARQL query on any miss or error, so nothing changes for questions that were never warmed. Thes:namespace reuses the existingquery_resultstable;PUTstill requiresCACHE_WRITE_TOKEN.npm run warm-sample-detailsfills those entries for the demo questions (defaults to the three sample-bearing ones).Checks
check-cache-keygrew five assertions forsampleDetailKey(stability, distinct points, filters in the key, emptied filter still hits,s:namespace). All four check scripts pass;npm run buildclean;npm run lintunchanged (30 pre-existing errors on both sides).After merge
Run against the development API with the write token: