Skip to content

fix(macos-app): remember Allow LAN access, and let it be set without the menu bar - #192

Merged
jonocodes merged 1 commit into
mainfrom
feat/macos-app-remember-lan
Nov 18, 2026
Merged

jonocodes merged 1 commit into
mainfrom
feat/macos-app-remember-lan

Conversation

@jonocodes

Copy link
Copy Markdown
Owner

On my Mac the deckd.app menu-bar icon never showed up, which left no way to turn on Allow LAN access, so http://<host>:8765 wasn't reachable from other devices. Even when the menu works, the app forgets the choice on every launch, so you'd have to turn it on again after each reboot.

Now the choice is remembered across launches and upgrades, and you can set it without the menu bar:

defaults write com.deckd.daemon AllowLAN -bool true
osascript -e 'quit app id "com.deckd.daemon"'; open -a deckd

Opening deckd.app while it's already running now opens the surface in the browser, so the app is still reachable with no icon.

  • LanAccess in deckd/macos_app.py wraps the user default, so it's unit-tested on Linux. menubar.py reads it at launch, sets the ✓ from it, and saves on toggle.
  • test-app.sh clears the saved choice before the "refused by default" check, then checks that it's saved and survives a quit and relaunch.

Verification: pytest passes (777 passed, 103 skipped). I built the app locally with just build-macos-app and set only the defaults write above. On launch it listened on *:8765, the LAN hostname returned 200, and the menu showed ✓. I didn't run test-app.sh locally because it replaces /Applications/deckd.app; the test-app CI job covers it.

Not fixed here: the invisible icon is macOS state, not a deckd bug. An identical build relabelled com.deckd.probe placed its icon normally, while com.deckd.daemon stays off-screen even though it's allowed in System Settings → Menu Bar. Renaming the status item didn't help.

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

…out the menu bar

The DMG app forgot LAN access on every launch, and the menu-bar item was
the only way to turn it on, so a Mac where macOS doesn't draw the icon
had no way to reach the daemon from another device.

- Persist the choice in user defaults (com.deckd.daemon AllowLAN) and show
  the checkmark from launch; `defaults write com.deckd.daemon AllowLAN
  -bool true` + relaunch enables it headless.
- Reopening the running app (Finder, Spotlight, `open -a deckd`) opens the
  surface.
- test-app.sh: start from a cleared choice, check it is saved and survives
  a relaunch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonocodes
jonocodes merged commit 5aff9ed into main Nov 18, 2026
7 checks passed
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