Skip to content

[GUI] Put every pop_importepoch edit box in one column - #770

Merged
arnodelorme merged 8 commits into
developfrom
agent/20261127-fix-769
Nov 28, 2026
Merged

arnodelorme merged 8 commits into
developfrom
agent/20261127-fix-769

Conversation

@claude

@claude claude Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Every row of the pop_importepoch window now has its edit box or checkbox in one column, where develop has three (405, 485 and 590 pixels on the Mac). On Linux the eight boxes start at the same pixel. The same layout for EEGLAB is sccn/eeglab#993. Only the window changes.

Graphics

On Linux (jamming): EEGLAB before and after (sccn/eeglab#993), EEGPrep before and after.

pop_importepoch on Linux: EEGLAB before and after, EEGPrep before and after

On the Mac (real window): develop, then this pull request.

pop_importepoch on the Mac: before and after

Numerical difference with EEGLAB

pop_importepoch, distance between EEGLAB and EEGPrep

9 of 10 test cases give exactly EEGLAB's events (types, latencies, durations, epoch numbers). This pull request changes the window only, so these numbers are those of develop.

  • default time unit (fails): the same 159 events, with the same types, latencies and epoch numbers, but in another order. Without a time unit the latencies of the file are read as samples, so they fall after the end of their epoch. EEGLAB then sorts all events by latency, EEGPrep keeps them grouped by epoch.
  • In orange (9 cases): the numbers are the same, and EEGPrep's EEG.epoch has one more field than EEGLAB's, eventurevent.
What the code changes
  • Every row with an edit box or a checkbox uses the geometry [2.5 1 1]. The third column stays wider than EEGLAB's 0.6 because EEGPrep's hints are longer than NOTE.
  • The file row uses [1.5 1 2], so its edit box also starts at 2.5 of 4.5 of the row, after the Browse button. Since develop's commit 9ada0ae every control sits at its exact share of the row, as in EEGLAB, so no correction is needed.
  • The window widens by itself when a label would be cut: 900 pixels on the Mac, 1103 on Linux with its wider font.
Tests
How the numbers were obtained
  • Test cases: a text file with and without a header line, the time unit in milliseconds and in seconds, a duration field, a type field, old events kept, a numeric array in place of a file, two latency fields, the default time unit, and no latency field. All are made from the real sample files eeglab_data.fdt, eeglab_data_epochs_ica.fdt and eeglab_data_epochs_ica.set.
  • Both programs: EEGLAB develop with MATLAB R2025b and EEGPrep develop (395f19e; the import code has not changed since, up to 2558e8e), the same call on the same file, on jamming.
  • Distance: the largest absolute difference between the two outputs divided by the largest absolute value of EEGLAB's output. Tolerance 1e-12. Counts, labels and text fields must be the same.
  • Scripts: notes/file-menu-row-height-2026-11-27/scripts of adelorme-assistant/project_eegprep (numeric_ref.m, numeric_py.py, histogram.py).

Fixes #769
Part of #738

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @claude[bot]'s task in 48s —— View job


Code review

  • Overall assessment: Looks good. Every edit box now starts at the same left edge. The browse row [1.5, 1, 1.6] and the label/edit/hint rows [2.5, 1, 0.6] each add up to 4.1, so with weighted_columns=True the filename edit box and the fieldlist, latencyfields, durationfields, typefield, timeunit and headerlines edit boxes all start at 2.5/4.1. The clearevents checkbox starts there too. The control count per row still matches the geometry: 3, 1, 3×4, 1, 3×3.
  • Highest-risk area: The hint column shrinks from 1/4 to 0.6/4.1 of the width, so the hints "0 = no duration", "Default: TLE" and "(Ex: RT)" have less room. At the default 900 px width that column is about 130 px, which is enough for these short hints.
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

None.

Test gaps

None. test_importepoch_edit_boxes_share_one_left_edge checks the rendered left edge of all seven edit boxes, so it would fail if someone changed the weights back. Its local imports match the existing test_importdata_rows_share_the_window_height_and_show_the_chanlocs_note in the same file.

EEGLAB parity notes

None. This is a GUI layout change only, and the matching EEGLAB change is sccn/eeglab#993. The vendored src/eegprep/eeglab/ checkout was not in this CI workspace, so I could not compare the new geometry line by line with pop_importepoch.m. Nothing numerical changed, so this PR does not need the MATLAB reference run.

I checked correctness, geometry and control alignment, EEGLAB parity, the changed-behavior test and AGENTS.md compliance. I could not run the new Qt test here because the permission was denied, so it is still unverified locally.

@arnodelorme

Copy link
Copy Markdown
Collaborator

🤖 Captures: review, and one commit added (0766cff). The first version used EEGLAB's weights as they are. In EEGPrep's renderer that left the file box 43 pixels to the left of the others and cut one hint and the long label on jamming. The file row now uses weights that land on the same pixel, the third column keeps weight 1 for the hints, and the window widens when a label would be cut. The test now includes the checkbox and checks that no label is cut. Captures taken on jamming under a virtual screen. Lint fails here because of develop (merge #766 first).

EEGLAB before and after (sccn/eeglab 993), EEGPrep before and after

EEGLAB before and after (sccn/eeglab 993), EEGPrep before and after

First version of this pull request next to the corrected one

First version of this pull request next to the corrected one

@arnodelorme

Copy link
Copy Markdown
Collaborator

🤖 Captures: real Mac window and jamming, before and after, so the change can be judged on both. develop is merged in (the format check now passes). The Mac pictures are real windows shown on the Mac for a second and grabbed by Qt (native macOS style, no title bar). On the Mac the window stays 900 pixels wide. On jamming, with a wider font, it widens to 1002 so that no label is cut.

Mac, real window: develop, then this pull request

Mac, real window: develop, then this pull request

jamming: EEGLAB develop and with sccn/eeglab 993, EEGPrep develop and with this pull request

jamming: EEGLAB develop and with sccn/eeglab 993, EEGPrep develop and with this pull request

@arnodelorme

Copy link
Copy Markdown
Collaborator

🤖 About the failing test jobs here.

arnodelorme and others added 3 commits November 28, 2026 10:25
Develop now places weighted controls at their exact share of the row,
so the file row needs no correction: [1.5 1 2] puts its box at 2.5 of
4.5, as [2.5 1 1] does for the other rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-769

# Conflicts:
#	tests/test_stream9_gui_importers.py
@arnodelorme
arnodelorme merged commit 06446a7 into develop Nov 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pop_importepoch window: one edit column for every row (EEGPrep and EEGLAB)

1 participant