Skip to content

Conditionally render entire files section based on existence of files#1746

Open
bobular wants to merge 1 commit into
mainfrom
no-datafiles-for-failed-UDs
Open

Conditionally render entire files section based on existence of files#1746
bobular wants to merge 1 commit into
mainfrom
no-datafiles-for-failed-UDs

Conversation

@bobular

@bobular bobular commented Jun 8, 2026

Copy link
Copy Markdown
Member

Before, we had broken file download link in the "Uploaded Files in Dataset" section. Now we just skip the entire "Data Files" section. See below:

image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the UserDatasetFiles UI to avoid rendering the dataset files section when there are no files available, preventing users from seeing broken download links when an upload did not succeed.

Changes:

  • Add an early return to skip rendering the files section when file data is missing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +98 to +101
// No need for this section if there are no data files at all
// (e.g. upload failure)
const hasUpload = files.upload != null;
if (!hasUpload) return null;
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.

3 participants