StatusBar does not respect hideUploadButton when state is recovered with Golden Retriever

I recently added Golden Retriever to our application in order to support resumable multipart uploads with AWS S3. The uploads are working as expected and resume the same upload from where it left off, but there’s one small issue: the upload button on the status bar is now appearing when restoring an upload. The source of that error appears to be on what is currently line 208 in StatusBarUI.jsx (can’t link to it, but it is line 208 in version 3.14.1 for future reference), where having any recovered state ensures that that button will render, even if hideUploadButton is true.

// a subset of our Uppy configuration
new Uppy()
  .use(StatusBar, {
    target: '#uppy-progress',
    hideAfterFinish: false,
    hideUploadButton: true,
    hideRetryButton: true,
    showProgressDetails: true,
  })
  .use(GoldenRetriever)

We always have hideUploadButton: true in our StatusBar configuration and never want or expect it to be there. I would think that this is likely a very small bug; if it’s not and this behavior is intended, then it would be great to learn more about why that is, any other context, and what the best approach would be here.

If it is a bug, the fix seems pretty simple – rework the boolean logic so that recoveredState on the line above is replaced with recoveredState && !hideUploadButton (or an equivalent boolean expression). I can open a PR to fix this issue if my reading of the behavior is correct. Thanks so much!

I have created a draft PR (4567 in uppy) to demonstrate what this change might look like. I also completely understand if the current behavior is expected and it’s on the developer to use a custom solution to get rid of the upload button (i.e. CSS). In that case, I’ll close the PR. Thanks so much!