Skip to content

Add postflight to purge macOS Dock cache on install/uninstall#5

Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1772647873-purge-dock-cache
Closed

Add postflight to purge macOS Dock cache on install/uninstall#5
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1772647873-purge-dock-cache

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Adds postflight and uninstall_postflight stanzas to the char and char@nightly Homebrew casks. After install, the cask force-registers the app with macOS LaunchServices (lsregister -f) and restarts the Dock, which clears stale cached names/icons (e.g. the old "Hyprnote" name persisting in the Dock). On uninstall, it unregisters the app and restarts the Dock.

This addresses the issue where macOS Dock still displays "Hyprnote" after installing the renamed app.

Review & Testing Checklist for Human

  • Test on macOS: Install via brew install --cask char and verify the Dock shows the correct app name after install (not cached "Hyprnote"). This cannot be tested on Linux.
  • Verify Dock restart is acceptable UX: killall Dock causes a brief visual flicker as the Dock restarts. Confirm this is acceptable during install.
  • Note: char.rb still has app "Hyprnote.app" (bundle not yet renamed). When the bundle name changes to Char.app, the postflight paths will need to be updated to match.

Notes

  • The hyprnote.rb and hyprnote@nightly.rb casks were intentionally not modified since those casks correctly show the "Hyprnote" name.
  • must_succeed: false on killall Dock ensures the install doesn't fail if the Dock process isn't running (e.g. headless CI).

Link to Devin Session: https://app.devin.ai/sessions/04c4d6674dc54243945b5b6068018396
Requested by: @ComputelessComputer

Adds postflight and uninstall_postflight stanzas to char and char@nightly
casks to force-refresh the LaunchServices database and restart the Dock.
This ensures the Dock displays the correct app name/icon after install,
fixing stale cache from the previous 'Hyprnote' name.

Co-Authored-By: John <john@hyprnote.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@yujonglee yujonglee closed this Mar 6, 2026
@yujonglee yujonglee deleted the devin/1772647873-purge-dock-cache branch March 6, 2026 10: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