fix: gracefully handle mixed formats in find-duplicates and fix network errors

The find-duplicates tool failed entirely when any uploaded file couldn't
be processed, returning "Duplicate detection failed" or a format-specific
error that aborted the whole batch. With mixed-format uploads (77 files),
this made the tool unusable.

- Skip unprocessable files instead of aborting; return skippedFiles in response
- Switch from fetch() to XHR with upload progress tracking (Uploading X%)
- Add Vite proxy timeout config (5min) to prevent connection drops on large uploads
- Add "Download Grouped" button: ZIP with each duplicate group in its own folder
- Add collapsible skipped-files section in the results UI
- Add 3 integration tests for skip behavior (43 total)
This commit is contained in:
SnapOtter
2026-05-13 11:35:33 +08:00
parent 3c3682661e
commit d22bebb8ad
5 changed files with 336 additions and 72 deletions
+5 -1
View File
@@ -15,7 +15,11 @@ export default defineConfig({
host: true,
port: Number(process.env.PORT) || 1351,
proxy: {
"/api": process.env.VITE_API_URL || "http://localhost:13490",
"/api": {
target: process.env.VITE_API_URL || "http://localhost:13490",
timeout: 300_000,
proxyTimeout: 300_000,
},
},
},
build: {