Summary
useRemoteWidget does not restore the previously selected value after an application or workflow reload. The widget selects the first available remote value instead.
LoadImageOutput uses useRemoteWidget. This behavior causes its image selection to change after reload.
Required changes
Update the selected-value restoration logic in useRemoteWidget so it preserves the saved value when that value is present in the refreshed remote options. Select a fallback value only when the saved value is unavailable.
Rationale
A reload must not silently change the value that the user selected. The current behavior also makes workflow persistence tests depend on the remote option order.
Affected areas
useRemoteWidget
LoadImageOutput
- Tests for remote widget value restoration and output image selection
Acceptance criteria
- After reload,
useRemoteWidget restores the previously selected value when it exists in the remote options.
LoadImageOutput keeps its selected output image after reload.
- The implementation selects a fallback only if the saved value is absent.
- Tests cover a remote option response where the saved value is not the first item.
Context
Summary
useRemoteWidgetdoes not restore the previously selected value after an application or workflow reload. The widget selects the first available remote value instead.LoadImageOutputusesuseRemoteWidget. This behavior causes its image selection to change after reload.Required changes
Update the selected-value restoration logic in
useRemoteWidgetso it preserves the saved value when that value is present in the refreshed remote options. Select a fallback value only when the saved value is unavailable.Rationale
A reload must not silently change the value that the user selected. The current behavior also makes workflow persistence tests depend on the remote option order.
Affected areas
useRemoteWidgetLoadImageOutputAcceptance criteria
useRemoteWidgetrestores the previously selected value when it exists in the remote options.LoadImageOutputkeeps its selected output image after reload.Context