Repository navigation
Demo: the four Proto-OKN close-out questions, prewarmed (do not merge until after the demo) - #59
Open
prayaslashkari wants to merge 5 commits into
Open
prayaslashkari wants to merge 5 commits into
prayaslashkari wants to merge 5 commits into
Conversation
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).
Rebasing the demo work onto development left two identical copies of the same script entry, since development already defines it. Nothing behaved differently, both values match and the last key wins, but a duplicate JSON key is a lint and review hazard.
|
🚅 Deployed to the explorer-app-pr-59 environment in sawgraph-explorer
|
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.
Cuts the Proto-OKN close-out demo onto its own branch, off current
development.Do not merge until after the demo. The pinned block at the top of
PREBUILT_QUERIESis demo-only ordering, and the comment in that file says to remove it afterwards. This PR is here for review and visibility, not to be merged on green.What is here
Four commits reused from the earlier
feat/demo-questions-prewarmedlineage, rebased ontodevelopmentat01a6899, plus one cleanup:feat(dashboard): pin the four demo questions and prewarm their popupsfix(api): raise the result-cache ceiling to 32MBfix(map): sample popup laid out for the placeholder on first openfix(dashboard): leave facilities unconstrained in the PFOS upstream questionfix(scripts): drop the duplicate check-query-snapshots entryThe four questions, in landing-page order
samples-near-airports-indianawaterbodies-near-airports-indianafacilities-upstream-pfos-york-cumberlandsamples-downstream-airports-indianaAll four have thumbnails in
public/thumbs/.Two decisions worth a reviewer's eye
Block A on the PFOS question is unconstrained (
blockA: { type: 'facilities' }, no region). The counties scope the samples on block C alone, because an upstream source can sit outside the county its sample is in. That makes the result large, roughly 8670 points and 3925 lines, and the thumbnail was rebuilt from a live run at that shape.warm-sample-details.mtslists three ids, not four. The waterbodies question is deliberately absent: its popup branch inMapPopup.tsxrenders from feature props with no fetch, so it has nothing to warm.Still to do before the demo
The branch carries the warming code, not a warmed cache. Both of these need a run against the target API:
Dropping the region from block A moved that question's cache key to
q:61245341..., so any earlier warm of it is unreachable and it has to be re-warmed.Verification
tsc --noEmit -p tsconfig.app.jsonexits 0 against the newer engine from #55 and #58.Supersedes #54, which is being closed in favour of this one.