Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts the Upload sheet flow to prevent UI issues when the user cancels/dismisses while network operations are still in-flight, addressing the reported freeze in the PPPC Utility upload flow.
Changes:
- Makes
dismissActionnon-optional and always invoked on dismissal. - Adds an
isDismissedguard to prevent async callbacks from mutating view state after dismissal. - Updates the SwiftUI preview initializer to match the new
dismissActionsignature.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Addresses a UI freeze in the PPPC Utility upload flow by preventing asynchronous network callbacks from mutating SwiftUI state after the upload sheet has been dismissed.
Changes:
- Made
dismissActionnon-optional and ensured dismissal is invoked consistently. - Added an
isDismissedstate flag (set indismissView/onDisappear) to guard async completion handlers. - Routed async completion handling through
@MainActorto keep SwiftUI state updates on the main thread.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Addresses an app-freeze scenario in the upload flow by preventing async network callbacks from mutating SwiftUI state after the upload sheet has been dismissed.
Changes:
- Make
dismissActionnon-optional and always invoked when cancelling/dismissing. - Add
isDismissedstate +.onDisappeartracking to guard async callbacks after dismissal. - Marshal
verifyConnection/uploadcompletion handling onto the main actor, and move keychain save work off the main actor.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
This PR addresses an app-freeze scenario in the upload flow by preventing async callbacks from updating state after dismissal and by moving potentially blocking credential/keychain work off the UI thread.
Changes:
- Make
dismissActionnon-optional and dismiss immediately while performing credential cleanup asynchronously. - Add an
isDismissedguard (set viadismissView/.onDisappear) to prevent UI/state updates after the view is dismissed. - Ensure
verifyConnectionstate updates occur on the main actor; fix a user-facing success message typo.
Comments suppressed due to low confidence (1)
Source/SwiftUI/UploadInfoView.swift:25
- The comment contains a spelling mistake: "succesful" → "successful".
/// The hash of connection info that has been verified with a succesful connection
@State private var verifiedConnectionHash: Int = 0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…shOfConnectionInfo before doing things with it
No description provided.