Problem report — Plasmic : Inconsistent behavior when chaining

@carlos_eduardo hi!
Thanks for the thorough explanation!
Can you also attach your project ID so we can review the implementation and create a minimal reproduction from our end?

From what i can suggest immediately:

  1. You mentioned that you run actions on the form submit. By default, when the form is submitted, it triggers a page reload. To avoid that, you would need to either run event.preventDefault() in your first Run Code action or run the action on a button click, not the form submit (first approach preferred in your case). This should resolve part of your issue.
  2. Interaction steps can be run conditionally: at the bottom of the action, you have Run this step section. Whenever the previous action is passed, you can return some of the data for the next step, and then decide whether to run the following steps.

Here is a minimal reproduction of your scenario:

  1. Create a button, that on click runs the following code:
const waiter = new Promise((resolve) => setTimeout(() => resolve(), 2000));
console.log('first step launched');
await waiter;
console.log('first step finished');

return true;
  1. Create a second action, which will only run when the first step result is true

end result of console log after click: