Skip to content

[electrophysiology_browser] Electrophysiology browser 3.0 | Dynamic Channel Amplitude | Reworked 3D Sensor Map | Navbar | State management | Strict static checking | Miscellaneous Features - #11003

Open
MaximeBICMTL wants to merge 4 commits into
aces:mainfrom
MaximeBICMTL:ephys-browser-frontend

Conversation

@MaximeBICMTL

@MaximeBICMTL MaximeBICMTL commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR modernizes the electrophysiology browser in preparation for MEG support in LORIS. This PR is purely focused on front-end changes in the electrophysiology browser and can be reviewed and tested as a standalone. Changes that depend on changes to the LORIS backend or imaging pipelines are submitted separatedly in the appropriate repositories.

Scope

This PR aims to only touch the modules/electrophysiology_browser/jsx directory. Changes outside of this directory are few and easy to review, due to renames and (desirable) changes in the test or build system.

First commit is #11211, see that PR (now closed in favor of this one) for more details.

Testing

Before testing that PR, you need to regerate the chunk_pb.js file since protobuf has been updated, do so with npm install or make dev. protoc needs to be installed to generate the file (just as before).

As before, building the full electrophysiology browser (npm run build) front-end can be done with either the EEG_VIS_ENABLED=true environment or database configuration.

Known issues

This PR has a few known issues, which I believe are minor and outside of the scope of this PR.

This PR reuses the Panel from the LORIS jsx, which has two issues:

  • Titles can only be string rather than any ReactNode, which creates a propTypes warning.
  • The initCollapsed prop does not work, which makes panels always uncollapsed originally.

The HED Dataset Manager is still a weird button that looks like it is in the navbar but actually is not and is tied to an acquisition with absolute positioning. This looks even weirder with the new navbar but is a bug that is already present and can be fixed separately.

The navbar does not go to the real bottom of the page, this is due to the LORIS footer, which has weird CSS. The principled fix would be to fix the footer CSS or implement a reusable sidebar architecture in LORIS, not something that can be done without extending the scope of this (massive) PR.

Features

General

  • Add Three.js, React Three Fiber, and Drei dependencies (see details in montage section).
  • Extend the content security policy for Three.js blob scripts and workers.
  • Move some of the state management from Redux to React contexts.
  • Add reusable low-pass and high-pass filter controls.
  • Add reusable multi-select dropdown and mutable dependency-cache components.

Series Viewer

  • Add adaptive channel scaling based on visible samples.
  • Store signals as Float32Array rather than vanilla Javascript arrays.

Navbar

  • This PR adds an actually usable navbar to the module, which allows to easily navigate a session acquisition and the electrophysiology browser main features.

(3D) Montage

  • Isolate the Montage into its own directory.
  • Extract the Channels Editor and 3D Montage into their own files.
  • Add sensor categories (this PR only fetches EEG electrodes, fetching of MEG sensors will come in other PRs)
  • Refactor the 3D Sensor Map to use Three,js+Three.js Fiber (Canvas) rather than VisX (SVG) for display.
  • Use Three.js Drei orbital controls rather than homemade solution for 3D controls.
  • Add dropdown to select which types of sensors to visualize.

Architecture

State management

State management has been completely revamped, dropping the old overengineered Redux/Ramba-based Frankensteinish abomination that no one actually understood (sorry not mincing my words lol, no hard feelings though). State management now uses standard React state and context hooks.

File organization has been revamped to group files by feature rather than layer~ish organization.

Dependencies

Removed: redux, react-redux, redux-actions, redux-logger,
redux-observable, redux-thunk, rxjs, ramda, react-compound-slider,
d3-3d, resize-observer-polyfill, tslib, @types/react-redux.

Added: three, @react-three/fiber and @react-three/drei (the 3D sensor map
is now rendered with WebGL instead of d3-3d SVG projections).

Upgraded: google-protobuf 3 → 4.

Static tests

This PR enables full strict type checking for the electrophysiology browser.
It also removes the ESLint ignore that was used for much of the module files. The only override that is kept for the module is a 100-character line limit.

Other notes

The translation updates have been AI-generated.

@MaximeBICMTL MaximeBICMTL added this to the 30.0.0 milestone Jul 24, 2026
@github-actions github-actions Bot added Language: PHP PR or issue that update PHP code Language: Javascript PR or issue that update Javascript code Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Module: instrument_manager PR or issue related to instrument_manager module Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module Multilingual Any tasks related to making LORIS multilingual labels Jul 24, 2026
@MaximeBICMTL MaximeBICMTL removed Module: instrument_manager PR or issue related to instrument_manager module Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module labels Jul 24, 2026
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch from a6667d9 to 5895401 Compare July 24, 2026 18:20
@github-actions github-actions Bot added Module: instrument_manager PR or issue related to instrument_manager module Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module labels Jul 24, 2026
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch from 5895401 to 9237eb0 Compare July 24, 2026 18:37
@HenriRabalais HenriRabalais removed the Module: dataquery PR or issue related to (new) dataquery module label Jul 27, 2026
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch from 9237eb0 to 9ab4c5d Compare August 11, 2026 14:26
@github-actions github-actions Bot added Language: SQL PR or issue that update SQL code Module: candidate_parameters PR or issue related to candidate_parameters module Module: document_repository PR or issue related to documen_repository module Module: dataquery PR or issue related to (new) dataquery module Module: redcap PR or issue related to redcap module labels Aug 11, 2026
@MaximeBICMTL
MaximeBICMTL changed the base branch from 29.0-release to main August 11, 2026 14:38
@MaximeBICMTL MaximeBICMTL removed Language: SQL PR or issue that update SQL code Module: candidate_parameters PR or issue related to candidate_parameters module Module: document_repository PR or issue related to documen_repository module Module: instrument_manager PR or issue related to instrument_manager module Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module labels Aug 11, 2026
@MaximeBICMTL MaximeBICMTL removed the Module: redcap PR or issue related to redcap module label Aug 11, 2026
@github-actions github-actions Bot added Module: instrument_manager PR or issue related to instrument_manager module Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module labels Aug 11, 2026
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch 3 times, most recently from 138d665 to 5070faa Compare August 18, 2026 03:35
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch 2 times, most recently from 409c74a to 1c29429 Compare September 24, 2026 12:46
@maximemulder
maximemulder marked this pull request as ready for review September 24, 2026 13:04
@maximemulder maximemulder removed Module: instrument_manager PR or issue related to instrument_manager module Module: data_release PR or issue related to data_release module Module: dataquery PR or issue related to (new) dataquery module labels Sep 24, 2026
@MaximeBICMTL MaximeBICMTL added Difficulty: Complex PR or issue that require a great effort to implementat, review, or test Category: Feature PR or issue that aims to introduce a new feature Category: Refactor PR or issue that aims to improve the existing code labels Sep 24, 2026
@maximemulder maximemulder changed the title [electrophysiology_browser] Session Viewer 3.0 | Dynamic Channel Amplitude | Reworked 3D Sensor Map | Miscellaneous Features [electrophysiology_browser] Session Viewer 3.0 | Dynamic Channel Amplitude | Reworked 3D Sensor Map | Navbar | State management | Strict static checking | Miscellaneous Features Sep 24, 2026
@maximemulder maximemulder changed the title [electrophysiology_browser] Session Viewer 3.0 | Dynamic Channel Amplitude | Reworked 3D Sensor Map | Navbar | State management | Strict static checking | Miscellaneous Features [electrophysiology_browser] Electrophysiology browser 3.0 | Dynamic Channel Amplitude | Reworked 3D Sensor Map | Navbar | State management | Strict static checking | Miscellaneous Features Sep 24, 2026
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch 2 times, most recently from 02fddb0 to c67b938 Compare October 6, 2026 04:32
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch from c67b938 to ab38cff Compare October 14, 2026 12:19
@MaximeBICMTL
MaximeBICMTL force-pushed the ephys-browser-frontend branch from ab38cff to d444186 Compare October 23, 2026 12:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Feature PR or issue that aims to introduce a new feature Category: Refactor PR or issue that aims to improve the existing code Difficulty: Complex PR or issue that require a great effort to implementat, review, or test Language: Javascript PR or issue that update Javascript code Language: PHP PR or issue that update PHP code Module: electrophysiology_browser PR or issue related to electrophysiology_browser module Multilingual Any tasks related to making LORIS multilingual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants