Skip to content

Stabilize hidden-GUI equal-axis fitting on macOS#44

Closed
Pluze with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-hidden-gui-macos-job
Closed

Stabilize hidden-GUI equal-axis fitting on macOS#44
Pluze with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-hidden-gui-macos-job

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown

Hidden GUI / macOS was failing in GuiLayoutEisTest/eis_file_button_loads_selected_dta because equal-axis fitting occasionally used invalid/unstable UI axes pixel bounds, producing non-equal X/Y data-unit scaling. This PR hardens equalization geometry resolution to remove that transient failure mode.

  • Root cause

    • Equal-data-unit fitting depended on a single getpixelposition(ax, true) read after drawnow.
    • In hidden macOS GUI runs, that read can transiently return unusable bounds, so equalization math is skipped or computed from unstable dimensions.
  • Change

    • Updated +labkit/+app/+plot/private/finitePlotLimits.m to resolve axes pixel bounds via a dedicated helper before equalization:
      • retry pixel-position lookup across a few UI flush cycles;
      • fall back to ax.Position when pixel bounds are not yet usable.
    • Equal-axis span normalization now consumes this resolved geometry path.
  • Behavioral impact

    • Keeps existing equal-data-units algorithm and API contract unchanged.
    • Reduces hidden-GUI platform timing sensitivity (notably macOS) in the EqualDataUnits=true path.
function position = resolveAxesPixelPosition(ax)
    for attempt = 1:3
        drawnow
        position = getpixelposition(ax, true);
        if numel(position) == 4 && position(3) > 0 && position(4) > 0
            return;
        end
    end
    fallback = ax.Position;
    if numel(fallback) == 4 && fallback(3) > 0 && fallback(4) > 0
        position = double(fallback);
    end
end

Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'Hidden GUI / macOS' Stabilize hidden-GUI equal-axis fitting on macOS Jul 21, 2026
Copilot finished work on behalf of Pluze July 21, 2026 19:03
Copilot AI requested a review from Pluze July 21, 2026 19:03
@Pluze Pluze closed this Jul 21, 2026
@Pluze
Pluze deleted the copilot/fix-hidden-gui-macos-job branch July 21, 2026 19:14
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.

2 participants