Skip to content

Collapse and demote the agent usage block (v0.2.6 regression) - #297

Merged
neuromechanist merged 2 commits into
stagingfrom
fix/use-this-data-collapsed
Sep 3, 2026
Merged

Collapse and demote the agent usage block (v0.2.6 regression)#297
neuromechanist merged 2 commits into
stagingfrom
fix/use-this-data-collapsed

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Production regression from v0.2.6. The How-to-use-the-data block rendered expanded and immediately after the page title, so its ten download and Zarr steps pushed the README and the file tree about two screens down, and agent-facing reference material became the first thing a human read on the main dataset page.

Three changes. It is a <details> collapsed by default. It is retitled "How to use the data (for agentic research)" so the audience is obvious at a glance, with a one-line hint naming what is inside (license, citation, download commands, and Zarr access when the dataset has a Zarr copy). And it renders LAST in the content column, after the README and the file tree, rather than above them. The markdown mirror's heading matches the new title, so the page and the mirror name the material identically.

Parity is intact and this is not a step back from the epic's purpose: every string stays in the server-rendered payload, which is the only thing crawlers and agents fetch, and a human reaches all of it with one click. Nothing is hidden with display: none or off-screen positioning, so it is not the cloaking the OSCAR principles forbid.

Test plan

  • Verified on a local render of /dataset/on007753: collapsed at 93px, sits at y=4179 of a 6233px page, README back at y=671 under the title at y=191, and the payload still contains nemar dataset download and zarr_format=3.
  • Five new placement guards in src/lib/use-this-data-placement.test.ts pin the two things that regressed: the disclosure is collapsed, and the render sits after <Readme> and <BidsTree>. Source-level on purpose, since the component has no Astro test harness here; a rendered-DOM version belongs in the Playwright spec tracked in Wire up the Playwright e2e harness for the dataset page's inline scripts #279. The collapsed guard was mutation-proved by adding open and confirming it fails.
  • bun run lint, bun run typecheck (0 errors), bun run test (72 files, 1690 pass), NEMAR_SKIP_OG_GENERATE=1 bun run build.

Production regression in v0.2.6. The How-to-use-the-data block rendered expanded and immediately after the page title, so its ten download and Zarr steps pushed the README and the file tree about two screens down and made agent-facing reference material the first thing a human read on the main dataset page.

It is now a <details> collapsed by default, retitled 'How to use the data (for agentic research)' so its audience is obvious, with a one-line hint naming what is inside, and it renders LAST in the content column after the README and the file tree. The markdown mirror's heading matches the new title so the page and the mirror name the material identically.

Parity is intact: every string stays in the server-rendered payload, which is the only thing crawlers and agents fetch, and a human reaches all of it with one click. Nothing is hidden with display:none or off-screen positioning, so this is not the cloaking the OSCAR principles forbid.

Verified on a local render of /dataset/on007753: the block is collapsed at 93px, sits at y=4179 of a 6233px page, the README is back at y=671 under the title at y=191, and the payload still contains the download commands and the Zarr recipe.

Tested: bun run lint, bun run typecheck, bun run test (72 files, 1690 pass, including 5 new placement guards), NEMAR_SKIP_OG_GENERATE=1 bun run build. The collapsed guard was mutation-proved by adding 'open' and confirming it fails.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploying nemar-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3c2fea5
Status: ✅  Deploy successful!
Preview URL: https://463ba932.nemar-website.pages.dev
Branch Preview URL: https://fix-use-this-data-collapsed.nemar-website.pages.dev

View logs

astro check type-checks every file in the repo (tsconfig includes **/*) and has no node types, so the placement guards' readFileSync passed under vitest locally but failed typecheck in CI. They now import the two sources with Vite's ?raw and live under test/ with the other route tests. Tested: bun run lint, bun run typecheck (0 errors, 258 files), bun run test (72 files, 1690 pass), build.
@neuromechanist
neuromechanist merged commit e502287 into staging Sep 3, 2026
5 checks passed
@neuromechanist
neuromechanist deleted the fix/use-this-data-collapsed branch September 3, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant