Repository navigation
Viewer abort, share-alike JSON-LD, doc refs - #281
Merged
Merged
Conversation
openRecording and readWindow now accept an AbortSignal, threaded through every internal zarrita open/get call. mountEegViewer creates one AbortController per mount, registers an abort-only disposer before the store even opens (so a superseding mount cancels it while still in flight), and folds the same controller into the full destroy(). Aborted reads are treated as benign cancellations: no "Signal unavailable" message, no console warnings, no state written. Tested: bun run test (1489 pass, includes 3 new abort tests in store.test.ts using a real in-memory fetch stub); bun run lint; bun run typecheck.
conditionsOfAccess() branched only on "noncommercial" and "noderiv", silently dropping the note for a pure share-alike license (CC-BY-SA) even though licenseTier already classifies it as its own tier. Tested: bun run test (1496 pass, includes 7 new license-tier tests in jsonld.test.ts covering CC-BY, CC-BY-SA, CC-BY-NC, CC-BY-NC-SA, CC-BY-ND, CC-BY-NC-ND, CC0/PDDL); bun run lint; bun run typecheck.
BidsDirChildren.astro no longer exists in src/components/. Swapped the three CSS-duplication examples in AGENTS.md, .rules/astro.md, and ADR 0004 for a live one: SiteNotices.astro and src/pages/admin/notices.astro each declare their own matched notice-tone rules, kept in sync with a comment on each side, per the same scoped-style-duplication convention the stale example illustrated. Only the example reference changed; ADR decision text is untouched. scratch_history.md's mentions are a historical record of a past PR and were left as-is. Tested: bun run lint; verified no remaining references to BidsDirChildren.astro outside the historical scratch log.
eventsReady's .then() callback wrote store.events/eventTypes, the legend, and called render() with no disposed check, unlike watchViewLevels -- a mount torn down while it was in flight could touch glRenderer after dispose(). Added the same guard. readOverview had no AbortSignal, so the minimap fetch was never cancelled on teardown, and loadOverview's only staleness guard (overviewSeq) wasn't bumped on destroy(), so a late resolution could write overviewData and touch a detached minimap element. Threaded signal through readOverview into zarr.get, wired abortController.signal from loadOverview, and added a disposed check before loadOverview writes any state. Tested: bun run test (1497 pass, includes a new readOverview abort test in store.test.ts using the same in-memory fetch stub pattern as the other abort tests -- readOverview never rejects, so the test asserts it resolves to null rather than hanging or throwing); bun run lint; bun run typecheck.
The "recursive rendering, common rows" framing described the old BidsTree/BidsDirChildren example, which the previous commit already replaced with SiteNotices.astro / admin/notices.astro's matched notice-tone rules -- neither recursive nor row-based. Reworded to generic "must stay visually matched" language, matching AGENTS.md and ADR 0004's phrasing from the same PR. Tested: no code touched; bun run lint still clean.
This was referenced Sep 3, 2026
Closed
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: three small, independently-scoped fixes bundled into one reviewable PR.
A. eeg-viewer (website#208): openRecording and readWindow now accept an AbortSignal, threaded through every internal zarrita open/get call. mountEegViewer creates one AbortController per mount and registers an abort-only disposer on the slot before the store even opens, so a mount that supersedes another one while it is still awaiting openRecording cancels the in-flight fetch instead of letting it run to completion for a result nobody will use. The same controller is folded into the mount's full destroy(). Aborted reads are treated as benign cancellations: no "Signal unavailable" message, no console warnings, and no state written from a stale request, reusing the existing renderSeq/isStale staleness machinery.
B. jsonld.ts (website#209): conditionsOfAccess() branched only on "noncommercial" and "noderiv", silently dropping the note for a pure share-alike license (CC-BY-SA) even though licenseTier already classifies it as its own "sharealike" tier. Added the missing branch with wording consistent with the existing two.
C. Docs (website#273, part 1): AGENTS.md, .rules/astro.md, and ADR 0004 still cited src/components/BidsDirChildren.astro as the example of Astro's scoped-style-duplication convention, but that file no longer exists. Swapped in a live, verified example that illustrates the same point: SiteNotices.astro and src/pages/admin/notices.astro each declare their own matched notice-tone rules, kept in sync with a comment on each side. Only the example reference changed; ADR 0004's decision text is untouched. Part 2 of #273 (the zarr-index fetch logging) was already done on staging before this PR.
Closes #208
Closes #209
Closes #273
Note: staging is not this repo's default branch, so these Closes lines will not auto-close the issues on merge; they are included for traceability and the issues will be closed by hand after merging, per this repo's AGENTS.md.
Test plan
bun run lint(biome check src) — clean on every commitbun run typecheck(astro check) — 0 errors, 0 warningsbun run test(vitest) — 1496 pass, including 3 new abort-propagation tests in store.test.ts (real in-memory fetch stub, real AbortController/AbortSignal, no mocks) and 7 new per-license-tier tests in jsonld.test.tsNEMAR_SKIP_OG_GENERATE=1 bun run build— astro build succeeds (the unskipped build calls the live api.nemar.org to pre-render OG cards, which this sandbox has no network path to; CI has that path so the plainbun run buildis what actually runs there)