Skip to content

fix(dock): make RClick an agent instead of leaving the Dock at runtime - #162

Merged
wflixu merged 1 commit into
mainfrom
dev
Oct 14, 2026
Merged

wflixu merged 1 commit into
mainfrom
dev

Conversation

@wflixu

@wflixu wflixu commented Oct 14, 2026

Copy link
Copy Markdown
Owner

The app bundle declared no LSUIElement — only the extension's plist did — so macOS launched it as a plain foreground app. It left the Dock only if applicationDidFinishLaunching reached setActivationPolicy(.accessory); any launch that did not get there stayed a foreground app with a Dock tile. The startup-failure path runs before that line (AppDelegate.init → StartupFailure.presentAndExit, which presents an alert from inside init), and a first launch after install that fails early looks like an app parked in the Dock. That is what #157 and #145 describe, including the part where a reboot clears it. Measured with a clean state before the change: the running build reports type="UIElement" and has no Dock tile, so declaring LSUIElement removes the window in which a broken launch could leave one rather than changing the happy path.

That retires SHOW_IN_DOCK and its dead predecessor SHOW_DOCK_ICON: nothing has written either key for several releases and the settings UI no longer offers the switch, so the read could only ever produce "hide" while users went looking for a control that does not exist. RClick is a menu bar app; the Dock is not a place it should appear, so the choice is removed rather than restored.

Also records what the volume-root experiment measured (#155, #158): observing a volume root is what makes Finder redraw that volume's sidebar icon, while observing the volume's contents instead cannot work at all — the sandbox allows reading /Volumes but not /Volumes/<name> (application.sb:522), so the volume contributes no observation roots and the menu disappears from it entirely. The menu keeps priority; the icon stays a documented macOS consequence.

Version 2.3.1, build 20261014001.

Summary

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 📝 Documentation update
  • ♻️ Refactoring
  • ⚡ Performance improvement
  • 🔧 Build/CI change
  • 🧪 Test addition/update

Related Issue

Screenshots

Before After

Testing

Manual Testing

  • App launches and appears in menu bar
  • Right-click menu works correctly in Finder
  • Dark mode looks correct
  • Settings persist across restarts
  • FinderSync extension loads properly

Build Verification

# Paste the output of:
xcodebuild -project RClick.xcodeproj -scheme RClick -destination 'platform=macOS'

Checklist

  • My code follows the project's Swift 6.2 conventions (see CONTRIBUTING.md)
  • All UI is SwiftUI (no AppKit UI components)
  • I have tested on macOS 15.6+
  • I have tested with both light and dark mode
  • I have updated documentation if needed
  • My branch is up-to-date with dev

Additional Notes

The app bundle declared no LSUIElement — only the extension's plist did — so
macOS launched it as a plain foreground app. It left the Dock only if
`applicationDidFinishLaunching` reached `setActivationPolicy(.accessory)`; any
launch that did not get there stayed a foreground app with a Dock tile. The
startup-failure path runs before that line (AppDelegate.init →
StartupFailure.presentAndExit, which presents an alert from inside init), and a
first launch after install that fails early looks like an app parked in the Dock.
That is what #157 and #145 describe, including the part where a reboot clears it.
Measured with a clean state before the change: the running build reports
type="UIElement" and has no Dock tile, so declaring LSUIElement removes the
window in which a broken launch could leave one rather than changing the happy
path.

That retires `SHOW_IN_DOCK` and its dead predecessor `SHOW_DOCK_ICON`: nothing
has written either key for several releases and the settings UI no longer offers
the switch, so the read could only ever produce "hide" while users went looking
for a control that does not exist. RClick is a menu bar app; the Dock is not a
place it should appear, so the choice is removed rather than restored.

Also records what the volume-root experiment measured (#155, #158): observing a
volume root is what makes Finder redraw that volume's sidebar icon, while
observing the volume's contents instead cannot work at all — the sandbox allows
reading `/Volumes` but not `/Volumes/<name>` (application.sb:522), so the volume
contributes no observation roots and the menu disappears from it entirely. The
menu keeps priority; the icon stays a documented macOS consequence.

Version 2.3.1, build 20261014001.

Co-Authored-By: Claude Code <[email protected]>
@wflixu
wflixu merged commit 515b558 into main Oct 14, 2026
1 check 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