CodeChefVIT / CodeChefVIT/papers-codechef

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

オープン 初心者向け
#523 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
20
フォーク
64
PR マージ指標
30日以内にマージされた PR はありません

説明

**Describe the bug**
Zip download lacks file extension and shows success even when download fails entirely.

**To Reproduce**
1. Go to Catalogue page
2. Select 2+ papers
3. Click "Download Selected"
4. (Optional: throttle network in DevTools to simulate all requests failing)
5. File downloads with no `.zip` extension
6. If all fetches failed, empty ZIP is created but success toast still appears

**Expected behavior**
- Downloaded file should have `.zip` extension (e.g., `Physics.zip`)
- If all paper fetches fail, show error toast instead of success
- Success message should show count: "Downloaded 3 of 5 papers"

**Screenshots**
N/A (UX issue — filename shows `Physics` not `Physics.zip` in downloads folder)

**Desktop**
- OS: Any
- Browser: Chrome/Firefox/Safari
- Issue occurs on all browsers

**Root cause**
File: `src/context/filterContext.tsx`
- Line 180: `a.download = getDownloadName(...)` missing `.zip`
- Lines 150–164: Fetch errors silently caught, no success counter
- Line 186: Always shows success toast regardless of download state

**Additional context**
Low severity — UX friction, not data loss. User gets empty ZIP but can retry.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start in src/context/filterContext.tsx, checking lines 150–164 for fetch failure handling and line 180 for the download filename. Reproduce the Catalogue download with multiple papers, including an all-fail network case, and verify the filename has a .zip extension, failures produce an error toast, and partial success reports the downloaded count.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
78/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。