Skip to content

Phase E5: Replace the dataset page Compute dialog - #506

Merged
neuromechanist merged 12 commits into
feature/issue-493-epic-compute-webfrom
feature/issue-498-compute-dialog
Nov 7, 2026
Merged

neuromechanist merged 12 commits into
feature/issue-493-epic-compute-webfrom
feature/issue-498-compute-dialog

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Phase E5: replace the dataset page Compute dialog (website#498)

Part of epic website#493. The "Compute instructions" dialog now describes nemar compute (request access, dry run, submit against <id>@<version>, follow, results) instead of an S3 prefix and a Neuroscience Gateway flow that never shipped. The old "coming soon" note and its link to website#6 are gone. Closing #498 and #6 is left to the driver. website#6's body is retargeted (NSG connector superseded by NEMAR compute); website#498 removes the dialog's link to that issue, and that change is live once it reaches production.

What changed

  • src/lib/compute-instructions.ts: pure builder, closed | not_available | ready. Commands only; no URL, limit, price, balance or machine.
  • src/components/ActionBar.astro: new dialog body (same dl-cmd copy rows and delegated copy handler as Download), hook data-compute-open, aria-labelledby, focusable <pre>. [id].astro passes anonymous and unpublished.
  • src/lib/compute-labels.ts: datasetDialog local labels. No new shared copy key; shared keys reused: compute_access.section.lede, .request.cta, .granted.link, .terms_unpublished.body, compute_page.queue_note. nemar-cli's account-copy contract is untouched, so there is no nemar-cli companion PR.
  • scripts/capture-compute-cli-help.mjs and test/fixtures/compute/cli-help/: real nemar ... --help-all output from nemar-cli e0685a25.
  • ADR 0030 addendum (state-agnostic dialog, release gate, amends "marketing host links only to docs", pre-filter is interim) and the AGENTS.md map.

Decisions (driver answers)

  • Neuroscience Gateway dropped entirely, no sentence.
  • No claim about whose allocation or which machine; the plan's "supercomputer under NEMAR's allocation" sentence is removed (no CLI help or shared copy backs it).
  • Button label stays "Compute instructions". No terms link until a terms page exists.
  • Release gate is the existing computeRequestsOpen(COMPUTE_REQUESTS_ENABLED, apiBase()): production shows the "not open yet" dialog until the owner flips the flag.
  • The nm/on pre-filter on facts the page holds is interim. Follow-ups already filed in nemar-cli: #2090 (public availability read), #2091 (per-dataset eligibility fact), #2092 (job environment docs: where staged data and outputs are), #2093 (include glob flag).

Tests

  • src/lib/compute-instructions.test.ts: exact commands, band and version handling, every not_available reason, honesty scan (no s3://, npm, NSG, rclone, URL, resource flag, promise word, machine word, digits), with a mutation check.
  • test/compute-instructions-cli-parity.test.ts: every command and flag in every row exists in the captured help; the --dataset <id@version> form; each paraphrased claim still has its help line. Verified by mutation: --dataset to --data and list to jobs both fail it.
  • test/compute-dialog-ui.test.ts: source scan scoped to the dialog element (not the whole page, since Use this data legitimately renders s3://nemar/<id>/zarr/...).

Verification run

  • bun run lint, bun run typecheck (0 errors), bun run test (191 files, 5164 tests, drift env vars pointed at the Epic D worktree), bun run build (public/og-image.png reverted).
  • Dev server, curl of the dialog element: open backend (staging API base) on nm000104 and on004696 shows the commands with the page's id and version; the production default shows only the closed text; staging nm099998 (anonymous) and xx099900 show only the one not_available sentence with no link or command. No s3://, nsgportal, website/issues/6, npm install in any of them.
  • Real browser, phone-width window (502 px): opens from the button, copy buttons write exactly the row text (multi-line row included, <job> the only placeholder) and show "Copied", Escape closes and focus returns to the button, tab order is links, <pre>s, Copy buttons, Close; no horizontal page scroll, each <pre> scrolls inside itself, copy buttons are 44 px; light and dark both checked.

Review fixes

  • Sign-in now carries a page fragment: the /login script appends location.hash to next through nextWithHash (src/lib/auth.ts) only when it is a plain anchor name (# plus a letter, then letters, digits, _, -) and next has no fragment. safeRedirectPath still validates next on /login/verify and accepts the result; tests cover a good hash, hostile hashes (javascript:, //evil, encoded newline, spaces, <script>), an existing fragment, and the URLSearchParams round trip. Limit, accepted: the server-computed ORCID sign-in link cannot see a fragment, so it still drops it.
  • The shared lede ("A separate grant from upload access...") now opens step 2, where its antecedent is, verbatim.
  • The honesty scan covers every label and every shared key the dialog reads, not only commands.
  • The Download pointer is not shown for an unpublished or versionless dataset.
  • CLI help fixtures recaptured from nemar-cli 27eecff9 (the wording of three help lines now matches the shared keys verbatim); parity test passes.
  • The copy button and the command block align (a stray top margin on <pre> removed).

Not verified

  • Desktop width and an actual 390 px window (the browser window was ~502 px).
  • The marketing-host absolute links (only appUrl unit tests plus the single-host relative links); read production HTML after release.
  • The #compute-access fragment surviving a real sign-in end to end was covered by unit and source tests only, not by signing in.
  • Screenshots are local only (light and dark ready dialog) and not attached.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Deploying nemar-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68f7b17
Status:⚡️  Build in progress...

View logs

@neuromechanist
neuromechanist merged commit ea21483 into feature/issue-493-epic-compute-web Nov 7, 2026
2 of 3 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-498-compute-dialog branch November 7, 2026 16:40
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