• Aryan Noshirvnai's avatar
    Add a real progress bar to Upload and Remix · 92661638
    Aryan Noshirvnai authored
    fetch() has no upload-progress equivalent to onUploadProgress, so
    uploadDirect (music.ts) and createRemix (remix.ts) switch to XMLHttpRequest
    for real byte-level transfer progress via xhr.upload.onprogress - the only
    way to get this data.
    
    New ProgressBar component: shows real 0-100% during the transfer, then
    switches to an indeterminate/pulsing state once the transfer completes and
    the server's identify/tag pipeline takes over (which has no progress
    reporting of its own to report, unlike /remix's job-status polling).
    
    Remix already had a stage-based progress bar for job polling but nothing
    during the initial upload itself, which can be slow for up to 5 files -
    now shows real upload progress first, then "Starting…" until the first
    poll lands, then hands off to the existing stage bar once real status data
    arrives.
    
    Typechecks clean, production build succeeds, dev server HMR'd cleanly.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    92661638
Remix.tsx 5.73 KB