archesproject / arches-her

5 stars 12 forks source link

Correspondence workflow briefly returns to first step when generating letter #1326

Closed SDScandrettKint closed 5 days ago

SDScandrettKint commented 1 week ago

When continuing to the next step after selecting a consultation resource and letter type, the workflow returns to the first step with each of the nodes empty for a brief moment. This is the case until the letter has completed generating, then the final step is loaded. This can be slow (a few seconds), potentially depending on if the consultation resource or the letter template is complex.

During this slow stage, a user may become confused and think that the workflow has failed and attempt to re-enter the data.

An example video is shown below:

https://github.com/user-attachments/assets/7e50c3e4-9ed2-4d75-8b0e-328a7e6b525c

The duration of the letter generation and thus the first page reappearing can also depend on the network speeds. See the following example video using throttling on Firefox where it is shown for longer than the first video.

https://github.com/user-attachments/assets/c81642b8-0dd7-4c32-979f-ab947af51533

This links to a similar issue where if a consultation + letter type is selected but fails to generate the letter, the workflow will return to the first step without an error message.

csmith-he commented 1 week ago

@SDScandrettKint @aj-he @phudson-he I wonder if there's some way to show an alert while the letter generation is happening so even if everything clears, the user knows what's going on rather than trying to repeat the process