feat: send push notifications on VPN failures - #266
Conversation
Relates to #195. Supersedes #196. When Coder Connect enters a failed state, the app now sends a push notification with the same error message that the menu shows. Clicking the notification opens the menu. `CoderVPNService` exposes an `onFailure` callback next to the existing `onStart`, fired from `tunnelState.didSet` on each transition into `.failed`. `AppDelegate` wires it to `sendNotification`, so the service stays free of UI code.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d6d74a07f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3dd2858cf3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The tunnel reports .invalid while an existing configuration is removed on login, logout, or reconfiguration. The views treat the resulting .unconfigured state as a prompt, not an error, so it should not notify.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d33e7764e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review re: Avoid hiding an already-visible menu menuBarExtra.isVisible reports whether the status bar icon is visible (it checks the status item button's occlusion), not whether the menu window is open, so it can't be used as a guard here. The menu window dismisses itself on windowDidResignKey, and clicking a notification banner takes key status away from it, so by the time this handler runs the menu is already closing. Guarding on window visibility would need a new API in our fluid-menu-bar-extra fork; not worth it for this edge case. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Let's bump a minor version when this gets released. |
I'm waiting on a fix for #264 (see my comment) but yep will do |
|
@matifali we have mutagen version bump(s) incoming, so I'm gonna wait for those too |
|
Yes all good. Not asking for a release. Whenever we do. |
Relates to #195. Supersedes #196.
When Coder Connect enters a failed state, the app now sends a push notification with the same error message that the menu shows. Clicking the notification opens the menu.
CoderVPNServiceexposes anonFailurecallback next to the existingonStart. It fires on each transition oftunnelState,neState, orsysExtnStateinto their.failedcase, so tunnel errors, network extension errors, and system extension errors all notify. Pending approval and unconfigured states are not failures and stay silent.AppDelegatewires the callback tosendNotification, so the service stays free of UI code.