Repository navigation
Phase 5: View data button opens the enlarge viewer - #262
neuromechanist merged 5 commits into
Conversation
Picks the first recording in a given iteration order, reusing orderedRecordings. Backs website#260 (dataset page "View data" button), which needs to resolve a starting recording without a tree click.
SSR hidden next to Download; the dataset page's hydration script reveals it once the Zarr index resolves with at least one store (website#260).
Clicking opens the first recording in the user's current nav order straight into the enlarge dialog, detached from birth (ADR 0012): no originating tree row, so closing the dialog destroys the instance. Reuses the existing eegLive/eegSeq machinery, mountEegViewer, and the recording-nav dropdowns/prev-next rather than duplicating them. A mount failure renders an explicit error in the dialog, mirroring navigateEegViewer's failure state. eegLive.btn/slot become nullable to represent a viewer with no originating row; resetEegRow and the dialog close handler are updated to treat null as a no-op, matching behavior for every existing row-opened viewer exactly.
Deploying nemar-website with
|
| Latest commit: |
8e14129
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5174fac7.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-260-phase5-vie.nemar-website.pages.dev |
Review follow-ups on the View data button (website#260): - openRecordingInDialog never toggled aria-busy on its host, unlike openEegViewerInline and navigateEegViewer. Set it right after the host is inserted and clear it in a finally, mirroring navigateEegViewer. - The target recording's own store metadata was never warmed before the mount -- only its neighbours were, via prefetchAdjacentRecordings. Warm it the same way prefetchZarrButton does for a tree row. - setEegDialogTitle only ever updated the visible heading; the dialog's own aria-label stayed the static "Signal viewer" from EegViewerDialog.astro, so a screen reader never heard which recording was open. This was a pre-existing gap across all three entry points (inline enlarge, in-dialog navigation, and now View data); fixed here since all three funnel through this one setter.
Only "runs" and "file" were covered for firstRecording; add the missing "subjects" case.
|
Addressed all four review items in 3bd32ff and 8e14129:
Gates re-run clean: Also updated the PR body: Esc-close cleanup and prev/next click-through remain a staging QA item — neither this session's re-verification nor the review sandbox could reach the dev server, so both paths were confirmed by code trace only (detached-close branch and |
e8f9d6c
into
feature/issue-256-epic-viewer-workbench
|
Live browser verification completed post-merge (local dev server on the phase-4 worktree, which contains this PR's code rebased): the View data button stays hidden until the zarr index resolves, reveals with stores present, and opens the enlarge dialog directly on the first recording in nav order (sub-NDARAC589YMB_task-DespicableMe_eeg.set, 1 of 2885, 129 channels streaming). Next navigates to 2 of 2885 with the title/dropdowns following; closing the dialog destroys the viewer (slot emptied, zero canvases); reopening mounts fresh at 1 of 2885. The dialog aria-label now carries the recording name. Also confirmed on the pages.dev preview that the zero-index CORS-blocked case correctly keeps the button hidden. The staging QA caveat in the PR body is resolved. |
Summary
on004696) or a failed index fetch.orderedRecordings+ the persisted nav-order setting fromrecording-nav.ts), starting detached from birth per ADR 0012 — there is no originating tree row, so closing the dialog destroys the instance.eegLive/eegSeqsingle-live-viewer machinery,mountEegViewer, and the recording-nav dropdowns/prev-next, rather than duplicating them.eegLive.btn/slotbecome nullable to represent a viewer opened with no row;resetEegRowand the dialog close handler treat null as a no-op, leaving every row-opened path unchanged.navigateEegViewer's failure state) — never a blank dialog.localStorageinsidemountEegVieweritself, independent of the caller.firstRecording(list, order)inrecording-nav.tspicks the first recording in a given iteration order; covered with realistic BIDS paths including.mefd-style directory recordings, and every nav order (runs,subjects,file).Review follow-ups (addressed)
A Sonnet review found no critical/important issues but flagged four small gaps, all fixed:
openRecordingInDialognever toggledaria-busyon its host, unlikeopenEegViewerInline/navigateEegViewer— now set right after the host is inserted and cleared in afinally.prefetchAdjacentRecordings. Now warmed the same wayprefetchZarrButtonwarms a tree row.setEegDialogTitleonly updated the visible heading text; the dialog's ownaria-labelstayed the static "Signal viewer" fromEegViewerDialog.astro, so a screen reader never heard which recording was open. Fixed in the one setter all three entry points (inline enlarge, in-dialog navigation, View data) funnel through.firstRecording(list, "subjects")test case.Test plan
bun run test— 1198 tests pass (recording-nav.test.tscoversfirstRecordingfor every nav order —runs,subjects,file— plus empty list,.mefddirectory recordings, mixed file/directory ordering, and unparsed-path degradation)bun run typecheck— 0 errorsbun run lint— cleanbun run build— succeedsbun run devonon005514: button is hidden on load, appears once the Zarr index resolves; clicking it opens the enlarge dialog directly on the dataset's first recording (sub-NDARAC589YMB_task-DespicableMe_eeg.set, "1 of 2885"), with subject/task dropdowns and the recording streaming correctly.<dialog>, unrelated to this change: Chrome defers the nativecloseevent whiledocument.visibilityStateis"hidden"), and the review sandbox hit the same dev-server-unreachable constraint. Both paths were verified by exhaustive code trace instead (the close-handler's detached branch clearseegLive+ the dialog slot — exercised via a direct dispatch of thecloseevent during manual testing — and prev/next reusesnavigateEegViewer/stepRecordingunchanged). Spot-check both on the test.nemar.org deploy..action/.action--ghostfromActionBar.astrowith no new CSS, so no new theme-specific styling was introduced, but worth a quick look on a preview deploy.Part of epic #256. Implements #260.