Repository navigation
Description
Arno wants the vertical alignment of EEGPrep dialogs solved at its root before the individual window fixes: EEGPrep's supergui should take exactly the same geometry and options as EEGLAB's supergui (borders, spacing, column weights, edit box sizing), so the same geometry parameters give the same window in MATLAB and Python without per-window fiddling.
- Pick ten EEGLAB dialogs whose geometry covers the hard cases, above all rows that mix a checkbox and an edit box, and edit boxes whose size supergui computes automatically. Good candidates from his feedback: pop_firws, pop_rmbase, pop_reref, pop_autorej, pop_eegthresh, pop_rejspec, pop_dipfit_gridsearch, pop_plottopo, pop_resample, pop_iclabel.
- Isolate the code that draws each dialog in a standalone script or function on both sides (MATLAB and Python), fed the same geometry and uicontrol list, with no data needed.
- A geometry test suite on Linux only (jamming): draw all ten on both sides, capture them, and have a vision model compare each pair against Arno's rules (vertical alignment of edit boxes, no empty rows that MATLAB lacks, text centered in edit boxes, same row heights).
- Rework EEGPrep's supergui to follow MATLAB's supergui (a copy, or a rewrite from scratch in Python if cleaner), and iterate until the ten pairs look close enough.
- Model: Fable (Arno: "using Fable 2"). Result: a PDF to Arno, one page per dialog, MATLAB beside Python, before and after.
- Check the revision of both repositories on jamming before each capture: Arno noted that the Linux code was sometimes not in sync with the other platforms.
Related: #745 supergui, #764 inputgui, #821 and #870 (the Tools and Plot alignment issue) and the other issues filed on November 29: #869, #871, #872, #873, #874, #876. The individual feedback issues are on hold until this is done, then rechecked.
Arno's words
Email of November 29, 2026, "Re: November 29 EEGLAB and EEGPrep menu comparison | editable Word".
Now I want to spend some time on the alignment, vertical alignment of the GUI. For this, I want a test suite with a bunch of geometry from different functions and I want it to be tested on Linux only. Note that sometimes the Linux code was not in sync with the other code, so there were no pull changes.
I would like the test function, but test the collection of geometry. The main difficulty that the program is encountering right now is when there is a checkbox and edit box, and the alignment of edit boxes and automatically calculating the size of edit boxes.
There is somehow this discrepancy between MATLAB and Python. I want the Python code to clearly try to match the MATLAB code in terms of the option to add borders, etc., to the GUI. This way we can use exactly the same parameter in MATLAB and Python for the geometry instead of trying to fiddle with them.
So I want you to choose ten EEG artifact problems. Isolate the code that plots the GUI in MATLAB and Python, so a separate script or a function. Plot all of them with the functions on both sides and then use a vision LLM to compare them for accuracy based on all the feedback I've provided.
The main problem is the vertical alignment of the edit boxes And the fact that sometimes there's an empty rows in the Python code Which are not in the MATLAB code. So while you filed the issues below, I want you to specifically work on this one first using Fable 2. That means creating maybe a copy of supergui. Maybe reprogramming it from scratch in Python. And iterating until the GUI looks good enough and close enough to MATLAB. Then send me a PDF.
After we're done, we can tackle the issues below and see if they've been fixed. But for now, just log the issues below without working on them.
Activity
claude commentedon Nov 29, 2026
🤖 Plan:
supergui.mand the EEGPrep Qt rendererweighted_columns=Trueto 4 dialogs, which is the per-window approach this issue replaces. No open PR reworks supergui.Research
EEGLAB's
superguiplaces every control at an absolute normalized rectangle (getcoord). The rectangle comes fromgeomhoriz/geomvertand the normalizedborders[0.05 0.04 0.07 0.06] andspacing[0.02 0.01], both scaled by5/maxhorizand10/sumvert. The figure is then scaled byfactmultx/factmulty, which come from the measured text extents. So every control in a row has the same height and y position, blank rows get exactly one geomvert share, and edit boxes line up wherever the column fractions match.EEGPrep instead builds one
QHBoxLayoutper row inside aQVBoxLayout. It has two modes: content-sized stretch (the default) andweighted_columns(opt-in, used in 10 dialogs, plus 4 more in #846). Its pixel margins (42,17,42,13) androw_spacingdo not come from supergui'sborders/spacing. Blank rows go throughaddSpacing, a separate path, and text usesAlignVCenterinstead of supergui's text shift (posy+height/5, then height=extent, -4 px). This explains each symptom Arno reported: edit boxes that do not line up (content-sized columns), extra empty rows (the blank-row spacing plus the strut height), and uneven row heights.Relevant code
qt.py#L230-L285: per-row HBox layout and the two column modesqt.py#L974-L1023: row height, share and strut heuristicsspec.py#L61-L98: pixel margins and spacing knobs, unrelated to superguiborders/spacingsupergui.py: thin wrapper with no geometry logicsupergui.m:getcoord, thefactmultx/factmultyscaling and the text shiftProposed design (for review)
1. A pure geometry port. Add
supergui_geometry(geomhoriz, geomvert, borders, spacing) -> list[(x, y, w, h)]inguifunc/supergui.py. It is a line-for-line port of the geom conversion plusgetcoord, taking the same option names and defaults as MATLAB. It has no Qt, so amatlab-marked test can check the rectangles against MATLAB'sgetcoordexactly. That makes geometry parity a numeric check, not only a visual one.2. One layout engine. In
QtDialogRenderer.build_dialog, replace the per-row HBox path with a smallQLayoutsubclass (or aresizeEvent) that places each widget at its normalized rectangle times the content area. The window size follows supergui. Measure the text and checkbox extents to getfactmultx, and the line height to getfactmulty, then apply the per-platform factors (Mac x1.5, Windows x1.08, x0.9) andminwidth. Text controls get the+height/5shift and the -4 px bottom alignment. Edit boxes get the full cell height, with the text vertically centered (the #869 symptom).DialogSpecswapscontent_margins,row_spacing,column_spacing,weighted_columnsandfit_weighted_labelsforborders,spacingandminwidth, which keep the MATLAB defaults. Per AGENTS.md there is no compatibility shim, and everyDialogSpec(...)call site is updated.inputgui's button row stays as it is, and thescrollableand textarea paths are kept.3. The ten-dialog harness (
tools/visual_parity/geometry/). Addcases.jsonwithgeomhoriz,geomvertanduilistcopied verbatim from the EEGLAB source of pop_firws, pop_rmbase, pop_reref, pop_autorej, pop_eegthresh, pop_rejspec, pop_dipfit_gridsearch, pop_plottopo, pop_resample and pop_iclabel. These are static strings, so no data is needed.draw_supergui.mcallssuperguidirectly anddraw_supergui.pycalls the new renderer, both from that JSON.capture.pyreuses the existing X11 capture path on jamming. It first recordsgit rev-parse HEADfor eegprep and for the EEGLAB checkout in each capture's metadata, and stops if either differs from the expected commit.4. Comparison and report. Fable gets each MATLAB/Python pair with a fixed rubric: edit boxes aligned vertically, no empty rows that MATLAB lacks, text centered in edit boxes, the same row heights, and the same row and column count. It returns a pass/fail per rule plus notes. A PDF has one page per dialog with MATLAB | Python, before | after. Neither step is in CI. The CI gate is the numeric
getcoordtest plus a Qt offscreen test that checks, for each case, that widget x positions matchsupergui_geometrywithin 1 px.Order: (1) and its MATLAB test, then the "before" captures from (3), then (2), then the "after" captures and (4). Then recheck #821, #869, #870 to #874, #876, and close #846 if it is superseded.
Open questions
weighted_columnsand the content-sized mode be removed entirely, which touches every dialog at once, or kept behind a flag during a migration? Removing them is the simpler end state but moves every window.factmultxdepends on font metrics that differ between MATLAB Java and Qt. Is the target "same normalized layout, window size within N%", and if so, what N?pop_dipfit_gridsearchis in the dipfit plugin, not EEGLAB core, so the harness needs that plugin checked out on jamming. Is that acceptable, or should another core dialog replace it?arnodelorme commentedon Nov 29, 2026
🤖 Progress, November 29 (work in progress on branch
agent/issue-875, not pushed yet).Research
EEGLAB's
supergui.mgives every control a rectangle computed from the geometry alone (borders, spacing, row and column shares), then scales the figure by the largest text extent. EEGPrep's renderer (guifunc/qt.py) instead stacks Qt layouts that size each row by its content, with a margin above the buttons whereinputgui.madds an empty row, so the same geometry gave another window. Root cause: no port of thegetcoordarithmetic ofsupergui.mnor of the rowsinputgui.mappends.Relevant code
src/eegprep/functions/guifunc/qt.py#L198-L332- rows built from Qt layoutsfunctions/guifunc/supergui.m-getcoord,factmultx,factmultyfunctions/guifunc/inputgui.m- skip line, button row,adjustbuttonsProposed Fix
A pure Python port of the geometry of
supergui.mandinputgui.m(guifunc/supergui.py), fed the samegeometry,geomvert,borders,spacingandminwidth, and a Qt layout that puts each widget at the rectangle it returns. Dialogs opt in withDialogSpec(layout="supergui"). The ten dialogs of this issue are moved, the others keep the earlier layout until they are checked one by one.State on jamming (EEGLAB
f6a41006, EEGPrepd0de59f0, MATLAB R2025b):83bf988d). It is pulled now. EEGLAB was at the tip.pop_resample,pop_rmbase,pop_reref,pop_autorej,pop_eegthresh,pop_rejspec,pop_plottopo,pop_firws,pop_dipfit_gridsearch,pop_iclabel), drawn by one standalone MATLAB script and one standalone Python script.Still to do: existing GUI tests, the vision model pass, the PDF, the pull request.
arnodelorme commentedon Nov 29, 2026
🤖 Status, November 29: the pull request is open and the report is sent.
supergui.mandinputgui.m, moves the ten dialogs to it, centers the text of edit boxes, and adds the geometry test suite (tools/gui_geometry,tests/test_gui_geometry.py).pop_iclabelpart of pop_iclabel and pop_prop: remove the empty row that EEGLAB does not have #873 look solved by this change.The seven other dialogs are in the pull request.
Measurements and what remains different
pop_resamplepop_rmbasepop_rerefpop_autorejpop_eegthreshpop_rejspecpop_plottopopop_firwspop_dipfit_gridsearchpop_iclabelDrawn on jamming from EEGLAB
579a27d0, EEGPrep develope435f436(before) and the branch (after). The EEGPrep checkout there was 54 commits behind develop at the start. It is pulled, andtools/gui_geometry/run_linux.shnow prints how far each checkout is behind before it draws.The windows are up to 1.4% wider than MATLAB's (Qt measures text slightly wider). Text sits 2 pixels lower inside each control. Only Linux was compared. About 95 other dialog specifications keep the earlier layout.
arnodelorme commentedon Nov 29, 2026
Done: Issue 875 is answered by pull request 878: EEGPrep's supergui is now a port of the geometry of supergui.m and inputgui.m, ten dialogs are moved to it, a geometry test suite of these ten dialogs is in the repository, and the text of edit boxes is centered. On jamming the ten windows have MATLAB's height and rows within 0.7 pixel, and the vision model finds the ten pairs close enough. All checks pass. Arno has the PDF by email and three choices to make: how to move the other dialogs, the font on Linux, and pull request 846. Rule 35 is added to rules/gui-parity.md.
Pull request: #878
— eegprep, reported with orch done
arnodelorme commentedon Nov 29, 2026
Progress from the
eegprepclaude session "eegprep-2" (turn ended, 2026-11-29 11:04; posted by the orchestrator):arnodelorme commentedon Nov 29, 2026
Progress from the
eegprepclaude session "eegprep-2" (turn ended, 2026-11-29 11:19; posted by the orchestrator):arnodelorme commentedon Nov 29, 2026
Progress from the
eegprepclaude session "eegprep-2" (turn ended, 2026-11-29 12:22; posted by the orchestrator):arnodelorme commentedon Nov 29, 2026
🤖 Status, November 29: the rerun of every dialog on Linux after #878 is done, and the report is sent to Arno.
Report with one page per function (PDF and Word): https://github.com/adelorme-assistant/project_eegprep/tree/main/reports/all-dialogs-2026-11-29
— eegprep worker
arnodelorme commentedon Nov 29, 2026
Arno asked on November 29, 2026 (email, 14:34) to check that the merged code of pull request #878 is really the code on Linux, and to draw the ten dialogs again.
5e0be870and EEGPrepcea86f8f(the squash merge of [GUI] Lay out dialogs as EEGLAB's supergui does, with a geometry test suite of ten dialogs #878), each equal toorigin/develop, clean, and Python loadseegprepfrom that checkout.The recheck on jamming (14:45, November 29, 2026)
Folder
/mnt/v1/arno/eeglab-eegprep-compare/runs/issue-875-recheck-20261129(recheck.sh,recheck.log,out/), run withtools/gui_geometry/run_linux.shfromrepos/eegprep.cea86f8fpop_resamplepop_rmbasepop_rerefpop_autorejpop_eegthreshpop_rejspecpop_plottopopop_firwspop_dipfit_gridsearchpop_iclabelRows sit within 0.7 pixel of MATLAB's in every dialog (column
yofout/positions.txt). "Identical" is an md5 comparison withruns/issue-875/final/python. The vision check was not run again here: it is part of the regenerated document.The stale copy:
venv/lib/python3.12/site-packages/eegprepwas installed on November 28 fromruns/other-menus-20261128-101343/snapshotand has no supergui dialog. The suite and the all-dialogs sweep put the checkout'ssrcfirst on the path, so neither used it, but a script that forgets to would draw the old code silently.— orchestrator
arnodelorme commentedon Nov 29, 2026
Done: Arno's order of November 29, 14:34: the merged code of pull request 878 is verified on jamming (EEGPrep cea86f8, EEGLAB 5e0be870, the ten dialogs byte for byte those of the pull request, 30 geometry tests pass); eegprep-3 stopped, the plan (document regenerated, the ten functions checked, all other dialogs moved, comparison again, guards against old code) handed to the Fable session eegprep-2; the manual approval traced to manual mode on the Noetic accounts and handed to the run order-permmode-1795992455747 (design 304 and 305); he was emailed with one question on Fable's reserve.
— orchestrator, reported with orch done
arnodelorme commentedon Nov 29, 2026
🤖 Step 1 of Arno's order of November 29, 14:34: the dialog geometry document is regenerated from the merged code and is still valid.
5e0be870and EEGPrep atcea86f8f(the squash merge of [GUI] Lay out dialogs as EEGLAB's supergui does, with a geometry test suite of ten dialogs #878), each equal toorigin/developafter a fetch, working trees clean. The drawing Python loadseegprepfromrepos/eegprep/src.tests/test_gui_geometry.pypass there.Two synchronization hazards found, to fix in step 5
The shared Python environment on jamming (
/mnt/v1/arno/eeglab-eegprep-compare/venv) holds an old, non-editable copy ofeegprepinsite-packages: a script that does not setPYTHONPATH=<checkout>/srcdraws the old code without a word. The Mac clone~/GitHub/core_eeg/eegprepis behindorigin/develop, so a Mac capture from it would show the code before #878.arnodelorme commentedon Nov 29, 2026
Done: Step 1 of Arno's order of 14:34 is done: the dialog geometry document was regenerated on jamming from the merged develop (EEGLAB 5e0be870, EEGPrep cea86f8) and is still valid. The ten dialogs are identical, byte for byte, to those of pull request 878, the vision check again finds the ten pairs close enough, and the PDF and Word were emailed to Arno. Step 2 starts now: the geometry each of the ten EEGPrep functions passes, compared with EEGLAB's, control by control.
— eegprep, reported with orch done
arnodelorme commentedon Nov 29, 2026
🤖 Handover, November 29: on Arno's instruction this issue moves from the Fable session to a Codex Astra session. Step 1 of his order is done (the document regenerated, still valid). Step 2 is written and tested but has no pull request yet: on the epoched sample the ten functions pass exactly what EEGLAB passes, and four of them differed on other data and are fixed on the branch
agent/issue-875-ten-functions(commit2dc218ef, pushed):pop_eegthreshon ICA components,pop_plottopowith no dataset name,pop_dipfit_gridsearchwith a CTF head model, and the tooltip ofpop_iclabel. What is half done, and steps 2 (the rest), 3, 4 and 5 with their commands and paths, are inhandover/issue-875.mdof adelorme-assistant/project_eegprep.34 remaining items
arnodelorme commentedon Dec 1, 2026
Done: Second round on the 22 reviewed pull requests: Gemini 4 Carbon fixed the findings, every fixed pull request was reviewed again, and 19 were merged in order with merge commits (987, 962, 911, 929, 974, 982, 994, 1001, 1006, 1010, 1012, 950, 970, 1014, 1017, 1019, 1016, 1027, 1036), develop at f65d501. Cleared but left for Arno: 886, 1037 and 1041 (processing code, EEGLAB reference runs done), 1038, 1039, 1040 and 1044 (parent 1028 reviewed safe, not merged), 1056 (draft parent 1034). Not cleared: 848 (needs the Windows 11 capture). 919 has nothing left. Two tests merged in this round fail on GitHub runners (ERP image gap from 1006, pop_newtimef half pixel from 994): repairs opened as 1058 and 1059, not merged. Six questions sent to Arno by email and on issue 875.
Pull request: #1036
— eegprep, reported with orch done
arnodelorme commentedon Dec 1, 2026
Arno answered the six questions on December 1, 2026. Merged into develop: #1028, #1038, #1039, #1040, #1044, #1058, #1059, #1037 and #1041. #919 closed (nothing left against develop). EEGLAB pull request sccn/eeglab#1009 swaps the pop_rejtrend slope units.
tests/test_gui_geometry.py; the eegprep worker merges develop into it, reruns the geometry tests and merges it (Arno chose "merge now").How the stacks were merged
Each stacked pull request was retargeted to develop after its parent merged, then merged with a merge commit. #1044 and #1059 conflicted with develop in the geometry test (and the ICA documentation for #1044); both sides were kept, the geometry tests passed on the Mac (181 passed, 85 skipped as Linux-only), and the merge commits were pushed to their branches before merging.
— orchestrator
arnodelorme commentedon Dec 1, 2026
Progress from the
eegprepclaude session "eegprep-2" (turn ended, 2026-12-01 09:54; posted by the orchestrator):arnodelorme commentedon Dec 1, 2026
Done: Pull request 886 is merged into develop with a merge commit (068ad17), as Arno chose. Before that, develop was merged into its branch without rebase and every develop case was carried into the recorded comparison of tests/test_gui_geometry.py: the pop_runica cases and their listbox exception, the width test, the pop_dipfit_headmodel case and the one-pixel tolerance. That file gives 192 passed and 85 skipped on the Mac and 277 passed on jamming. Nothing else was merged.
Pull request: #886
— eegprep, reported with orch done
arnodelorme commentedon Dec 1, 2026
Progress from the
eegprepclaude session "eegprep-2" (turn ended, 2026-12-01 10:09; posted by the orchestrator):arnodelorme commentedon Dec 1, 2026
Arno's answers of December 1, 2026 (email "Re: Re: EEGPrep #875 GUI parity: 12 pull requests merged, the rest explained"), for the EEGPrep worker to carry out:
Report each merge and each finding with
orch done.— orchestrator
arnodelorme commentedon Dec 1, 2026
Done: Finding: develop's test jobs are red on all four platforms since pull request 904 was merged on December 1 (one test, test_f42_merge_opens_newset_and_cancel_preserves_datasets, which still expected the old Append datasets dialog). It is not from the merge of 886. Every open pull request inherits the failure, so no pull request can show passing tests until it is fixed. Pull request 1062 repairs the test only (no source change). It is not in the list I may merge, so it waits for Arno or the orchestrator.
Pull request: #1062
— eegprep, reported with orch done
arnodelorme commentedon Dec 1, 2026
Done: Pull request 1056 (STUDY dataset editor paging): the finding is already fixed on its branch since November 30 (commit 58d83f0, the components button is relabelled from its own text, so All comp. stays after paging), and the test that clicks Clear and pages back passes (19 passed in tests/test_gui_pop_study.py). Nothing to change. It is still stacked on pull request 1034, which is open.
Pull request: #1056
— eegprep, reported with orch done
arnodelorme commentedon Dec 2, 2026
The EEGPrep session that was carrying out Arno's list of December 1 (eegprep-2) stopped on the Fable limit of the claude-ucsd account at 11:17 AM, while fixing #944. It was reopened at 5:41 PM on the same conversation with the claude-team account (Fable 5.2) and told to continue from where it stopped.
limit-switch(every 5 minutes) does this by itself for any tmux Claude session stopped on a limit.— orchestrator
arnodelorme commentedon Dec 2, 2026
Done: Review of pull request 889 (verify both checkouts before capturing dialogs): ready to merge. I ran its guard on jamming in four situations: without PYTHONPATH, with an untracked file and with a checkout behind develop it stops with a clear message before MATLAB starts, and on a clean checkout it draws the 95 cases and writes both commits. Two small suggestions are in the review comment. It is not merged: it was not in the list to merge.
Pull request: #889
— eegprep, reported with orch done
arnodelorme commentedon Dec 2, 2026
Done: PR 944 (pop_chanedit fields): fixed the finding that going back to channel 1 showed an empty original index (a label that only displays a value is no longer read back as an edit, test added), merged develop and resolved the three conflicts, base is develop. GitHub tests fail only on the three tests that already fail on develop (repair is PR 1062). Not addressed: the nightly review's second finding (polar and spherical coordinates recomputed from X, Y, Z for display). Not merged, it is not in the merge list.
Pull request: #944
— eegprep, reported with orch done
arnodelorme commentedon Dec 2, 2026
Done: File chain out of draft: PR 912 now targets develop, and 912, 915, 917, 921, 923, 951, 954, 958, 963, 965, 991, 997, 1021, 1029, 1032, 1034, 1056, 1048, 1050, 1052, 1054 each got develop through its parent, passed the geometry suite on jamming (307 tests at the top) and its own tests on the Mac, and received a written review before the next one was marked ready. Fixed on the way: 958 (EEGLAB's short style name 'list' broke develop's drawing test) and 1056 (it centered two labels that EEGLAB draws left aligned, measured in MATLAB on jamming, and that broke develop's dialog tests). Flagged for Arno before any merge: 1021 changes readegilocs (channel locations), 1029 changes what the MFF import returns, 1050 and 1052 change exported BIDS files. Nothing merged.
Pull request: #912
— eegprep, reported with orch done
arnodelorme commentedon Dec 2, 2026
Done: PR 1042 (pop_biosig settings) now targets develop with develop merged in. Two regressions that the retarget revealed are fixed: a script call again checks its options before opening the file (ValueError as before, not a RuntimeError), and the cancel test uses a real EDF file. GitHub tests on all four platforms fail only on the three tests that already fail on develop (repair is PR 1062). Still a draft, not merged.
Pull request: #1042
— eegprep, reported with orch done
arnodelorme commentedon Dec 2, 2026
Done: PR 933 (tf_cycle_calc blank or vector frequencies): not merged because develop already contains the repair (commit 80363ee of November 30). Its four test cases pass on develop 068ad17. After resolving the conflict the branch adds no code. I left it untouched and suggest closing it.
Pull request: #933
— eegprep, reported with orch done
arnodelorme commentedon Dec 2, 2026
Done: PR 1031 (pop_preclust dipole normalization): NOT merged, as asked. Evidence posted on the pull request: (1) direct comparison on jamming with EEGLAB 3dd650cc7 on the N400 study (10 datasets, 77 components): relative error 1.6e-16 to 1.9e-16 at dipole weights 1, 2 and 10 with the branch, 0.501 on develop (matrix half the size of EEGLAB's). (2) EEGLAB reference run 46818277933 with the MATLAB backend: 4970 passed, 58 skipped, 2 failed, and the 2 failures are develop's merge menu test (repair in PR 1062). The base is still agent/issue-967-clust (already in develop): it must be pointed at develop before a merge. The merge is Arno's decision (numerical change).
Pull request: #1031
— eegprep, reported with orch done