Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Background
nemar-cli#618 (the CLI counterpart epic to website#66) ships a new endpoint via nemar-cli#617:
GET https://data.nemar.org/<id>/page-bundle.json?v=<v>
It returns landing + metadata + summary + catalog (+optional qa) in one response, designed to collapse the website's cold-load waterfall to a single RTT.
Website epic #66 (cold-paint perf) intentionally left the bundle consumer out of scope — that epic focused on three independent wins (cache namespace bump, inline summary.readme.content, progressive BIDS tree). The page-bundle consumer is the logical next move.
Why a follow-up issue
This requires touching every SSR fetch on src/pages/dataset/[id].astro:
getLandingOutcome(id)/getSummary(id, v)/getMetadata(id)are currently fanned out in parallel; the bundle endpoint replaces all three.- The QA path (
api.nemar.org/qa/*per nemar-cli#511) is structurally similar and may also fold into the bundle. - Backwards compatibility: if the bundle endpoint is unavailable for a given dataset (older versions, transient upstream), the existing fan-out must remain as the fallback.
- The new
summary.readme.contentStep 0.5 (website#63 / PR Phase 2 (#63): consume summary.readme.content from schema 1.1 #68) needs to keep working — the bundle'ssummaryshape must be the same.
Acceptance
- New
getDatasetPageBundle(id, v)helper insrc/lib/data-api.ts, typed against the schema nemar-cli#617 ships. -
dataset/[id].astrocallsgetDatasetPageBundlefirst; on success it short-circuits the parallel fan-out and feeds the existing components from the bundled response. - On failure (404, 503, timeout) it falls back transparently to the current
Promise.all([getLandingOutcome, getSummary, getMetadata]). - Cold-isolate first paint of
/dataset/on005505drops measurably (target: under 600 ms total). - No regression for schema 1.0 datasets, datasets without the bundle endpoint, or the QA path.
- Unit tests for the new helper (real-shape fixture) +
/browseagainst a Pages preview.
Depends on
- nemar-cli#617 (backend endpoint must ship + be reachable on
data.nemar.org) - nemar-cli#618 (the parent CLI epic)
Related
- Epic: Cold-paint perf + cache hygiene for dataset detail #66 (closed; cold-paint perf epic that this builds on)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
review(#71): address pr-review-toolkit findings
Merge pull request #72 from nemarOrg/feature/issue-71-page-bundle-con…
feat(detail): canonical sources pivot