Offer Open App / Open Settings on macOS menu-bar right-click#4788
Offer Open App / Open Settings on macOS menu-bar right-click#4788bgoncal wants to merge 1 commit into
Conversation
The status-item right-click menu's first action was an ambiguous "Toggle Home Assistant". Replace it with two explicit actions — "Open Home Assistant" (activates the main window) and "Open Settings…" (activates the Settings window, keeping the ⌘, shortcut) — so a right-click clearly offers opening the app or its settings. The left-click show/hide toggle behaviour is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR improves the macOS menu-bar (status item) right-click menu in the Catalyst app by replacing the ambiguous “Toggle Home Assistant” action with explicit “Open Home Assistant” and “Open Settings…” actions, while keeping the existing left-click toggle behavior via the status item’s primary action handler.
Changes:
- Add new localized strings for the status-item menu: “Open %@” and “Open Settings…”.
- Update the status-item right-click menu to show “Open Home Assistant” and “Open Settings…” (⌘,) and remove the redundant “Preferences…” entry from that menu.
- Regenerate/update SwiftGen string accessors to include the new localization keys.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Sources/Shared/Resources/Swiftgen/Strings.swift | Adds SwiftGen accessors for menu.status_item.open and menu.status_item.open_settings. |
| Sources/App/Utilities/MenuManager.swift | Replaces the status-item “Toggle” menu entry with explicit “Open” / “Open Settings…” items; keeps left-click toggle via primaryActionHandler. |
| Sources/App/Resources/en.lproj/Localizable.strings | Adds English source strings for the new status-item menu labels. |
|
Found 21 unused localization strings in the codebase. Click to see detailsTo clean up these strings, manually remove them from the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4788 +/- ##
=======================================
Coverage ? 44.95%
=======================================
Files ? 275
Lines ? 16835
Branches ? 0
=======================================
Hits ? 7568
Misses ? 9267
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
When the macOS app runs in the menu bar, right-clicking the status-item icon previously showed an ambiguous "Toggle Home Assistant" as its first action. This replaces it with two explicit actions so a right-click clearly offers opening the app or its settings:
.webViewscene)..settingsscene), keeping the existing ⌘, shortcut.The standalone "Preferences…" status-item entry (which did the same thing as the new "Open Settings…") is removed to avoid duplication; the regular app-menu "Preferences…" (⌘,) is untouched. The left-click show/hide toggle behaviour on the icon is unchanged.
Resulting right-click menu: Open Home Assistant · Open Settings… · — · About · Check for Updates · Quit.
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
New localized strings
menu.status_item.openandmenu.status_item.open_settingsadded toen.lproj/Localizable.strings(non-English locales sync from Lokalise).Strings.swiftaccessors regenerate via the SwiftGen build phase; updated here to match.