Skip to content

Fix/upload button visibility on failure#300

Open
stephenOwino wants to merge 2 commits intoDevinoSolutions:masterfrom
stephenOwino:fix/upload-button-visibility-on-failure
Open

Fix/upload button visibility on failure#300
stephenOwino wants to merge 2 commits intoDevinoSolutions:masterfrom
stephenOwino:fix/upload-button-visibility-on-failure

Conversation

@stephenOwino
Copy link
Copy Markdown
Contributor

THE PROBLEM

The upload button remains visible (though disabled) after upload failures. This creates a confusing user experience where a non-functional button stays on screen.

THE ROOT CAUSE

In FileList.tsx a, the ShouldRender condition only checks if upload is not successful

<ShouldRender if={uploadStatus !== UploadStatus.SUCCESSFUL}>

MY SOLUTION

Updated the condition to hide the button for both SUCCESSFUL and FAILED states:

<ShouldRender if={uploadStatus !== UploadStatus.SUCCESSFUL && uploadStatus !== UploadStatus.FAILED}>

The upload button now:

  1. Shows when status is PENDING (files selected, ready to upload)
  2. Shows but disabled when status is ONGOING (upload in progress)
  3. Hides when status is SUCCESSFUL
  4. Hides when status is FAILED (we shold have error here)

TESTING

The bug was discovered while testing locally without S3 configuration. When uploads fail with missing environment variables, the backend returns a 500 error and uploadStatus becomes FAILED. The button previously remained visible in this state.

FILE CHANGED

packages/upup/src/components/FileList.tsx

@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Jan 25, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

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.

1 participant