Skip to content

Phase 1: directory-format recording viewer rows - #257

Merged
neuromechanist merged 2 commits into
feature/issue-256-epic-viewer-workbenchfrom
feature/issue-252-phase1-dir-recordings
Sep 1, 2026
Merged

neuromechanist merged 2 commits into
feature/issue-256-epic-viewer-workbenchfrom
feature/issue-252-phase1-dir-recordings

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Website half of #252: MEF3 iEEG (.mefd/) and CTF MEG (.ds/) recordings are directories in BIDS, so the tree never offered the signal viewer for them. They now render as hybrid rows: the name is the same data-preview-type="eeg" button a signal file row gets (viewer, availability annotate, hover prefetch, enlarge all reuse the existing flow), while the chevron/summary still expands the member files. Extensionless directory recordings (4D/BTi) are upgraded at annotate time from the zarr index's store paths, mirroring the producer's content-keyed detection. Directory recordings get a "browse the files" fallback instead of a misleading single-file download link.

Part of epic #256. Backend backfill for on004696 stores is nemarOrg/nemar-cli#1172.

Test plan

  • bun run test — 1085 passing (new signalDirExt cases + renderer hybrid-row cases)
  • bun run typecheck, bun run lint, bun run build green
  • Visual QA on test.nemar.org against on004696 once nemar-cli#1172's backfill runs (until then the row renders with the dimmed not-yet-available state)

Directory-keyed recordings (MEF3 .mefd, CTF .ds) render as hybrid rows:
the name is the same eeg preview button a signal file gets, the chevron
still expands member files. Extensionless directory recordings (4D/BTi)
are upgraded at zarr-annotate time from the index's store paths. Dir
recordings get a browse fallback instead of a download link.

Tested: bun run test (1085 passing, new signalDirExt + renderer cases),
typecheck, lint, build all green.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Review findings on PR #257, all addressed:
- Hybrid dir rows no longer nest the viewer button in <summary>
  (inconsistent AT exposure); expand toggle and viewer button are
  sibling <button>s, lazy expansion driven by a data-dir-toggle
  delegate sharing loadDirChildren with the details path.
- Dir-recording fallback no longer links to raw listing JSON; copy
  points at the row's expand arrow.
- Extensionless (BTi) upgrades also fire for index failures so a
  known-unconvertible recording shows its reason.
- upgradeDirRecordingRow warns on structural-assumption breaks.
- og-image.png build artifact dropped from the diff; chunk-reveal
  path covered by a test.

Tested: 1087 vitest, typecheck, lint, build green.
@neuromechanist

Copy link
Copy Markdown
Contributor Author

Sonnet review agent findings, all addressed in 8c28b67:

  1. Dir-recording fallback linked to raw listing JSON — replaced with copy pointing at the row's own expand arrow (no external link).
  2. Extensionless (BTi) dir recordings were only upgraded when present in index stores — now index failures upgrade too, so a known-unconvertible recording renders disabled with its producer-recorded reason instead of posing as an ordinary folder.
  3. upgradeDirRecordingRow failed silently on markup drift — now console.warns, matching the file's idiom.
  4. Viewer button nested in (inconsistent AT exposure per MDN) — restructured: hybrid rows drop
    Details entirely; expand toggle and viewer button are sibling s (aria-expanded on the toggle), lazy expansion shares loadDirChildren with the details path.

Minor items: og-image.png build artifact reverted; renderDirChunkRows covered with a .mefd case; the missing format badge on JS-upgraded BTi rows is deliberate (no name-derived format string exists) and now documented in a comment.

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