Skip to content

fix: add .zip extension and error handling to zip downloads - #524

Open
yuviiios wants to merge 1 commit into
CodeChefVIT:stagingfrom
yuviiios:fix/zip-download-extension
Open

fix: add .zip extension and error handling to zip downloads#524
yuviiios wants to merge 1 commit into
CodeChefVIT:stagingfrom
yuviiios:fix/zip-download-extension

Conversation

@yuviiios

Copy link
Copy Markdown

📌 Purpose

Zip download lacked .zip ext + showed success even when all fetches failed → empty archive delivered silently. Fix: track success count, error-toast if 0, append .zip to filename.

Corresponding issue

closes #523

🖼️ Showcase

N/A (UX fix)

🔧 Changes

  • successCount tracks successful paper fetches
  • successCount === 0 → err-toast + early return (no empty zip)
  • Append .zip to download filename
  • Success toast shows count: Downloaded 3 of 5 papers

➕ Additional Notes

  • File: src/context/filterContext.tsx (handleDownloadSelected, lines 145–186)
  • Test: DevTools throttle → fail all requests → error toast
  • Partial fail → count accurate (2 of 5)
  • No breaking changes, backward compatible

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.

[BUG] Zip download missing extension, silent fail on empty

1 participant