Show that a download is being prepared

#13
by lvwerra HF Staff - opened
Hugging Face Biology Research org

Writing a large segment to Parquet takes several seconds, and the only output, the download button, stays hidden until it is done, so a click looked like it did nothing.

The Prepare download button now switches to Preparing download… with a spinner and disables itself while the file is written, then returns to normal once the download button appears.

It runs as one generator covering busy, done and failed. A first version chained the restore with .then, which does not run after an error: clicking before a segment was loaded left the button stuck on "Preparing". Both paths were checked in the browser against a deliberately slowed export:

label disabled download button
before click Prepare download no hidden
during export Preparing download… yes hidden
after export Prepare download no shown
after a failed export Prepare download no hidden, error toast shown

🤖 Generated with Claude Code

lvwerra changed pull request status to merged

Sign up or log in to comment