Skip to content

feat(macos): add an optional menu bar frontend - #142

Closed
aRustyDev wants to merge 12 commits into
talwat:mainfrom
aRustyDev:stack/3/macos-menubar
Closed

aRustyDev wants to merge 12 commits into
talwat:mainfrom
aRustyDev:stack/3/macos-menubar

Conversation

@aRustyDev

@aRustyDev aRustyDev commented Oct 30, 2026 •

Copy link
Copy Markdown

TL;DR

Control the same Lowfi session from a macOS menu bar icon, with track status, Play/Pause, Next, and Quit. The frontend is optional and can run alongside the terminal or on its own.

Important

#blocked-by #140 (which is blocked by #139 and #138)

Please wait for #138, #139, and #140 to merge before reviewing this PR. The Files changed tab includes their configuration, testing, and core-refactor work because this PR targets main. After they merge, I’ll rebase this branch so the diff contains only the menu bar frontend.

Incremental menu bar diff for reference.

Changes

  • Add the macOS-only menubar frontend and optional native dependencies, enabled with cargo run --features menubar.
  • Add [interfaces].mode: terminal, terminal-and-menubar, or menubar; also configurable through LOWFI_INTERFACES__MODE. A macOS build with the feature defaults to both interfaces; other builds default to terminal.
  • Feed immutable playback snapshots to the menu and send actions through the existing application command channel.
  • Add a bundled monochrome SVG/template icon, icon tests, interface/snapshot tests, documentation, and macOS feature checks in CI.
  • Keep terminal initialization and cleanup with the playback worker; close the native loop when the worker stops.
  • Document main-thread ownership and cleanup. Snapshots carry the latest state and may coalesce; position is sampled when published rather than continuously ticking.

Why this approach

Terminal controls require returning to the terminal. A small native menu makes the common actions available while using another app, while leaving the terminal layout intact.

AppKit stays on the main thread and playback runs on a worker, matching the native event-loop requirements. Reusing the core boundary avoids a second playback implementation. A separate daemon or full desktop window would add lifecycle and interface complexity beyond these controls. The feature gate keeps the native dependencies optional. Menu-only mode stays in the foreground and skips terminal setup/input.

Validation

Default and no-default suites, macOS feature-enabled tests, curated feature checks, and mutation inventories passed. Icon tests rasterize the asset at multiple menu sizes. Private-item documentation passes with broken rustdoc links denied. Live AppKit interaction and audio-device playback were not exercised; macOS Now Playing integration is not implemented here.

@aRustyDev aRustyDev changed the title Add an optional macOS menu bar frontend feat(macos): add an optional menu bar frontend Oct 30, 2026
@aRustyDev
aRustyDev force-pushed the stack/3/macos-menubar branch from 47c0b10 to 15d74f6 Compare October 30, 2026 03:33
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