Skip to content

[GUI] Give dialog rows and push buttons more vertical space - #851

Merged
arnodelorme merged 11 commits into
developfrom
agent/issue-810
Nov 29, 2026
Merged

arnodelorme merged 11 commits into
developfrom
agent/issue-810

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Ordinary form rows are 10% taller (31 to 34 pixels on Linux) and push buttons go from 20 to 22 pixels, as issue #810 asks. No window opens shorter than on develop any more: of the 127 dialog variants measured, 126 are taller (median +10.0%) and one is shorter, the comments editor, which Arno accepted ("This is ok", his comment of November 28). A window whose rows need more than the screen now scrolls its rows and keeps its buttons in reach: Reject data epochs (pop_rejmenu) needs 1182 pixels and opens at 1040 on a 1080p screen and at 900 on a MacBook.

pop_rejmenu on develop, in the first version of this pull request, and now on a screen with 1040 and 900 pixels available

Windows that moved most: develop, the first version of this pull request, and now

Windows that moved most, continued

The three images above are EEGPrep drawn by Qt on the Mac without showing the window. The four images below are the earlier captures on Linux with EEGLAB next to EEGPrep; they show the first version of this pull request, before the heights were restored.

Ordinary content rows in the data importer

The channel editor preserves its labels, columns and spacer

Preferences with scrollable rows

The comments editor follows its text

Height of every dialog: develop, first version, now, and on a 900 pixel screen
Dialog develop this pull request before after after, 900 px screen change from develop
tf_cycle_calc 179 202 202 202 +13%
pop_autorej (continuous) 404 400 444 444 +10%
pop_autorej (epoched) 404 400 444 444 +10%
pop_biosig 308 334 334 334 +8%
pop_chanedit (continuous) 900 844 990 900 +10%
pop_chanedit (epoched) 900 844 990 900 +10%
pop_chanevent 368 400 400 400 +9%
pop_comments 840 335 335 335 -60%
pop_editeventfield (continuous) 360 341 396 396 +10%
pop_editeventfield (epoched) 360 376 396 396 +10%
pop_editeventvals (continuous) 360 348 396 396 +10%
pop_editeventvals (epoched) 360 384 396 396 +10%
pop_editset (continuous) 389 465 465 465 +20%
pop_editset (epoched) 389 465 465 465 +20%
pop_eegplot_epoch 128 136 136 136 +6%
pop_eegthresh (continuous) 318 334 350 350 +10%
pop_eegthresh (epoched) 318 334 350 350 +10%
pop_envtopo (continuous) 369 301 406 406 +10%
pop_envtopo (epoched) 369 301 406 406 +10%
pop_epoch (continuous) 264 240 290 290 +10%
pop_epoch (epoched) 264 240 290 290 +10%
pop_erpimage (continuous) 834 730 917 900 +10%
pop_erpimage (epoched) 834 730 917 900 +10%
pop_eventstat (continuous) 230 220 253 253 +10%
pop_eventstat (epoched) 230 220 253 253 +10%
pop_export 303 367 367 367 +21%
pop_headplot (continuous) 547 520 602 602 +10%
pop_headplot (epoched) 547 520 602 602 +10%
pop_importdata 458 499 499 499 +9%
pop_importepoch (continuous) 350 400 400 400 +14%
pop_importepoch (epoched) 350 400 400 400 +14%
pop_importerplab 174 202 202 202 +16%
pop_importevent (continuous) 310 334 341 341 +10%
pop_importevent (epoched) 310 334 341 341 +10%
pop_interp (continuous) 397 429 429 429 +8%
pop_interp (epoched) 339 380 380 380 +12%
pop_jointprob (continuous) 320 301 352 352 +10%
pop_jointprob (epoched) 320 301 352 352 +10%
pop_loadbv 128 136 136 136 +6%
pop_loadcnt 188 202 202 202 +7%
pop_loadeeg 218 235 235 235 +8%
pop_mffimport 128 136 136 136 +6%
pop_newcrossf (continuous) 476 375 524 524 +10%
pop_newcrossf (epoched) 476 375 524 524 +10%
pop_newset (continuous) 332 304 365 365 +10%
pop_newset (epoched) 332 304 365 365 +10%
pop_newtimef (continuous) 511 406 562 562 +10%
pop_newtimef (epoched) 511 406 562 562 +10%
pop_plotdata (continuous) 231 169 254 254 +10%
pop_plotdata (epoched) 231 169 254 254 +10%
pop_plottopo (continuous) 299 235 329 329 +10%
pop_plottopo (epoched) 299 235 329 329 +10%
pop_prop (continuous) 199 136 219 219 +10%
pop_prop (epoched) 199 136 219 219 +10%
pop_readegi 158 169 169 169 +7%
pop_rejchan (continuous) 282 235 310 310 +10%
pop_rejchan (epoched) 282 235 310 310 +10%
pop_rejcont (continuous) 332 301 365 365 +10%
pop_rejcont (epoched) 332 301 365 365 +10%
pop_rejkurt (continuous) 320 301 352 352 +10%
pop_rejkurt (epoched) 320 301 352 352 +10%
pop_rejmenu (continuous) 994 1182 1182 900 +19%
pop_rejmenu (epoched) 994 1182 1182 900 +19%
pop_rejspec (continuous) 356 367 392 392 +10%
pop_rejspec (epoched) 356 367 392 392 +10%
pop_rejtrend (continuous) 304 301 334 334 +10%
pop_rejtrend (epoched) 304 301 334 334 +10%
pop_reref 281 367 367 367 +31%
pop_rmbase (continuous) 233 254 254 254 +9%
pop_rmbase (epoched) 321 350 350 350 +9%
pop_rmdat (continuous) 158 166 166 166 +5%
pop_rmdat (epoched) 158 166 166 166 +5%
pop_runica (continuous) 334 277 367 367 +10%
pop_runica (epoched) 334 277 367 367 +10%
pop_select (continuous) 404 334 444 444 +10%
pop_select (epoched) 404 334 444 444 +10%
pop_selectcomps (continuous) 266 169 293 293 +10%
pop_selectcomps (epoched) 266 169 293 293 +10%
pop_selectevent (continuous) 500 446 550 550 +10%
pop_selectevent (epoched) 500 586 586 586 +17%
pop_signalstat (continuous) 150 136 165 165 +10%
pop_signalstat (epoched) 150 136 165 165 +10%
pop_spectopo (continuous) 299 235 329 329 +10%
pop_spectopo (epoched) 299 268 329 329 +10%
pop_subcomp (continuous) 231 234 254 254 +10%
pop_subcomp (epoched) 231 234 254 254 +10%
pop_timtopo (continuous) 299 235 329 329 +10%
pop_timtopo (epoched) 299 235 329 329 +10%
pop_topoplot (continuous) 404 310 444 444 +10%
pop_topoplot (epoched) 404 310 444 444 +10%
pop_writeeeg (continuous) 208 218 218 218 +5%
pop_writeeeg (epoched) 238 251 251 251 +5%
pop_studyerp_counts 188 202 202 202 +7%
pop_eventinfo 308 334 334 334 +8%
pop_participantinfo 278 301 301 301 +8%
pop_taskinfo 432 776 895 895 +107%
pop_exportbids 368 400 400 400 +9%
pop_icflag 452 504 504 504 +12%
pop_iclabel 199 136 219 219 +10%
pop_prop_extended (continuous) 288 202 317 317 +10%
pop_prop_extended (epoched) 288 202 317 317 +10%
pop_viewprops (continuous) 288 202 317 317 +10%
pop_viewprops (epoched) 288 202 317 317 +10%
pop_clean_rawdata (continuous) 733 638 806 806 +10%
pop_clean_rawdata (epoched) 733 638 806 806 +10%
pop_dipfit_gridsearch (continuous) 260 235 286 286 +10%
pop_dipfit_gridsearch (epoched) 260 235 286 286 +10%
pop_dipfit_headmodel (continuous) 280 268 308 308 +10%
pop_dipfit_headmodel (epoched) 280 268 308 308 +10%
pop_dipfit_loreta (continuous) 250 277 277 277 +11%
pop_dipfit_loreta (epoched) 250 277 277 277 +11%
pop_dipfit_nonlinear (continuous) 330 301 363 363 +10%
pop_dipfit_nonlinear (epoched) 330 301 363 363 +10%
pop_dipfit_settings (continuous) 404 390 444 444 +10%
pop_dipfit_settings (epoched) 404 390 444 444 +10%
pop_dipplot (continuous) 410 433 451 451 +10%
pop_dipplot (epoched) 410 433 451 451 +10%
pop_leadfield (continuous) 230 235 253 253 +10%
pop_leadfield (epoched) 230 235 253 253 +10%
pop_multifit (continuous) 300 268 330 330 +10%
pop_multifit (epoched) 300 268 330 330 +10%
pop_eegfiltnew (continuous) 511 433 562 562 +10%
pop_eegfiltnew (epoched) 511 433 562 562 +10%
pop_firpmord 176 136 194 194 +10%
pop_firwsord 232 202 255 255 +10%
pop_kaiserbeta 144 103 158 158 +10%
pop_xfirws 506 357 557 557 +10%

The Word and PDF reports below still show the first version of this pull request and are not refreshed yet.

Editable Word report · PDF report

Cause and change

The renderer mixed native control size hints with hardcoded dialog heights, viewport sizes, and spacers. It now scales the shared platform row measurement by 1.1 before applying geomvert. Scrollable forms grow to their content up to the available screen height with their footer accessible. Two missing blank rows were restored from the MATLAB definitions.

Verification

167 GUI and affected-function tests passed, with one MATLAB-dependent test skipped, 33 deselected and 112 subtests passing. A separate complete dialog/main-window run passed 147 tests. Ruff, ty and pre-commit passed. All 40 corresponding MATLAB windows and both EEGPrep revisions were captured on jamming under Xvfb. The combined #821 renderer passed 18 checks. The test integration with #835 passed 13 checks. The shared minimum and native-font pitch measurements are independent. Comparing the two equivalent row formulas across 200,000 control-height and spacing combinations produced identical pixels. A fresh virtual integration of #835 selected both final source and test files automatically.

What changed since the first version

The first version let the rows alone set the height, which made 77 of 128 windows shorter than on develop. Now a height preset by a specification, scaled by the same 1.1 as the rows, is a floor, and the rows share the spare height as they did on develop. Rule 26 still holds for a specification without a height: its rows set it. A window taller than the screen moves its rows into a scroll area in place (the widgets and their connected callbacks are kept) and is capped at the available height. The text editor sizing of pop_comments is unchanged from the first version.

Fixes #810
Part of #745

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

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 1m 47s —— View job


Code review

  • Overall assessment: The renderer change does what the PR says. Row pitch is now round(1.1 × max(28, line + gap)), push buttons are 22 px tall, scrollable forms and QTextEdit editors size to their content up to the screen height, and the dialogs with a fixed size height no longer use their own path. I found no correctness bugs. One API problem remains: DialogSpec.size's height is still documented and passed but never read.
  • Highest-risk area: _apply_spec_size in src/eegprep/functions/guifunc/qt.py:1008-1028. It now sets the height of every dialog, and nothing reads the spec height anymore.
  • Merge recommendation: Needs changes (small).

Blocking

None.

Important

  • The height in DialogSpec.size does nothing now (qt.py:1009, spec.py:69-70). spec.size is read only at qt.py:1009, and only [0]. The field comment still says "(width, height); a height of None keeps the height the content needs", and about 98 size=(w, h) call sites pass a height that has no effect. Someone who sets a height later will get no error and no change. AGENTS.md says "Replace old APIs and update all call sites" and to remove values the change made unused. Fix: make the field width-only (width: int | None) and update the call sites. At minimum, fix the comment and open a follow-up issue. (Inline comment posted.)

Nits

  • tests/test_guifunc_primitives.py:316 hardcodes round(1.1 * row). The test already imports from theme, so using EEGLAB_ROW_SCALE would stop it drifting if the factor changes.
  • tests/test_guifunc_primitives.py:19: the new pop_comments import sits after the tests.* imports. Moving it into the eegprep.* group would match the rest of the file.

Test gaps

None. The three new tests check the claimed behaviour through widget geometry, not private state:

  • button height and vertical centring
  • row pitch inside scroll areas and the footer staying visible
  • the multiline editor growing to its content and on resize

EEGLAB parity notes

  • The 1.1 row scale is an intentional EEGPrep change from supergui's row height. It is documented in theme.py, covered by test_window_without_a_height_is_as_high_as_its_rows, and described in the docs.

  • I could not check the two restored blank rows against EEGLAB:

    • the (1,) row before "Plot 2-D" in pop_chanedit.py
    • the (1,) row before "Rename field" in pop_editeventfield.py

    The vendored src/eegprep/eeglab/ checkout is empty in this CI clone. Please confirm them against pop_chanedit.m and pop_editeventfield.m (the geometry cell arrays) if the visual parity captures don't already show it.

  • No numerical code changed, so the MATLAB reference-suite run isn't needed.

I checked correctness of the renderer refactor (removed _rows_share_height/_spacer_row_height/the None row-height path, plus imports), scrollable and editor sizing, the size policy on rows that expand vertically, call sites of the changed helpers, the docs update, and compliance with CLAUDE.md/AGENTS.md.

if spec.size is None:
return
width, height = spec.size
width = spec.size[0] if spec.size else dialog.width()

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.

Important (stale API): After this change, _apply_spec_size reads only spec.size[0]. Nothing in the repo reads the height half of DialogSpec.size anymore: spec.size is used only here. But DialogSpec.size still says "(width, height); a height of None keeps the height the content needs" (spec.py#L68-L71), and about 98 size=(w, h) call sites still pass a height that now does nothing.

This matters because the next person who sets size=(400, 600) to make a dialog taller will see no effect and get no error. AGENTS.md says "No backward compatibility by default. Replace old APIs and update all call sites" and "Remove … variables … that your change made unused."

Suggested fix: replace the field with a width-only one, width: int | None = None, and update the call sites. If that is too much for this PR, at least change the DialogSpec.size comment to say the height is ignored and the content sets it, and open a follow-up to remove the field.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

Review (Claude Fable): needs more work

  • The shared fix itself is sound. The change is in guifunc/qt.py and theme.py, not per window. Rows go from 31 to 34 px, buttons from 20 to 22 px and stay centred, and the two restored blank rows match EEGLAB. The touched tests pass (13 here, 18 with [GUI] Align edit fields across rows using the shared dialog geometry #846 and [GUI] Measure the dialog row height as the layout sizes an edit box #835 merged in).
  • One window no longer fits the screen. pop_rejmenu goes from 994 to 1182 px and its smallest possible height goes from 806 to 1182 px, so on a 1080 px display or a MacBook its bottom buttons are out of reach.
  • Most windows get shorter, and the pull request does not show them. I rendered all 128 dialog specifications before and after: 77 are shorter (26 by more than 20%), 51 are taller, median change is 5.1% shorter. The "+6.45%" of the summary holds for the 40 File and Edit windows only. The Tools and Plot windows are not captured.
  • One point is for Arno: the comments editor now opens at the height of its text, where EEGLAB opens a large box (the fourth capture shows it).
Details

What I checked

Heights before and after, 128 dialog specifications

Fusion (jamming) Mac style
Median change 5.1% shorter 6.2% shorter
Shorter 77 79
Shorter by more than 20% 26 26
Taller 51 49
Specifications without size (15) median +7.5% median +7.6%
Specifications with size (113) median 8.4% shorter median 8.4% shorter

Largest moves (Fusion, height in px): pop_selectcomps 266 → 169, pop_prop 199 → 136, pop_iclabel 199 → 136, pop_viewprops 288 → 202, pop_xfirws 506 → 357, pop_topoplot 404 → 310, pop_spectopo 299 → 235, pop_comments 840 → 335, pop_reref 281 → 367, pop_export 303 → 367, pop_editset 389 → 465, pop_rejmenu 994 → 1182, pop_taskinfo 432 → 776.

The direction agrees with rule 26 (the rows set the height, one row height per platform). The gap is in what is shown. Issue #810 asks for every dialog about 10% taller. After this change a user sees the Tools and Plot windows shrink, some by a third, and the body only reports the File and Edit menus. Rules 15 and 26 ask for captures of every window that a shared change moves.

Blocking

  1. pop_rejmenu (34 rows, no scroll area). Before: 994 px, layout minimum 806 px. After: 1182 px, layout minimum 1182 px, because every row is now a fixed height. The cap at the screen height in _apply_spec_size only applies to scrollable windows and to windows with a text editor. Suggested fix in the shared code: apply the same cap to every window and let it scroll, or make this specification scrollable. A test that builds the tallest specification and checks it against the available height would lock it.
  2. Captures and numbers for the windows outside File and Edit. Add EEGLAB, before and after for the windows that move most (list above), give the table for all specifications, and correct the summary line so that it says most windows with a preset height get shorter.

Important

  1. The height in DialogSpec.size is now dead. spec.size is read once, for the width only (qt.py line 1009), while 78 specifications still pass a pixel height and the field comment in spec.py line 69 still says that a height of None keeps the content height. Smallest fix here: correct that comment. Removing the 78 heights belongs in a follow-up under supergui (the shared dialog code): graphical parity with EEGLAB #745, since it would touch files that [GUI] Align edit fields across rows using the shared dialog geometry #846 and others also change.
  2. Scope (rule 21). The pull request holds five changes: the 1.1 row scale, the button height, the removal of every preset height, the sizing of scrollable forms, and the sizing of text editors. The first three belong together, since a preset height would otherwise hide the 10%. The text editor sizing is a separate behaviour and is the one that moves away from EEGLAB. I would take it out, or give pop_comments a fixed number of rows through geomvert, as EEGLAB gives its edit box a fixed share of the figure.

For Arno

Other open pull requests

CI

Pre-commit and the documentation build pass. "Base install without optional extras" fails on tests/test_package_help.py::test_every_public_optional_path_carries_its_marker. The same job fails on #849 and #856, which do not touch the interface, so it does not come from this pull request. "Ruff and ty" and "EEGLAB Python backend" were still queued when I looked.

Nits

  • tests/test_guifunc_primitives.py: the expected pitch difference 11 and the 22 are written by hand. Deriving them from EEGLAB_ROW_SCALE would keep the test true if the factor changes.
  • EEGLAB_ROW_HEIGHT = dict.fromkeys(...) hides that the three platforms share one number. The plain dictionary with 28 and the scale applied in _row_height reads more simply and gives the same pixels.

— orchestrator review

A window whose rows need more than the screen scrolls them, so its buttons stay in reach (pop_rejmenu). A height preset by a specification, scaled as the rows are, stays a floor shared by the rows, so no dialog opens shorter than on develop. Text editor windows are unchanged.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@arnodelorme

Copy link
Copy Markdown
Collaborator Author

"One point is for Arno: the comments editor now opens at the height of its text, where EEGLAB opens a large box (the fourth capture shows it).
" This is ok.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

Code review

Independent review by Codex (OpenAI, model gpt-6.1-terra), run read-only on commit ca11e138. The change was written by Claude Fable, so this is a second opinion from another vendor. Its text is below, unchanged except for local file paths.

What was done with its findings (commit f32e0b0f):

  • Blocking, fixed. A window taller than the screen was built a second time inside a scroll area, after the callbacks of the first build were connected. Now the rows of the one window are moved into a scroll area in place, so the widgets and their callbacks are kept. The pop_rejmenu test checks that the widgets returned are the ones on screen. The 38 tests of the two touched files pass. In the wider GUI, dialog and study run, 960 pass and 32 fail, and the same 32 fail on the commit before (they need the ICLabel runtime, which this Mac environment does not have).
  • Left, the comments editor opens shorter than on develop. Arno accepted this behaviour in his comment above ("This is ok"), so the editor keeps the height of its text.
  • Left, a window is capped when the screen is smaller than its former height. This is the point of the change: a window never opens taller than the screen shows.
  • Left, open for the next pass: the scroll decision is taken before the preset height floor, and a blank row with geomvert gets a fixed height. Neither changes a window measured here: of the 127 dialog variants, 126 are taller than on develop (median +10.0%) and only the comments editor is shorter. Both are worth a second look before the merge.
  • Left, the extra tests it asks for (a real screen and window position on both platforms, a stateful callback case). The test passes the available height in (1040 and 900 pixels), which is what the two screens give.

— orchestrator


Blocking

The scroll rebuild can break dialog state. In qt.py:300, callbacks are connected before the first dialog is discarded. replace() reuses their mutable parameters. For example, _bind_studydesign sets _bound and initializes the first set of widgets. The rebuilt dialog then skips that initialization and connection. Build the widgets once, or defer callback binding until the final layout is chosen.

Important

Some dialogs still open shorter than on develop. qt.py:1062 excludes every dialog containing a text editor from the preset height floor. pop_comments requests 840 pixels, but short comments now open at the smaller content height. Any dialog is also capped below its former height when the available screen height is smaller. Preserve the preset for editors when it fits, while allowing the screen limit to take precedence.

The scroll decision precedes the preset height. At qt.py:1060, content can fit while the scaled preset does not. The subsequent resize is capped without rebuilding, so rows can be compressed rather than scrolled. Decide after applying the floor.

Blank weighted rows lose their share. At qt.py:283, a blank row with geomvert becomes fixed spacing. It cannot receive its weighted share of extra height, unlike the other rows. Keep blank rows in the stretch layout so their relative height follows geomvert.

Nits

None.

Test gaps

The tests do not establish the claimed height floor or rebuild safety. test_guifunc_primitives.py:181 covers only ordinary edit rows and compares against the new renderer. Add editor, blank weighted row, and stateful callback cases, including a forced rebuild.

Screen reachability remains unverified. test_gui_rejection_dialogs.py:35 simulates two content heights and checks buttons inside the dialog, not the window’s actual screen position or frame. The scroll layout is intended to keep the footer reachable, but this code review cannot establish that it fits either physical display. Test actual available geometry and window placement on both platforms.

The vendored supergui.m was absent, so I could not verify the EEGLAB comparison directly. GitHub was also unreachable, so the remote PR head could not be confirmed. No code was run or files modified.

@arnodelorme

Copy link
Copy Markdown
Collaborator Author

Code review

This is an independent review by Gemini (Google, model Gemini 4 Carbon, medium effort, through agy) of pull request 851 at commit c0dfab4, which is the branch brought up to date with develop. The orchestrator itself runs on Claude Opus 5.5. Gemini read the whole diff against develop and did not run the tests. Arno accepted on November 28 that the comments editor opens at the height of its text ("This is ok"), so that point was not reviewed again.

On the two points Codex left open. Gemini agrees with neither as a defect that needs a fix. Taking the scroll decision before the preset height floor is correct: when the rows fit the screen, capping the window at the screen height leaves every row and button visible, and a scroll area would be empty. A blank row with geomvert keeps fixed spacing, which develop did too. It only matters when a window is taller than its rows need, and then the extra height goes to the other rows.

One finding Gemini marked blocking, not confirmed. Gemini thought the comments editor measures its text at the width of a hidden widget (about 100 pixels), so a long paragraph would open the window far too tall. I checked this by building the real pop_comments window, natively on the Mac and offscreen. One paragraph of 330 characters opens at 372 pixels, the same height as a one-word note. Six long wrapped paragraphs (1,986 characters) give an editor of exactly the text's height at its real width of 1,054 pixels. So the text is measured at the editor's real width, and the window does not grow too tall. The check found one small, harmless difference: 60 short lines come out 38 pixels shorter than the text, so the editor shows a scroll bar. I left that as it is.

Fixed in this round. The comment on DialogSpec.size in spec.py now says that a window with a text editor ignores its preset height and opens at the height of its text, which is what qt._apply_spec_size reads (commit feba6bc).

Findings left as they are, none blocking.

  • When a window with no preset width gets a scroll area, the vertical scroll bar can take about 16 pixels from its widest row on Linux and Windows. Of the windows measured, only pop_rejmenu and pop_chanedit scroll on a short screen, and both have a preset width.
  • The scroll rebuild assumes the buttons are the last item of the layout, which _add_buttons always does today.
  • The test of the button pitch expects a difference of exactly 11 pixels, which could round to 10 or 12 with another system font.
  • A dialog with a text editor that is taller than the screen is not given a scroll area. No such dialog exists today.

Settled points of the earlier review. pop_rejmenu needs 1182 pixels and now opens at 1040 pixels on a 1080p screen and at 900 on a MacBook, with its rows in a scroll area and its buttons visible (test_rejmenu_fits_the_screen_with_its_buttons_in_reach). Of the 127 dialog variants measured, none opens shorter than on develop, except the comments editor that Arno accepted.

Tests on this Mac. 38 passed on the dialog and rejection files. On the wider GUI, dialog, study and rejection set, the 32 failures all come from this Mac's environment (onnxruntime missing for ICLabel, and three tests that fail the same way on develop). Ruff and pre-commit.py --all pass.

— orchestrator

arnodelorme and others added 2 commits November 29, 2026 00:37
A scroll area does not pass the minimum width of its rows on to the
window, so on Windows the rows of pop_rejmenu were cut by 353 pixels
(CI of c0dfab4). The scroll area now keeps that width plus room for
the vertical scroll bar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Gemini review of cf8dca3: the minimum width of a scroll area that
starts to scroll now also counts the scroll bar spacing, the frame and
the margins, and never exceeds the screen width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@arnodelorme

Copy link
Copy Markdown
Collaborator Author

Code review

This is a follow-up to the review above. The Windows test job on commit c0dfab4 failed in test_rejmenu_fits_the_screen_with_its_buttons_in_reach. When pop_rejmenu moved its rows into a scroll area on a short screen, the rows were 353 pixels wider than the visible part, so the right side of the window was cut off on Windows. The cause is that a scroll area does not pass the minimum width of its rows on to the window. Commit cf8dca3 gives the scroll area that minimum width plus the scroll bar. The test now also builds the window with a preset width narrower than its rows, which fails on the Mac without the fix.

Gemini (Google, model Gemini 4 Carbon, medium effort, through agy) reviewed that commit on its own. Its blocking finding was that the width did not count the scroll area's frame, its margins and the spacing beside the scroll bar, which some Linux styles use. Commit b4bf597 adds them and caps the width at the screen width, which was its second finding. The test passes under the Mac's native style, the Fusion style and the Windows style. Gemini's other points are not blocking and were left as they are. Windows that are scrollable from the start (preferences) do not use this path and are unchanged. Windows with no preset width can still lose a few pixels to the scroll bar. And the Mac's overlay scroll bars hide such problems from a local run, so CI on Windows and Linux remains the check that counts.

— orchestrator

arnodelorme and others added 3 commits November 29, 2026 01:32
On the Windows CI screen the rows of pop_rejmenu are wider than the
screen, so no width fits them. A dialog that starts to scroll now
lets wide rows scroll sideways and keeps the window within the screen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The screen cap of b4bf597 and 1abde57 narrowed pop_study to the
800 pixel offscreen screen of CI and cut its labels. A dialog that
starts to scroll now keeps the full minimum width of its rows, as a
dialog that does not scroll does on develop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@arnodelorme
arnodelorme merged commit 8edbd34 into develop Nov 29, 2026
12 checks passed
@arnodelorme

Copy link
Copy Markdown
Collaborator Author

The orchestrator merged this pull request into develop at Arno's request (his email of November 28, 2026: "Implement the fix and check with another AI. If all is good, merge and indicate that you did merge."). He had answered the one open question on the pull request, the comments editor that opens at the height of its text, with "This is ok", so no change was needed for it.

It was good to merge for these reasons. Every CI check of the last head, 20df83c, finished and passed, on Linux, the Mac and Windows, including the Pyodide job. The branch was brought up to date with develop before that run. The independent review by Gemini 4 Carbon found nothing blocking that was still open. Its blocking finding on the comments editor did not reproduce when the real window was measured, and its blocking finding on the scroll area's width is fixed. CI also found a real defect: on the Windows test screen the rows of Reject data epochs were cut by 353 pixels once they scrolled. That is fixed too, because a dialog that starts to scroll now keeps the full width of its rows. Reject data epochs (pop_rejmenu) needs 1182 pixels and opens at 1040 pixels on a 1080p screen and at 900 on a MacBook, with its buttons visible. None of the 127 dialog variants measured opens shorter than on develop, except the comments editor that Arno accepted.

— orchestrator

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.

Dialogs: about 10% taller, with slightly taller push buttons kept aligned

1 participant