ipld-explorer-components
ipld-explorer-components copied to clipboard
Fix Infinite Loading of Invalid CAR Files
Fixes #365
Problem
When uploading an empty or invalid CAR file, the UI shows an infinite loading animation without proper error feedback. This creates a poor user experience as users have no indication of what went wrong or how to resolve it.
Changes
- Added basic CAR file validation:
- Check for empty files before attempting import
- Improved error messaging
- Clear file input after failed imports
- Enhanced error display in:
- Shows clear troubleshooting tips for CAR import failures
- Added "Okay, take me back to start exploring page" button for better UX
- Maintains consistent error styling with red-muted background
- Updated error translations to be more descriptive and helpful
Testing
- Upload an empty .car file - should show error message instead of infinite loading
- Upload an invalid file with .car extension - should show validation error
- Verify error message includes troubleshooting tips
- Confirm "take me back" button clears error and returns to explore page
- Check that file input is cleared after failed imports