Repository navigation
W7: Activations tab - #599
Merged
neuromechanist merged 21 commits intoNov 26, 2026
Merged
neuromechanist merged 21 commits into
neuromechanist merged 21 commits into
Conversation
Deploying nemar-website with
|
| Latest commit: |
33c99eb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://83caf4da.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-588-w7-activat.nemar-website.pages.dev |
…progress' into feature/issue-588-w7-activations
neuromechanist
merged commit Nov 26, 2026
e478545
into
feature/issue-586-epic-pipeline-progress
3 of 4 checks passed
This was referenced Nov 26, 2026
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.
Refs #588, nemarOrg/nemar-cli#2324
Summary
Phase W7 of the live quality views (#588, epic #586, nemarOrg/nemar-cli#2324; nemar-cli ADR 0137 decision 9 as amended, website ADR 0035): the panel's Activations tab.
The browser applies no preprocessing. The activations are one multiply of the serving copy's physical values by the matrix the recipe wrote (
_servingunmixing.tsv, with the unmixing, the sphere, the average reference and the store unit folded in). Each component is then drawn through a 1 Hz zero-phase high-pass, for display only.Where the work runs
transforms/ic-activity.tsis a lazy chunk of the map worker. It runs checks 2 to 13 of neuroschema'sdocs/views/ic-activity.md, in order:It then does the multiply and the display filter: binary64 in the specification's order, real context of up to one second on each side, and the odd extension only at the recording's own ends.
The worker keeps no state between its two steps.
planchecks everything and returns the plan.computereceives the samples transferred, and returns the activations and the filtered values transferred.activations.tsruns on the main thread. It covers:openServingStoreandreadLevel0: the Zarr group's channels (labels, units, scales and offsets as stored, absent where absent) and level-0's int16 for the plan's rows only;a.u.on the scale bar (ViewerFrame.unitLabel, new);renderChrome/shadedRects.The viewer's reader is not imported statically.
store.ts(formakeStore), zarrita,gl-trace.tsandrender.tsare dynamic imports. They are the same chunks the page's viewer loads.extras/activity.tsis the tab's lazy chunk. It builds the figure:max_window_s;aria-labelnaming the components and the span;no_shaded_rowsorno_bad_segment_table; and how many repaired spans are shaded in the window.A refusal draws no activations. It shows its sentence (new
ACTIVITY_SENTENCESinpanel-words.ts, asked for asactivity:<word>) and offers the three files.The page gives the panel the store's address (
registerStoreUrlinpanel-bridge.ts, set in[id].astrowith the index's cache token).Store digest: every view is
not_checkeduntil Converter: write each Zarr group's content digest at commit nemar-cli#2343 (open question 1). The reader states no published digest.floor-tables.ts: the floor's table reading and the product-stem rule are moved out ofsignal-window.ts, so the worker's transform does not carry the Signal tab.Gates
bun run typecheck: 0 errors.bun run lint: clean.quality-views-*,quality-panel*,quality-summary*,src/lib/eeg-viewer,src/lib/quality-views.test/quality-views-ic-activity.test.ts(new, 115 tests). It holds:ic-activity.v1.json) on state, components, rows, factors, times, activations and filtered within 1e-6 of each component's peak, plus the shading and the notes;store_checksdigest states;floor(max_window_s·rate)passes, one more refuses, the first window never exceeds it), and a window ending at the last sample passes while one past refuses;readLevel0on a real zarrita array (multi-chunk), rows in the plan's order.bunx astro buildthencheck-quality-views-size.mjs --require-build: pass (numbers below).bun run test:quality-views-perfon M4: pass, no regression (below).quality-panel(18, 5 new for Activations),quality-views-perf(2),viewer-scalp-map,viewer-quality-marks: 25 passed. The Activations e2e serves a real Zarr v3 store (uncompressed int16, the converter's attributes) throughpage.route, so the page's own reader, zarrita and the worker run unchanged.bun run test: 8,514 passed, 59 skipped, 0 failed. The drift tests skip here, because noNEMAR_CLI_*checkout was given. In CI they are the expected 8 failures..Measured
Size (real site build, gzip 9, gated):
activity(sum of separate files)sensor-field-viewPrinted, not gated (owner's call): the Activations tab together with the viewer chunks it loads lazily (store, zarrita, render, gl-trace and their imports) is 47.6 KB, or 49.3 KB with no idle preload.
The transform's own chunk is 2.9 KB in the worker. Its in-thread copy, loaded only when no worker can start, is 2.5 KB.
Speed (M4, Vitest gate, median of 3, before → after):
These are within noise. The browser perf spec passes (256: first maps 17.9 ms median).
The transform (
computeActivityin Bun on M4, median of 5):It runs off the main thread.
Mutations (each must fail its suites)
The script is kept outside the repository. All 40 were caught (3 after added tests).
Deviations and judgment calls
activityroot at 30.7 KB. The cost is that a refused view may have downloaded its (small) files before the location check refuses it; nothing is parsed before its check.activations.tssplitmodel.tsinto a chunk of its own, adding 0.24 KB to every tab.unit_unknown), so it refuses rather than draws NaN. The specification has no word for it.max_window_s) from the recording's start, with Earlier and Later. Each window is computed with its own context, as the specification allows.panel-model.ts: oneTABSentry. Activations sits between Components and Signal, as ADR 0137 lists them.panel.ts: oneEXTRASentry, andCOMPUTEDreplaces the single signal-window comparison.worker-client.ts,worker-protocol.ts,worker.ts: theactivitymessage.panel-bridge.ts:registerStoreUrlandstoreUrlOf.render.ts:unitLabel.sensor-field-view's root is at 29.8 of 30 KB, leaving W8 little room on that root.not_checked).Agentic AI tools were used.