Skip to content

feat: add macOS system tray (menu bar) support - #7

Open
anlvdt wants to merge 1 commit into
Pimpmuckl:mainfrom
anlvdt:feat/macos-tray-support
Open

feat: add macOS system tray (menu bar) support#7
anlvdt wants to merge 1 commit into
Pimpmuckl:mainfrom
anlvdt:feat/macos-tray-support

Conversation

@anlvdt

@anlvdt anlvdt commented Jun 13, 2026

Copy link
Copy Markdown

Summary

Extends the existing Windows-only tray icon support to macOS, enabling the Send to Tray workflow on macOS systems. Users can now switch Codex accounts directly from the macOS menu bar.

Changes

  • Add tray-icon, winit, and image dependencies for target_os = "macos" in Cargo.toml
  • Widen cfg gates from #[cfg(windows)] to #[cfg(any(windows, target_os = "macos"))] for:
    • tray module (lib.rs)
    • SendToTray action and exit variant (app.rs, app/tui.rs)
    • Interactive app tray loop (cli.rs)
    • Auto-start usage window helpers (app/auto_start.rs)
  • Keep Windows-specific console FreeConsole/AllocConsole functions gated to Windows only
  • Add macOS icon candidate paths (Codex.app bundle locations)

Testing

  • cargo build --release — clean build, zero warnings
  • cargo test — all 91 tests pass
  • Tested on macOS (Apple Silicon, macOS 15)

Motivation

The tray icon is a very useful feature for account switching — currently only available on Windows. This PR brings the same experience to macOS users.

Extend the existing Windows-only tray icon support to macOS, enabling
the 'Send to Tray' workflow on macOS systems.

Changes:
- Add tray-icon, winit, and image dependencies for macOS target
- Widen cfg gates from #[cfg(windows)] to #[cfg(any(windows, target_os = "macos"))]
  for tray module, SendToTray action, and auto-start usage window helpers
- Keep Windows-specific console show/hide functions gated to Windows only
- Add macOS icon candidate paths (Codex.app bundle locations)
- All 91 existing tests pass with no warnings
@Pimpmuckl

Copy link
Copy Markdown
Owner

Thanks for the PR, I assume this is superseded by #8 ?

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