Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Fixes skip faulty warning being shown #4564

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

jpelay
Copy link
Member

@jpelay jpelay commented Sep 27, 2023

Description

When the server takes too long to respond to a /parse request, the front-end assumes that this must be because it is recompiling the program after finding errors, due to this code in app.ts

let errorsFoundTimeout = setTimeout(function () {
        error.showWarningSpinner();
        error.showWarning(ClientMessages['Execute_error'], ClientMessages['Errors_found']);
      }, 500)

let response = await postJsonWithAchievements('/parse', data);
clearTimeout(errorsFoundTimeout);
error.hide()

This essentially means: wait for 500 ms for response, if it answers before you don't execute the function and hides any possible errors. I changed that and now we only show the warning box if we find errors we skipped in the source map. This means that we are not relying on the response time of the server, and will reliably show the warning.

I changed also the wording of the warning and now it says this: "You made a mistake! Don't worry, we still ran the program". However, @Felienne can you tell me if this is a good wording, I'm not sure this is clear enough.

How to test

Easiest way to reproduce is:

  1. add a sleep to /parse endpoint
  2. See that now even if the server takes long to respond the skip faulty error is not shown

Depends-On: #4560

@mergify
Copy link
Contributor

mergify bot commented Sep 27, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Sep 27, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit de5c1da into hedyorg:main Sep 27, 2023
8 checks passed
@mergify
Copy link
Contributor

mergify bot commented Sep 27, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants