Repository navigation
feat: notify Vercel deployments passively and only when asked - #10
Merged
Merged
Conversation
A finished deployment is ambient news, not the user's turn, so it no longer asks for sound or an interrupting banner: notifications use interruptionLevel .passive and the authorization drops .sound. Add a Notify when a Vercel deployment finishes switch next to the sound items, off by default and hidden until the integration is configured. The monitor takes the policy as an injected closure so Infrastructure never reads preferences.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #9
What and why
interruptionLevel = .passiveand the authorization asks for.alertonly, with no sound. A build finishing is ambient news, not the user's turn.Notify when a Vercel deployment finishesswitch next to the sound items. It is off by default and hidden until the integration is configured, so nobody is asked to decide about a feature that is not connected yet.notificationsEnabled), soInfrastructurekeeps reading no preferences and the App layer owns the decision.Changes
Sources/AgentNotch/App/Preferences.swiftvercelNotificationsEnabled, off by defaultSources/AgentNotch/App/StatusMenu.swiftSources/AgentNotch/App/AppDelegate.swiftSources/AgentNotch/Infrastructure/VercelMonitor.swiftpackaging/locales/*/Localizable.stringsHow I tested it
swift build -c releasepassespython3 scripts/check-strings.pypasses (89 strings in 3 languages)bash -n bridge/agent-notch-hook scripts/*.shpassesswift testpasses (XCTest suites plus 7 Swift Testing tests)Notes
UNUserNotificationCenteris not mockable from this package. The gating and content changes are three lines innotify, and the platform behaviour (passive banner, no sound) is verified by macOS at runtime.docs/vercel-notch-ux.mdis point 9: skipping the banner while the user is already looking at that deployment. That needs the monitor to know about the expanded notch, so it is intentionally left out of this PR.