Skip to content

feat: macOS menu-bar app that runs the recorder without Docker - #1

Merged
bilipp merged 2 commits into
mainfrom
feat/macos-menu-bar-app
Oct 27, 2026
Merged

bilipp merged 2 commits into
mainfrom
feat/macos-menu-bar-app

Conversation

@bilipp

@bilipp bilipp commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

A menu-bar app for people who don't want Docker. It runs RecorderCore in-process. Docker and the CLI are unchanged.

 Package.swift            # server (Linux + macOS), untouched
 Kit/
+MacApp/                  # separate package, macOS only
+├── Sources/LumeRecorderApp/
+│   ├── ServerController.swift   # ServiceGroup, polling, sleep assertion, login item
+│   ├── MenuContent.swift        # status, pairing code, recordings, devices
+│   ├── AppLog.swift             # ~/Library/Logs/LumeRecorder/lume-recorder.log
+│   └── SleepAssertion.swift
+├── Resources/Info.plist         # LSUIElement, NSBonjourServices
+└── scripts/build-app.sh         # universal .app + zip (opt. ffmpeg, Developer ID, notarization)

The only change in the core: run is split so the app can own the lifecycle.

 RecorderServer.run(config:logger:)
-  build launcher + services, log banner
+  makeServices(config:logger:)        # new, public
   scheduler.recover()
   makeApplication(services:).runService()

App lifecycle:

launch
  makeServices (detached; ffmpeg detection spawns processes)
  scheduler.recover()
  ServiceGroup([app], signals: SIGTERM/SIGINT).run()
  every 2 s: active / scheduled / devices / pairing code
    active or scheduled > 0 → hold PreventUserIdleSystemSleep
quit / logout
  applicationShouldTerminate → .terminateLater
    triggerGracefulShutdown → ffmpeg stopped, rows resume next start

Defaults: data in ~/Library/Application Support/LumeRecorder. ffmpeg comes from the bundle, then /opt/homebrew/bin, then /usr/local/bin. A GUI app's PATH lacks Homebrew. Env vars still win. Open at Login turns itself on at the first launch from a .app.

Evidence

  • Before: you needed Docker or swift run lume-recorder in a terminal.
    After: MacApp/scripts/build-app.sh produces LumeRecorder.app (x86_64 + arm64, ad-hoc signed, codesign --verify --strict passes).
  • Smoke test of the app binary (DATA_DIR=<tmp> PORT=18090 BONJOUR=0):
    GET /api/v1/info → {"apiVersion":1,"name":"MacBookPro","version":"0.2.0",...}
    Using ffmpeg at /opt/homebrew/bin/ffmpeg
    kill -TERM → server shuts down gracefully, process exits
    
  • swift test: 62 tests in 9 suites pass, including real ffmpeg.
  • CI macOS app (macos-26) passes, building the ad-hoc PR variant.
  • Not verified: clicking through the menu window, login-item registration from the bundle, and the signed or notarized CI path. It runs only on pushes to main and on v* tags, once the secrets exist.

Merge Danger

Door: two-way

Additive. The new package sits next to the server, and the core change is a pure extract-function refactor.

Blast Radius: CI

Signing (CI)

On pushes, the macOS app job imports a Developer ID certificate into a temporary keychain and signs. On v* tags it also notarizes with an App Store Connect API key, staples, checks the result with spctl, and attaches the zip to the GitHub release. A tag without the secrets fails rather than shipping an unsigned build. Required secrets (setup steps in the README): MACOS_CERTIFICATE_P12_BASE64, MACOS_CERTIFICATE_PASSWORD, NOTARY_KEY_P8_BASE64, NOTARY_KEY_ID, NOTARY_ISSUER_ID.

Once this is merged, pushes to main show the signed path working (or failing). The next release tag needs all five secrets.

@bilipp
bilipp merged commit b4f8abd into main Oct 27, 2026
6 checks passed
@bilipp
bilipp deleted the feat/macos-menu-bar-app branch October 27, 2026 09:02
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.

1 participant