finos / FDC3-Sail

Open implementation of the FDC3 standard using Electron and an integrated App Directory.
Apache License 2.0
32 stars 20 forks source link

The intent result is not returned when the intent UI resolver has been opened #139

Open symphony-jean-michael opened 1 year ago

symphony-jean-michael commented 1 year ago

Bug Report

Steps to Reproduce:

  1. Register 2 applications (B, C) that listen to the same Intent FDC3
  2. Send the intent from application A
  3. The Intent UI resolver will opened, and ask to the user to select the application to open B, or C
  4. Select an application B, or C
  5. Then in the selected application, the intent is processed and returns a result ==> But the intent result is never received in application A

Expected Result:

The intent result is received in application A (Application that triggers the FDC3 intent)

Actual Result:

The intent result is never received in application A (Application that triggers the FDC3 intent). This bug only occurs when the intent UI resolver is displayed. It does not occur when there is only one application registered for the intent and therefore no intent UI resolver is used.

The problem seems to come from: https://github.com/finos/FDC3-Sail/blob/19a3e2f7d1964015c87a9390ee6118c129b90e0e/packages/main/src/handlers/fdc3/2.0/raiseIntent.ts#L103

Where the main logic to get and returns the result is only executed when there is only 1 app listening the intent. So, we should also executes it once the user has selected an application in the UI Resolver (the UI Resolver should return a Promise)

Environment: