Skip to content

fix(file-upload): fixed file upload URL required#875

Merged
waleedlatif1 merged 2 commits intostagingfrom
fix/fu
Aug 5, 2025
Merged

fix(file-upload): fixed file upload URL required#875
waleedlatif1 merged 2 commits intostagingfrom
fix/fu

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

Fixed file upload URL required

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2025 4:37am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Aug 5, 2025 4:37am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR fixes a bug where file upload URL fields were incorrectly marked as required across two file handling blocks: the main File block and the Mistral Parse block. The core issue was environment-dependent behavior that caused inconsistent user experiences between development and production environments.

Previously, both blocks used isProd checks to conditionally enable URL input functionality. In development, only URL input was available and always required. In production, both URL and file upload options were available, but the URL field remained required regardless of the selected input method. This created a confusing user experience where selecting "Upload Files" would still require a URL to be provided.

The fix removes all environment-dependent logic by eliminating the isProd checks and related conditional flags (shouldEnableURLInput in file.ts and shouldEnableFileUpload in mistral_parse.ts). Now both blocks always show an input method dropdown with options for both URL and file upload. The validation logic has been updated to only require the appropriate field based on the user's selection - URL when "URL" is selected, and file upload when "Upload" is selected.

This change standardizes the user interface across all environments and implements proper conditional validation, ensuring that users only need to provide the input type they've selected. The blocks now have consistent behavior whether running in development or production, making the file handling workflow more intuitive and reducing user confusion.

Confidence score: 4/5

  • This PR fixes a legitimate UX bug with straightforward changes that improve consistency
  • Score reflects well-contained changes with clear validation logic improvements
  • Pay close attention to the parameter validation logic in both file blocks to ensure edge cases are handled properly

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 2bba201 into staging Aug 5, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/fu branch August 6, 2025 00:22
waleedlatif1 added a commit that referenced this pull request Aug 6, 2025
* fix(file-upload): fixed file upload URL required

* cleanup
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
* fix(file-upload): fixed file upload URL required

* cleanup
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