Repository navigation
feat: viewer P1 - filters, full-res lines, butterfly, minimap, cursor, keyboard (website#99) - #103
Merged
Merged
Conversation
…p level-0 lines via useSuffixRequest
Butterfly mode (b key + checkbox) overlays all visible channels in one full-height slot for outlier detection. Bad-channel marking (click label in gutter) dims traces and labels to 30% alpha. Both paths share the refactored renderStacked/renderButterfly helpers. FrameChannel gains optional `dim?: boolean`; renderFrame accepts `butterfly?: boolean` in RenderOptions. No existing tests broken.
Mousemove over the plot shows "Chan · time · value" (using formatSi). Clock toggle (t key + checkbox) switches axis ticks to HH:MM:SS. Home/End step through WINDOW_CHOICES. ? toggles a key-listing help overlay. Butterfly and Clock checkboxes added to Display group. New eegv__cursor / eegv__help / eegv__minimap CSS in BidsTree.astro.
readOverview reads the coarsest view-pyramid level and aggregates to a per-column max-range Float32Array (aggregateOverview, pure + tested). The minimap draws the activity bars, event tick marks colored by type, and a translucent blue box for the current window; clicking jumps to the clicked time. Minimap hidden when no view levels exist.
Deploying nemar-website with
|
| Latest commit: |
ab7abb7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a28409c9.nemar-website.pages.dev |
| Branch Preview URL: | https://feat-viewer-p1.nemar-website.pages.dev |
- readFrame: when a filtered window is too wide for level-0 and falls back to the pyramid band, re-read the visible (unpadded) window so nCols/time align with the axis (was shifting traces left by padS). - readFrame: report filtered=false when designFilters yields no biquads (all cutoffs >= Nyquist) so the status note does not over-claim. - loadOverview: sequence-guard the fire-and-forget load + catch errors so a group switch can't flash stale minimap data and a rejection can't escape. - render(): wrap renderImpl so event-handler/observer calls can't raise an unhandled rejection on a synchronous paint throw. - readOverview: validate [2,nCh,nTime] shape before indexing dims. - render butterfly legend: drop double-dim (0.3 fill x 0.3 alpha) on bad chans. - drawOverview: single durationS axis (zero-guarded) for ticks + window box. - cache trace-slot layout per frame; reuse in click/move hit-tests. - renderUnavailable: warn (not debug) so structural failures are visible. - tests: HP+LP band-pass cascade; aggregateOverview siFactor + offset. - comments: clarify level-0 cap + view-fallback wording.
Contributor
Author
Review response (6 pr-review-toolkit agents, Sonnet)Ran code-reviewer, silent-failure-hunter, type-design, test-analyzer, simplifier, and comment-analyzer against Addressed
Deliberately skipped (false positive / by design)
546 tests pass, 0 type errors, lint clean, build green. |
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.
P1 feature set for the Zarr signal viewer (follows the merged P0 #101), website#99.
Highlights
useSuffixRequest: trueon the FetchStore makes the sharded level-0 read a native suffix index + the window's inner chunks (~127 KB for a 10 s window) instead of a redundant ~3 MB full-shard GET. The default window now renders actual level-0 samples (clean EEG lines), with the view pyramid reserved for wide overviews.filters.ts, zero-phasefiltfiltbiquad cascade, RBJ design). Display-only: reads level-0 for a padded window, applies the cascade, crops the transient pad, renders. Essential for line-noise-heavy recordings (50/60 Hz notch). Status showsfiltered; greys when the window is too wide for level-0.b): overlay all channels in one slot to spot outliers.t): seconds <-> HH:MM:SS.b/t,?help overlay (plus the P0 nav/scale/DC keys).Tests / checks
filters.test.ts(HP removes DC, LP attenuates, notch suppresses 60 Hz, zero-phase), overview aggregate. 543 tests pass, 0 type errors, lint clean, build succeeds.on007139(heavy 50 Hz line noise) on the dev server.Follow-ups: per-segment level-0 sharding for sample-zoom at very wide windows; P2 (montage reorder, annotations, two-cursor, WebGL, multi-store, electrode layout).