Skip to content

Jpcfm 5534 pppc utility app freezes when apple utility is selected and user tries to cancel out of upload flow#138

Open
jjpritzl wants to merge 8 commits intomasterfrom
JPCFM-5534-PPPC-Utility-App-freezes-when-Apple-Utility-is-selected-and-user-tries-to-cancel-out-of-upload-flow
Open

Jpcfm 5534 pppc utility app freezes when apple utility is selected and user tries to cancel out of upload flow#138
jjpritzl wants to merge 8 commits intomasterfrom
JPCFM-5534-PPPC-Utility-App-freezes-when-Apple-Utility-is-selected-and-user-tries-to-cancel-out-of-upload-flow

Conversation

@jjpritzl
Copy link

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 dismissAction non-optional and always invoked on dismissal.
  • Adds an isDismissed guard to prevent async callbacks from mutating view state after dismissal.
  • Updates the SwiftUI preview initializer to match the new dismissAction signature.

💡 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 dismissAction non-optional and ensured dismissal is invoked consistently.
  • Added an isDismissed state flag (set in dismissView / onDisappear) to guard async completion handlers.
  • Routed async completion handling through @MainActor to 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 dismissAction non-optional and always invoked when cancelling/dismissing.
  • Add isDismissed state + .onDisappear tracking to guard async callbacks after dismissal.
  • Marshal verifyConnection / upload completion 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 dismissAction non-optional and dismiss immediately while performing credential cleanup asynchronously.
  • Add an isDismissed guard (set via dismissView/.onDisappear) to prevent UI/state updates after the view is dismissed.
  • Ensure verifyConnection state 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants