fathominfo / delphy-web

Other
5 stars 0 forks source link

Try to catch errors on load and alert user #6

Closed mark-fathom closed 1 month ago

kayserifserif commented 1 month ago

I uploaded a small file with some characters deleted and dates misformatted, and didn't get a visible error alert.

ma_sars_cov_2 copy.fasta.zip

mark-fathom commented 1 month ago

Thanks for that test. Will look into it.

mark-fathom commented 1 month ago

OK, I think I handled that case. Would you mind taking another peek?

kayserifserif commented 1 month ago

Cool, thanks!

I uploaded my bogus file and got the warning. Then, without reloading the page, I tried to upload a correctly formatted file, but it didn't go. The file otherwise works correctly on a fresh reload.

mark-fathom commented 1 month ago

Aha. My prediction is that reloading the page is way easier than investigating the plumbing to reset the delphy load. Do you think updating the alert message would suffice?

mark-fathom commented 1 month ago

Huh, just trying this out, and I was able to load a new file in the same session.

https://github.com/user-attachments/assets/fb75f29d-688d-4fed-8cd5-60989a0eafcf

In this one I loaded the demo because it's fastest, but in another attempt I loaded a larger slower file.

kayserifserif commented 1 month ago

Oh, you're right! Maybe I was too hasty. We could probably remove the "Parsing…" loader at the bottom when it fails, to help clarify that. But it works!