Skip to content

feat(macos): make close-to-tray behavior configurable #4024

Description

@sbscan

Motivation

On macOS, closing Buzz's main window leaves the process and local agents running but hides the only main window. This is useful for background agent work, but it is currently unconditional and has no user-facing preference.

A user who uses BetterTouchTool's application/window switcher with Exclude Hidden and Minimized Windows enabled sees Buzz disappear from the switcher even though Buzz is still running. This makes Buzz feel "windowless": it remains active in the menu bar/process list, but it cannot be returned through the user's normal app-switching workflow.

BetterTouchTool exposes this exclusion as a global switcher option; its documented configuration does not provide a per-app override that can re-include one hidden app.

Current behavior

The macOS close handler in desktop/src-tauri/src/lib.rs unconditionally:

  1. calls api.prevent_close();
  2. calls window.hide().

The tray menu's Open Buzz path restores the main window with unminimize(), show(), and set_focus() in desktop/src-tauri/src/tray_menu.rs.

I searched the current settings/source and found no preference that changes this close-to-tray behavior.

Proposed behavior

Add a macOS preference for what happens when the main window is closed:

  • Keep Buzz running in the menu bar — current behavior and recommended default, preserving active agent work.
  • Quit Buzz when the last main window closes — for users who prefer conventional visible-window app switching and do not want a windowless background process.

If quitting would stop active agent sessions or a huddle, Buzz should warn or require confirmation before exiting.

At minimum, the UI should explain that closing the main window hides Buzz to the menu bar and that Open Buzz restores it.

Reproduction

  1. On macOS, open Buzz.
  2. Close the main window with the red close button.
  3. Confirm Buzz remains running and its menu-bar item remains available.
  4. Open BetterTouchTool's switcher with Exclude Hidden and Minimized Windows enabled.
  5. Buzz is absent because its main window is hidden.
  6. Use the Buzz menu-bar item → Open Buzz; the main window returns.

Related

Environment

  • Buzz Desktop for macOS
  • BetterTouchTool Window Switcher with Exclude Hidden and Minimized Windows enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions