Reset update error view state on okay

Clicking "Okay" in the error view in @macos/Sources/Features/Update/UpdatePopoverView.swift should move the state back to idle to hide it.

I'll help you make the "OK" button in the error view reset the state to idle. Let me first check the UpdateViewModel and UpdateState to understand how to properly reset the state.

Explored 1 file, 3 searches

Now I can see that the UpdateViewModel has a state property that can be set to .idle. The error struct needs a way to reset the state. Let me check how the UpdateViewModel is used and how we can add a reset method:

Edited UpdateViewModel.swift
+1

Now let me find where the Error state is created to add the dismiss closure:

Explored 1 file, 2 searches

Perfect! Now I can see that the error state is created in UpdateDriver.swift at line 41. I need to add a dismiss closure that sets the state back to idle. Let me update that:

Edited UpdateDriver.swift
+3
-1

Now let me check if there's an UpdateSimulator file that also needs updating:

Explored 1 file
Edited UpdateSimulator.swift
+3

Now let me update the UpdatePopoverView to call the dismiss closure:

Edited UpdatePopoverView.swift
+1

Done! Clicking "OK" in the error view now calls error.dismiss() which sets the state back to idle, hiding the popover.