Skip to content

[Release readiness] Stream 2: Dialogs and Edit selection #548

Closed

Description

@suraj-ranganath

[Release readiness] Stream 2: Dialogs and Edit selection

Context

This issue is one of 11 release-readiness streams for sccn/eegprep. The release goal is EEGLAB parity in the GUI and the numbers for everything except STUDY and third-party plugins (default / bundled plugins only: EEG-BIDS, ICLabel, clean_rawdata, dipfit, firfilt).

The audit (report eegprep_GUI_audit_2026-11-05.pdf, findings F1–F126 in findings.md) was run as a simulated user: hands-on GUI use of eegprep and EEGLAB side by side, with real datasets, plus numerical parity checks against MATLAB EEGLAB. EEGLAB was the pinned tree eeglab-8ac485f6 on the lab MATLAB machine (jamming, path ~/gui-parity/eeglab-8ac485f6), never modified. eegprep was develop at 0bda20da. Where the pinned tree lacked a plugin (Biosig, Fileio, neuroscanio, bva-io, Fieldtrip-lite, viewprops), comparisons against a bench copy are labelled non-pinned.

Of 144 in-scope menu items, 141 were tested hands-on in both GUIs. Not counted in that 141: Quit (not run, ends the session) and the two eegprep-only Plot items "View extended channel/component properties" (pinned EEGLAB has no viewprops; tested in eegprep only as F122).

This stream: Dialog plumbing and Edit selection dialogs (size M). Findings assigned: F37, F39, F40, F44, F48, F50, F100, F101, F102, F105, F124.

Files / functions owned (do not edit outside these without coordinating; see fix_streams.md):

guifunc/qt.py (everything except S1's navigation helpers), guifunc/spec.py, inputgui.py, supergui.py; popfunc/pop_rejmenu.py; popfunc/pop_editeventfield.py; popfunc/pop_comments.py; popfunc/pop_select.py; popfunc/pop_selectevent.py; the event-type picker spec in pop_epoch.py

Dependencies / merge order: Merge after S1 (both touch qt.py). Adds a generic 'run dialog action' callback in qt.py that S5 (channel editor buttons) uses, so merge before S5. The rejmenu Plot buttons open eegplot (S3); add an integration test once S3 lands.

Suggested tests from the stream plan: Qt offscreen tests: every rejmenu/eventfield/chanedit button enabled and wired, dialog fits 1200 px; function tests: pop_select/pop_selectevent on all three tutorial sets. Parity: F44 against EEGLAB (128 pnts / 8 events, already recorded), so MATLAB is optional.

Common datasets used in the audit (copies only; never the originals):

  • eeglab_data.set — continuous tutorial (32 ch, 128 Hz, 30504 pnts)
  • eeglab_data_epochs_ica.set — epoched + ICA (80 epochs)
  • eeglab_data_numerical_events.set — numerical event types
  • BrainVision set (testbva.vhdr / related) — 32 ch, 2112 pnts, 17 events
  • test.bdf / test.edf — Biosemi / EDF samples
  • BIDS oddball sample for import/export
  • Neuroscan .EEG, BVA .mat, MFF folder, HDF5 eeglab_data_hdf5.set where noted
  • Channel location files: eeglab_chan32.locs, standard_1005.elc, standard-10-5-cap385.elp

Companion stream issues (together they cover F1–F126):

Stream Issue
1 Data safety #546
2 Dialogs and Edit selection #548
3 Scroll window #547
4 Signal processing #549
5 Channel locations and re-reference #550
6 Rejection numbers #551
7 Plots and plot history #552
8 ICLabel, component properties, DIPFIT #553
9 Importers #554
10 Export and BIDS #555
11 Main window, menus, preferences, help #556

Screenshots: image files for this stream are staged under /workspace/gui-parity/issues/stream-02/ and ready for gh issue edit --attach. Embedding via --attach failed with the current fine-grained GH_TOKEN (HTTP 403 on uploads.github.com). Run attach_screenshots.sh with a classic PAT that can upload user-attachments (or grant the fine-grained token Contents + attachments). Until then, screenshot filenames are listed under each finding.

Findings

Use the checkboxes to track progress. Full audit detail is carried over (not summarised away).

- [ ] F37 — critical — Edit > Select data

Finding (full audit text): Crashes on the tutorial dataset before the dialog opens: "The truth value of an empty array is ambiguous..." (chanlocs.type is an empty ndarray; pop_select_dialog_spec line 567). Same on eeglab_data_numerical_events. EEGLAB opens the dialog. Works on test.bdf and the epoched set

Evidence / screenshots: F37_eegprep.png, F37_eeglab.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F37_eeglab.png — F37: EEGLAB
  • F37_eegprep.png — F37: eegprep

- [ ] F39 — critical — Edit > Select epochs or events

Finding (full audit text): Crashes on all three tutorial sets (eeglab_data, epochs_ica, numerical_events): "truth value of an array with more than one element is ambiguous" (char-matrix EEG.eventdescription; pop_selectevent._field_description line 365). EEGLAB opens the dialog. Works on test.bdf

Evidence / screenshots: F39_eegprep.png, F39_eeglab.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F39_eeglab.png — F39: EEGLAB
  • F39_eegprep.png — F39: eegprep

- [ ] F40 — low — Edit > Select epochs/events

Finding (full audit text): A selection that matches nothing quietly gives 0 events (both tools); no warning

Evidence / screenshots: F40_eegprep.png, F40_eegprep_dialog.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F40_eegprep.png — F40: eegprep
  • F40_eegprep_dialog.png — F40: eegprep

- [ ] F44 — high — Edit > Select data (epoched)

Finding (full audit text): Time range [-0.5 0.5] on epochs [1 3 5 7 9] of eeglab_data_epochs_ica: eegprep 129 pnts / 5 events (xmax 0.5), EEGLAB 128 pnts / 8 events (xmax 0.4921875). Point count and event retention both differ

Evidence / screenshots: F44_evidence.png, eout/ep_select_trial_time.set

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F44_evidence.png — F44: evidence

- [ ] F48 — low — Edit > About this dataset

Finding (full audit text): The 9-line tutorial comment shows as one run-on paragraph and is saved back as a single string; EEGLAB keeps the line breaks

Evidence / screenshots: F48_eegprep.png, F48_eeglab.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F48_eeglab.png — F48: EEGLAB
  • F48_eegprep.png — F48: eegprep

- [ ] F50 — low — Select data / Select events (BDF)

Finding (full audit text): Data from test.bdf is saved as float64 (EEGLAB float32; maxdiff 3e-5 = float32 rounding). Event type 255 is numeric in eegprep but '255' in the EEGLAB output, so a selectevent command with {'255'} matches 0 events in EEGLAB vs 16 numeric. Channel type "..." is enabled with no types (EEGLAB disables it)

Evidence / screenshots: logs/compare_edit.txt

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

- [ ] F100 — low-medium — Edit > Event fields (pop_editeventfield, all menus)

Finding (full audit text): Field description buttons show a raw array repr and the "..." file buttons are disabled. EEGLAB shows readable descriptions ("Event type", "Stimulus position", "Event latency") and the "..." buttons work.

Evidence / screenshots: F100_eventfield_dlg_sbs.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F100_eventfield_dlg_sbs.png — F100: EEGLAB vs eegprep side-by-side

- [ ] F101 — low — Tools > Filter > Parks-McClellan (firpm)

Finding (full audit text): Numbers match: same parameters give maxabs 9.1e-13 against EEGLAB (std 21.430 vs 21.4298). The difference is the dialog: Estimate fills order 94 / weights 1/10 straight away, while EEGLAB opens a pop_firpmord sub-dialog (ripple/attenuation dB). LASTCOM has the same arguments in a different order.

Evidence / screenshots: F101_firpm_sbs.png, P_F101firpm_dlg_eeglab_20261105_052118.png, F101firpmord_dlg_eeglab_20261105_052201.png, P_F101firpm_dlg_eegprep_20261105_045617.png, F101firpm_plot_eegprep_20261105_045640.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F101_firpm_sbs.png — F101: EEGLAB vs eegprep side-by-side
  • P_F101firpm_dlg_eeglab_20261105_052118.png — F101: EEGLAB
  • P_F101firpm_eeglab_20261105_052237.png — F101: EEGLAB
  • F101firpm_dlg_filled_eeglab_20261105_052135.png — F101: EEGLAB
  • F101firpm_plot_eeglab_20261105_052219.png — F101: EEGLAB
  • F101firpmord_dlg_eeglab_20261105_052201.png — F101: EEGLAB

- [ ] F102 — high — Tools > Reject data epochs > Reject data (all methods) (pop_rejmenu)

Finding (full audit text): The dialog is 1000x1538 px, taller than a 1200 px screen, so the bottom buttons are off-screen. Every Calc / Plot / Calculate / PLOT / HELP button is disabled in the source; only Scroll Data works. EEGLAB's dialog is 1073x994 with every button enabled.

Evidence / screenshots: F102_rejmenu_sbs.png, P_F102rejmenu_dlg_eegprep_20261105_045754.png, F102rejmenu_scroll_eegprep_20261105_045820.png, P_F102rejmenu_dlg_eeglab_20261105_052308.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • F102_rejmenu_sbs.png — F102: EEGLAB vs eegprep side-by-side
  • P_F102rejmenu_dlg_eeglab_20261105_052308.png — F102: EEGLAB
  • P_F102rejmenu_dlg_eegprep_20261105_045754.png — F102: eegprep
  • F102rejmenu_scroll_eegprep_20261105_045820.png — F102: eegprep

- [ ] F105 — high — Tools > Reject data using ICA > Reject components (all methods)

Finding (full audit text): Same as F102 for ICA: every calculate/plot button is disabled.

Evidence / screenshots: P_F105icarejmenu_dlg_eegprep_20261105_050103.png, F102_rejmenu_sbs.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Screenshots (filenames; attach pending):

  • P_F105icarejmenu_dlg_eegprep_20261105_050103.png — F105: eegprep

- [ ] F124 — low — Tools > Extract epochs > "..." event-type picker

Finding (full audit text): Single-select combobox; EEGLAB has a multi-select list, so oddball+standard can't be picked together.

Evidence / screenshots: F123epoch_types_eegprep_20261105_054444.png

What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.

Definition of done

  • Every finding checkbox in this issue is fixed (or explicitly documented as intentional / EEGLAB-only with a locked test).
  • A regression test exists for each finding (Qt offscreen and/or function test as appropriate for the stream).
  • Where numbers are involved: a numerical parity test against pinned EEGLAB eeglab-8ac485f6 on jamming. Do not loosen any existing tolerance — only Suraj or Arno may change tolerances; fix root causes instead.
  • Where EEGLAB itself is buggy: eegprep does the right thing; the difference is documented and locked with a test (documented-difference style).
  • Error messages state what is wrong, which function hit it, and the exact fix (e.g. the pip install eegprep[...] command).
  • No code comments that restate code or justify workarounds.
  • Changelog entry for the stream.
  • One PR against develop, CI green (ignore the known-broken Claude review check).
  • Before merge, retest the same way as the audit: each finding's GUI flow is re-run hands-on in both eegprep and EEGLAB side by side, with before/after screenshots, plus the MATLAB parity / reference checks where this stream requires them; post the results on the PR.
  • Merging requires Suraj's explicit approval (squash merge).

Dependencies and overlaps

Merge after S1 (both touch qt.py). Adds a generic 'run dialog action' callback in qt.py that S5 (channel editor buttons) uses, so merge before S5. The rejmenu Plot buttons open eegplot (S3); add an integration test once S3 lands.

Shared hotspots (from fix_streams.md):

  • menu_actions.py is split by method — only edit this stream's named methods.
  • tests/eeglab_python_backend_xfails.py and tests/parity_expected/: each stream adds/removes only its own entries.
  • Suggested merge order overall: S1 → S2/S9/S11 → S5; S7 → S8; S3/S4/S6/S10 independent.

References

  • Audit PDF: eegprep_GUI_audit_2026-11-05.pdf (Suraj / Arno)

  • Findings log: findings.md (F1–F126)

  • Stream plan: fix_streams.md

  • Pinned EEGLAB: eeglab-8ac485f6

Screenshots (filenames; attach pending):

  • F123epoch_types_eegprep_20261105_054444.png — 124: F123epoch_types_eegprep_20261105_054444

Activity

  1. added
    bug
    epic
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugepic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions