Skip to content

[Bug] Cmd+W quits the app instead of closing the window #96

@Astro-Han

Description

@Astro-Han

What happened?

On macOS, pressing Cmd+W in the main PawWork window closes the entire PawWork app process instead of only closing the window and keeping the app available in the Dock/menu bar.

I reproduced this with the installed /Applications/PawWork.app version 0.2.4 by launching it with an isolated temporary HOME in CI smoke mode, waiting for readiness, activating PawWork, and sending Cmd+W via System Events. After Cmd+W, the PawWork process exited.

Static code review points to the Electron main-process lifecycle: the File menu uses Electron role "close", which closes the current BrowserWindow, but the main process does not subscribe to window-all-closed or activate. Electron defaults to quitting the app when all windows are closed if window-all-closed is not handled.

Steps to reproduce

  1. Open PawWork on macOS.
  2. Focus the main PawWork window.
  3. Press Cmd+W.
  4. Observe that PawWork exits instead of only closing the window.

What did you expect to happen?

Cmd+W should close the current window while keeping PawWork running, consistent with common macOS app behavior. If the user activates PawWork again from the Dock/menu bar while no window is open, PawWork should recreate or show a main window.

PawWork version

v0.2.4

OS version

macOS 26.3.1

Can you reproduce it again?

Yes, every time

Screenshots, recordings, or extra context

Relevant code paths: packages/desktop-electron/src/main/menu.ts defines File > Close with Electron role "close"; packages/desktop-electron/src/main/index.ts creates mainWindow but currently has no window-all-closed or activate lifecycle handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritybugSomething isn't workingplatformElectron shell, OS integration, packaging, updater, signing, paths, and permissions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions