Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request preferred thread network credential alongside all credentials #2473

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

bgoncal
Copy link
Member

@bgoncal bgoncal commented Dec 7, 2023

Summary

Request preferred thread network credential alongside all credentials, since preferred credentials trigger a privacy permission dialog that may be necessary to get all credentials later on.

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@bgoncal bgoncal self-assigned this Dec 7, 2023
@bgoncal bgoncal requested a review from zacwest December 7, 2023 02:00
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 322 lines in your changes are missing coverage. Please review.

Comparison is base (8f7f0ec) 28.37% compared to head (8240cc5) 28.33%.
Report is 3 commits behind head on master.

Files Patch % Lines
...dentialsSharing/ThreadCredentialsSharingView.swift 0.00% 117 Missing ⚠️
Sources/App/WebView/WebViewController.swift 0.00% 83 Missing ⚠️
...alsSharing/ThreadCredentialsSharingViewModel.swift 38.46% 24 Missing ⚠️
...ces/App/Settings/DebugSettingsViewController.swift 0.00% 21 Missing ⚠️
...rces/Shared/DesignSystem/Components/CardView.swift 0.00% 21 Missing ⚠️
...rces/Shared/DesignSystem/Components/HAButton.swift 0.00% 14 Missing ⚠️
Sources/Shared/Environment/MatterWrapper.swift 0.00% 12 Missing ⚠️
...ntialsSharing/ThreadCredentialsSharing+build.swift 0.00% 8 Missing ⚠️
Sources/App/AppDelegate.swift 0.00% 6 Missing ⚠️
Sources/Shared/Assets/Assets.swift 0.00% 4 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2473      +/-   ##
==========================================
- Coverage   28.37%   28.33%   -0.04%     
==========================================
  Files         273      284      +11     
  Lines       30284    30630     +346     
==========================================
+ Hits         8593     8680      +87     
- Misses      21691    21950     +259     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -28,7 +28,12 @@ final class ThreadClientService: THClientProtocol {

func retrieveAllCredentials() async throws -> [ThreadCredential] {
let placeholder = "Unknown"
return try await client.allCredentials().map { credential in
let preferredCredential = try await client.preferredCredentials()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment about why both are happening?

@bgoncal bgoncal merged commit f292874 into master Dec 7, 2023
7 checks passed
@bgoncal bgoncal deleted the thread-credentials branch December 7, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants