Repository navigation
Closed
3 / 33 of 3 issues completed
Copy link
Labels
featureNew feature
Description
Problem
Three independent issues degrade first paint on /dataset/<id>:
- GitHub roundtrip in the README hot path (Eliminate per-pageload GitHub roundtrip for README #63) —
src/pages/api/dataset/[id]/readme.ts:97-101resolves the README path fromsummary.jsonthen still firesfetchGithubReadme(githubUrl)for the content. Direct dependency on a third-party host on every cold isolate. - 3.3 MB monolithic BIDS tree (Progressive BIDS tree: render skeleton sync, lazy-load subject contents #64) —
src/pages/api/dataset/[id]/tree.ts:86-87ships the entiresummary.pathslist in one HTML blob. For on005505 that's 5,409 paths across 136 subjects in a single response; the file panel blocks for seconds before anything paints. - SWR-poisoned cache entries (Edge-cache invalidation strategy for poisoned partials #65) — PR fix(api): no-store on tree/readme empty-fallback branches #54 stopped the future bleed by tagging fallback HTML
no-store, but pre-fix entries withs-maxage=600 stale-while-revalidate=86400still serve from any PoP for up to 24 h. on005505 still shows "No description available" / "Manifest unavailable" as of 2026-05-26.
Phases
- Phase 1 (Edge-cache invalidation strategy for poisoned partials #65): Bump edge-cache namespace
nemar-edge-v1→nemar-edge-v2insrc/middleware.ts:69. One-line change, orphans the poisoned set on next deploy. Ships first so the rest of the epic QAs against a clean cache. - Phase 2 (Eliminate per-pageload GitHub roundtrip for README #63): Wire
summary.readme.content(nemar-cli#616 schema 1.1) as a new step-0.5 inreadme.ts. Back-compat: schema 1.0 falls through to the existing four-step resolver. Lights up automatically when nemar-cli ships the backfill; no coupled deploy. - Phase 3 (Progressive BIDS tree: render skeleton sync, lazy-load subject contents #64): Two-stage
/api/dataset/<id>/tree— skeleton + per-subject lazy fetch. New?subject=sub-XYZparameter, small client-side expander, per-subject edge cache keys.
Companion nemar-cli issues
- Extend summary.json schema: embed README content (schema_version 1.1) nemar-cli#616 — extends
summary.jsonto schema 1.1 with inlinereadme.content. Required for Eliminate per-pageload GitHub roundtrip for README #63 to deliver the perf win; the website consumer can land first and is no-op on schema 1.0. - Feature: GET /<id>/<version>/records.json and manifest.bytes_url nemar-cli#615 —
records.json+manifest.bytes_url. Not strictly required for this epic; could feed a future enhancement to Progressive BIDS tree: render skeleton sync, lazy-load subject contents #64 (per-file metadata in the subtree response).
Out of scope
- Replacing the entire README or tree rendering pipeline. Each phase is additive with fallbacks intact.
- BIDS-shaped download filenames (nemar-cli#513) and OpenNeuro modality backfill (nemar-cli#512).
- New auth or routing logic.
Definition of done
- All three sub-issues closed via merged PRs
- Cold-isolate first paint for on005505 README in < 200 ms when nemar-cli#616 is live and backfilled
- Cold-isolate tree skeleton paint in < 500 ms
- No PoP serves a fallback-poisoned response 24 h after the cache-namespace bump deploys
- Legacy schema 1.0 dataset rendering unaffected
Sub-issues
Collapse Sub-issuesSub-issues
Loading 3 sub-issues
Metadata
Metadata
Assignees
Labels
featureNew feature
Activity
review(#66): close readme/tree 400 cache asymmetry
Merge pull request #70 from nemarOrg/feature/issue-66-epic-cold-paint