Skip to content

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

Open

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

Activity

  1. sonpiaz commented on Aug 12, 2026

    @sonpiaz

    Adjacent request from the same area, on 0.4.26 / macOS — the menu-bar half already works, the Dock half is what's missing.

    Today, closing the main window (⌘W / red button) leaves the app running and the menu-bar item is there and functional (Running / Recent / New Channel / Open Buzz / Quit Buzz). But the Dock icon stays, so a "closed" Buzz still occupies a Dock slot and still shows in the app switcher — which is the opposite of what a background/menu-bar app usually does.

    Requested behaviour:

    • On window close → hide the window and switch to NSApplicationActivationPolicyAccessory, so the Dock icon disappears while the menu-bar item and all running agents stay alive.
    • On Open Buzz (or reopen from the menu-bar item) → switch back to Regular and show the window.
    • Full quit stays where it already is: Quit Buzz in the menu-bar item.

    This is the same "make it configurable" axis as the original report: some users want Buzz to remain in the Dock/switcher (this issue's BetterTouchTool case), others want it out of the Dock entirely once closed. A single preference — keep in Dock when closed: yes/no — covers both, since the underlying switch is just the activation policy.

    Note it should not be LSUIElement in Info.plist: that would make Buzz menu-bar-only permanently, including at launch. The runtime Accessory ↔ Regular toggle is what preserves the normal first-launch experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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