macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reached

Open Beginner friendly
#1,667 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
electron, typescript
Domain
desktop-dev

Research direction

Start in electron/messageBox.ts at showSaveDialogOver (L44-56) and read its comment about #743 to see how an owner window turns the panel into a sheet, then compare with exportDiagnosticFile in electron/ipc/handlers.ts (L1990-1994), which calls dialog.showSaveDialog with no owner. Trace how the menu and tray entry points reach that handler so the focused window can be passed through as owner. Done when the diagnostics panel is attached to the editor window and stays in front after Cmd+Tab; verifying needs a macOS build.

Written by the indexing model from the issue text.

Description

bug

On macOS, the save panel opened by Save Diagnostics ends up under the editor window after an app switch. It can then be neither seen nor clicked.

Steps

  1. In the editor, wordmark menu → Save Diagnostics. The "Save Diagnostic File" panel opens in front.
  2. Bring another app to the front (Safari here), then come back with Cmd+Tab.

Expected: the panel stays in front of the editor, or is attached to it as a sheet.

Actual

  • The editor comes back above the panel. The window list holds the panel under the editor, invisible and out of the mouse's reach.
  • Return does nothing, since the panel is not key. The Window menu offers only Minimize, Zoom and Bring All to Front.
  • The save could only be finished through accessibility (AXPress on its Save button). The bundle was then written correctly.

Seen on 2.4.0-rc.1 (DMG), macOS 27.0.1, Mac mini M1.

Why

exportDiagnosticFile calls dialog.showSaveDialog with no owner window (handlers.ts#L1990-L1994). The other save panels go through showSaveDialogOver (messageBox.ts#L44-L56). Its comment describes exactly this trap (#743): unowned, a macOS save panel is a free-floating window that a click sends behind the editor; owned, it is a sheet on that window.

Fix direction

Open the diagnostics panel with showSaveDialogOver, owned by the window the request came from. The menu and tray entry points can pass the focused window.

Dominant language
TypeScript
Stars
3.7k
Forks
231
Avg merge
1d 8h
Merged PRs (30d)
150

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getopenscreen/openscreen

All issues in getopenscreen/openscreen

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.