Skip to content

[GUI] Fit Preferences to the available option groups - #1034

Open
arnodelorme wants to merge 2 commits into
agent/issue-875-file-studyerpfrom
agent/issue-875-file-editoptions
Open

arnodelorme wants to merge 2 commits into
agent/issue-875-file-studyerpfrom
agent/issue-875-file-editoptions

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Preferences now sizes itself to the visible settings and their section headings. Enabled and greyed controls keep their standalone behavior. Stacked on #1032 (agent/issue-875-file-studyerp).

EEGLAB, EEGPrep before, EEGPrep after

Native geometry and same-input distances

Measurements and verification

Native client dimensions on jamming were 1095.5 × 538.0 px in MATLAB, 1050 × 682 before and 703 × 538 after. Both clients are 538 pixels tall after the change. EEGPrep shows the applicable subset and its own file-dialog preference. Three combinations of disk storage and numeric boundary type were saved to isolated settings directories. Both applications saved identical values in all three. Six focused tests passed, including a regression that removes a row and checks the resulting height. The Qt capture used the guarded checkout on PYTHONPATH.

Closes #1035. Part of #875.

Full inventory report for the project team. pop_editoptions (p. 35). PDF · Editable Word.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

🤖 Review before taking this out of draft.

State. The updated parent (#1032) is merged in (672e5023e). On the Mac 207 tests pass and jamming passes 307 geometry tests.

What I checked. The Preferences form moves to the supergui layout and loses its fixed 1050 x 620 scrolling window, so its height follows its rows.

Finding, not blocking. Without the scroll area the form can become taller than a small laptop screen. EEGLAB has the same limit, but it is worth one look on a 13 inch screen before merge. The new test only checks that the form is shorter with one row less, which is weak evidence.

Verdict: ready for review.

@arnodelorme
arnodelorme marked this pull request as ready for review December 2, 2026 05:50

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

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 Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 53s —— View job


Code review

  • Overall assessment: Looks good apart from one nit. The change moves Preferences from a fixed 1050 × 620 window with a scroll area to layout="supergui", so the window height now comes from its rows, as it does in EEGLAB.
  • Highest-risk area: screen overflow in pop_editoptions_dialog_spec (src/eegprep/functions/adminfunc/pop_editoptions.py:176).
  • Merge recommendation: Safe to merge once the nit is addressed.

Blocking

None.

Important

None.

I checked the following:

  • Disabled and bold controls. The supergui builder (qt.py _build_supergui) creates widgets with the same _build_widget as the row layout. Disabled rows, tooltips and bold section headings still render.
  • Removed fields. DialogSpec documents that size, scrollable and weighted_columns are ignored under layout="supergui" (guifunc/spec.py:84-87). Removing them deletes no behaviour.
  • Small screens. The supergui path resizes to layout.sizeHint() and has no scroll fallback when the window is taller than the screen. The row-layout path does have one (qt.py _apply_spec_size). At the measured 538 px the window fits on a 13-inch laptop. It only becomes a problem if the list of option groups grows a lot, and EEGLAB's pop_editoptions has the same limit. I am not flagging it.

Nits

  • tests/test_eeg_options.py:117-119: the test imports replace and pop_editoptions_dialog_spec inside the function. AGENTS.md says "All imports go at the top", and neither exception (a circular import or an optional dependency) applies. Move both imports to the top of the file. Also, spec.geomvert[:-1] if spec.geomvert else () always evaluates to () now that the spec has no geomvert, so you can drop that argument. Details are in the inline comment.

Test gaps

None that block merging. The new test removes the last row and asserts that the window gets shorter. That is weak evidence, as you noted, but it fails on the old fixed-size spec, so it does catch the regression this PR fixes.

EEGLAB parity notes

None. The PR does not change saved option values, and the description reports identical saved values in MATLAB and EEGPrep for all three option combinations tested.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, tests for the changed behaviour, and AGENTS.md compliance.

Comment thread tests/test_eeg_options.py
Comment on lines +117 to +119
from dataclasses import replace

from eegprep.functions.adminfunc.pop_editoptions import pop_editoptions_dialog_spec

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit (AGENTS.md compliance). These imports are local to the test function. AGENTS.md says "All imports go at the top. No local imports except for circular dependency breaks or optional dependency guards." Neither exception applies here, because the module already imports pop_editoptions from eegprep.functions.adminfunc.pop_editoptions at the top (

from eegprep.functions.adminfunc.eeg_readoptions import eeg_readoptions
from eegprep.functions.adminfunc.pop_editoptions import pop_editoptions
from tests.eeglab_tests import eeglab_test
).

Fix: move from dataclasses import replace to the top of the file and extend the existing import to from eegprep.functions.adminfunc.pop_editoptions import pop_editoptions, pop_editoptions_dialog_spec.

Separately, the spec no longer sets geomvert, so spec.geomvert[:-1] if spec.geomvert else () always evaluates to (). You can drop the geomvert= argument from replace(...).

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant