Skip to content

[GUI] Run the ERP image MATLAB pixel gap check on Linux only - #1058

Merged
arnodelorme merged 1 commit into
developfrom
agent/issue-875-erpimage-gap-test
Dec 1, 2026
Merged

arnodelorme merged 1 commit into
developfrom
agent/issue-875-erpimage-gap-test

Conversation

@arnodelorme

Copy link
Copy Markdown
Collaborator

tests/test_gui_pop_erpimage.py::test_dialog_columns_follow_eeglab_supergui_weights fails on macOS since #1006 was merged. It asks for a 27 pixel gap between the smoothing field and the scalp map checkbox. That number is MATLAB's gap on Linux. The window width follows the text widths of the platform, so the same layout gives 29 pixels with the Mac fonts.

Platform Dialog width Gap Result before this change
Linux (jamming) 1156 px 27 px passes
macOS (offscreen) 1195 px 29 px fails

The absolute check now runs on Linux only, where the MATLAB reference was measured. This is the rule tests/test_gui_geometry.py already follows for MATLAB pixel positions. The other checks of the test (buttons above their fields, equal outer margins, the selection button as a fraction of the window width) still run on every platform.

Tests: tests/test_gui_pop_erpimage.py gives 63 passed on macOS with this change (1 failed, 62 passed before) and 63 passed on Linux. No source code changes.

Part of #875

🤖 Generated with Claude Code

@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 1, 2026 •

Copy link
Copy Markdown
Contributor

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


Code review

  • Read PR diff and AGENTS.md

  • Check consistency with existing platform rules for MATLAB pixel checks

  • Post review

  • Overall assessment: Looks good. The 27 px check now runs only on Linux, because that's the only platform with a MATLAB measurement behind it. The other layout checks still run everywhere.

  • Highest-risk area: None identified. The change is test-only.

  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

None.

Test gaps

None. I also checked whether the gap could be checked on every platform as a share of the dialog width instead. That doesn't work: 27/1156 × 1195 ≈ 27.9 px, and macOS draws 29 px. That misses the ±1 px tolerance, so skipping the absolute check off Linux is the right call. It's better than widening the tolerance, which AGENTS.md forbids.

EEGLAB parity notes

None. The guard matches tests/test_gui_geometry.py:299 (skipif(sys.platform != "linux", reason="the MATLAB reference positions were measured on Linux")). The new comment gives the MATLAB source of the number, which AGENTS.md allows. It doesn't excuse a workaround.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance. I did not run the tests in this job; the pass counts in the PR body are the author's.

@arnodelorme arnodelorme left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This review was written by an AI assistant during a nightly check, not by Arno.

Code review

  • Overall assessment: Safe to merge.
  • Highest-risk area: Linux guard on the MATLAB pixel gap assertion in test_dialog_columns_follow_eeglab_supergui_weights.
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

None.

Test gaps

None.

EEGLAB parity notes

None.

Checked for correctness bugs, EEGLAB parity against supergui figure width scaling from platform text extents and tools/gui_geometry/reference/pop_erpimage.json, consistency with tests/test_gui_geometry.py, tests for changed behavior, and CLAUDE.md/AGENTS.md compliance.

Tests run at fe09d92e8e95fb82f1c668dc3f648dfe3e9f2b62 in a detached worktree on macOS: tests/test_gui_pop_erpimage.py (63 passed), tests/test_gui_geometry.py -k pop_erpimage (2 passed, 1 skipped on macOS), and ruff check and ruff format --check on tests/test_gui_pop_erpimage.py (all 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.

1 participant