Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .context/handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ open "http://localhost:4321/dataset/nm000104?qa=fixture"
```bash
cd /Users/yahya/Documents/git/nemar/epic-website-redesign
rm -rf dist && bun run build
CLOUDFLARE_ACCOUNT_ID=da8d7a2a8680dab01592bbbc6f67f12c \
CLOUDFLARE_ACCOUNT_ID=<sccn-account-id> \
bunx cfman wrangler --account sccn pages deploy dist \
--project-name nemar-website \
--branch feature/issue-1-epic-nemar-redesign \
Expand Down Expand Up @@ -134,7 +134,7 @@ In rough priority order:
- **Discover pagination is server-side offset-based.** Multi-modality AND/OR filtering across selections >1 is a known tradeoff with this pagination model — the `total_count` reflects server total, not client-filtered count. Move AND/OR server-side when the backend supports it.
- **Provenance fallback is in place** but useless for `on005262` because the upstream catalog row also has nulls. Real fix is nemar-cli#512.
- **Download links route through `data.nemar.org/<id>/<v>/<path>`**, not the manifest's direct presigned URL. This puts the Worker in the chain so nemar-cli#513's `response-content-disposition` fix will start producing BIDS-shaped filenames as soon as it deploys, without any further frontend change.
- **Cloudflare token doesn't have memberships scope** — always pass `CLOUDFLARE_ACCOUNT_ID=da8d7a2a8680dab01592bbbc6f67f12c` explicitly with `bunx cfman wrangler --account sccn ...`.
- **Cloudflare token doesn't have memberships scope** — always pass `CLOUDFLARE_ACCOUNT_ID=<sccn-account-id>` explicitly with `bunx cfman wrangler --account sccn ...`.

## Files to know

Expand Down
2 changes: 1 addition & 1 deletion .context/research.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ LIKE-based search hits the catalog's `search_text` precomputed column. Doesn't h
## Deploy auth on the SCCN Cloudflare account

```bash
CLOUDFLARE_ACCOUNT_ID=da8d7a2a8680dab01592bbbc6f67f12c \
CLOUDFLARE_ACCOUNT_ID=<sccn-account-id> \
bunx cfman wrangler --account sccn pages deploy dist \
--project-name nemar-website --branch <branch> --commit-dirty=true
```
Expand Down
2 changes: 1 addition & 1 deletion .context/scratch_history.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Failed attempts, gotchas hit, and lessons that don't fit cleanly into rules yet.

**Fix:** Pass `CLOUDFLARE_ACCOUNT_ID=<sccn-account-id>` as env var. Wrangler skips the memberships lookup when account ID is supplied.

**Account ID:** `da8d7a2a8680dab01592bbbc6f67f12c` (SCCN). Now baked into `.context/handoff.md`.
**Account ID:** `<sccn-account-id>` (SCCN). Now baked into `.context/handoff.md`.

## Browse skill expected Playwright Chromium 1208, system had 1217

Expand Down
10 changes: 6 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ bun run lint # biome
# Build
rm -rf dist && bun run build

# Deploy — CLOUDFLARE_ACCOUNT_ID is required because the SCCN token lacks
# the memberships scope wrangler tries to call when enumerating accounts.
CLOUDFLARE_ACCOUNT_ID=da8d7a2a8680dab01592bbbc6f67f12c \
# Deploy — CLOUDFLARE_ACCOUNT_ID must be set in your shell because the SCCN
# token lacks the memberships scope wrangler tries to call when enumerating
# accounts. The account id is org-internal; export it from your shell rc or
# read it from a password manager rather than committing it here.
CLOUDFLARE_ACCOUNT_ID="${CLOUDFLARE_ACCOUNT_ID:?set SCCN account id in env}" \
bunx cfman wrangler --account sccn pages deploy dist \
--project-name nemar-website \
--branch feature/issue-1-epic-nemar-redesign \
--branch main \
--commit-dirty=true
```

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Don't reimplement these in the frontend — the website already has fallbacks; t

### Deploy authentication

`cfman wrangler --account sccn` for everything. The token doesn't have memberships scope so always pass `CLOUDFLARE_ACCOUNT_ID=da8d7a2a8680dab01592bbbc6f67f12c` explicitly. Don't write the token anywhere in this repo.
`cfman wrangler --account sccn` for everything. The token doesn't have memberships scope so always pass `CLOUDFLARE_ACCOUNT_ID="$CLOUDFLARE_ACCOUNT_ID"` explicitly (export the SCCN account id from your shell rc or pull it from a password manager). Don't write the account id or the token anywhere in this repo.
220 changes: 0 additions & 220 deletions src/components/ProvenanceCard.astro

This file was deleted.

19 changes: 16 additions & 3 deletions src/lib/data-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,14 @@ export async function fetchManifestEntryText(

try {
const res = await fetch(url, { signal: controller.signal });
if (!res.ok) return null;
if (res.status === 404) return null;
if (!res.ok) {
console.warn(`[data-api] manifest entry ${url}: ${res.status} ${res.statusText}`);
return null;
}
return await res.text();
} catch {
} catch (err) {
console.warn(`[data-api] manifest entry ${url}: ${(err as Error).message ?? err}`);
return null;
} finally {
clearTimeout(timer);
Expand Down Expand Up @@ -158,7 +163,15 @@ export async function fetchGithubReadme(
return res.text();
}),
);
} catch {
} catch (err) {
// AggregateError when all 12 candidate URLs fail; flatten its inner
// errors so a GitHub outage or rename leaves a triageable tail-log
// entry instead of a silent null.
const detail =
err instanceof AggregateError
? err.errors.map((e) => (e as Error).message).join(" | ")
: ((err as Error).message ?? String(err));
console.warn(`[data-api] github readme ${owner}/${repo}: ${detail}`);
return null;
} finally {
clearTimeout(timer);
Expand Down
10 changes: 8 additions & 2 deletions src/pages/dataset/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ const versionParam = url.searchParams.get("v");
const [landing, metadata, catalogRow, qaAggregates] = await Promise.all([
getLanding(id),
getMetadata(id),
getDataset(id).catch(() => null),
getQaAggregates(id).catch(() => null),
getDataset(id).catch((err) => {
console.warn(`[dataset/${id}] catalog row unavailable: ${(err as Error).message ?? err}`);
return null;
}),
getQaAggregates(id).catch((err) => {
console.warn(`[dataset/${id}] qa aggregates unavailable: ${(err as Error).message ?? err}`);
return null;
}),
]);

if (!landing || !metadata) {
Expand Down