Collapse and demote the agent usage block (v0.2.6 regression) - #297
Merged
Conversation
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.
Deploying nemar-website with
|
| 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 |
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.
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.
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: noneor off-screen positioning, so it is not the cloaking the OSCAR principles forbid.Test plan
/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 containsnemar dataset downloadandzarr_format=3.src/lib/use-this-data-placement.test.tspin 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 addingopenand 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.