fix: handle connectivity errors and Bluetooth power state - #18
Merged
Merged
Conversation
This was referenced Sep 3, 2026
Closed
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The updated Wi‑Fi state-changed handler no longer handles NM.DeviceState.NEED_AUTH, which can leave pending connections uncleared and suppress credential retry prompts in common “missing secrets” scenarios.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR improves connectivity UX by gating Bluetooth discovery on adapter/power availability and by making Wi‑Fi connection errors more specific, especially around authentication failures.
Changes:
- Wi‑Fi: classifies NetworkManager device failure reasons to only prompt for credentials on likely authentication failures.
- Bluetooth: prevents discovery when powered off and synchronizes discovery with both page activity and Bluetooth power state.
File summaries
| File | Description |
|---|---|
| src/stores/connectivity/wifiPage.ts | Adds authentication-failure classification to decide when to prompt for Wi‑Fi credentials after connection failures. |
| src/stores/connectivity/bluetooth.ts | Prevents discovery when Bluetooth is off and keeps discovery state in sync with page activity and power changes. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+204
to
+217
| if (state === NM.DeviceState.ACTIVATED) { | ||
| pendingAccessPoint = null; | ||
| } else if (state === NM.DeviceState.FAILED) { | ||
| pendingAccessPoint = null; | ||
| if (pending.requires_password && isAuthenticationFailure(reason)) { | ||
| retryAccessPoint = pending; | ||
| setError( | ||
| `Could not connect to ${pending.ssid || 'this network'}. Enter the password and retry.` | ||
| ); | ||
| } else { | ||
| retryAccessPoint = null; | ||
| setError(`Could not connect to ${pending.ssid || 'this network'}.`); | ||
| } | ||
| } |
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.
Summary