Multi-Hoster-Upload/tests
Administrator af51bebaf7 fix(queue): stop auto-dedup from deleting pending jobs on restart/update
Reproduced from a real saved config: pendingQueue held 4 'preview' jobs (one
file across 4 hosters); the queue saved + restored correctly. But
_autoDeduplicateFromLog (runs at init after restore) removed jobs whose
fileName|hoster appeared ANYWHERE in the lifetime fileuploader.log, regardless
of status — so all 4 pending previews were deleted and the queue showed the
empty "Dateien hierhin ziehen" state. Looked update-specific only because the
server restarts on update; a plain restart did the same.

- New lib/queue-dedup.js (pure, dual CJS/window export like queue-prune.js):
  partitionRestoredJobsByLog drops ONLY 'done' jobs that match the log. Pending
  (preview/queued) and failed (error/aborted) jobs always survive — they're
  intentional queued work (often a deliberate re-upload of a previously
  uploaded file). Manual importUploadLog stays separate/explicit.
- renderer wires it in; index.html loads the module before app.js.
- Tests: 5 cases incl. the exact reproduced scenario (4 previews all in log ->
  0 removed). Full suite 162/162.

Verified against the user's real electron-config.json + fileuploader.log: old
logic removed 4/4 (empty queue), new logic removes 0/4 (queue preserved).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 01:08:59 +02:00
..
backup-crypto.test.js feat(backup): import legacy password-encrypted backups 2026-04-17 11:22:33 +02:00
coalesced-set.test.js test(coalesce): extract done-removal coalescer + 11 unit tests 2026-04-28 11:59:32 +02:00
config-store.test.js feat(log): per-hoster toggle for writing links to fileuploader.log 2026-05-23 15:29:25 +02:00
doodstream-upload.test.js fix(doodstream): survive transient network blips around the upload 2026-05-25 00:44:20 +02:00
hosters.test.js fix(hosters): defensive null-payload guards in result parsers + 7 tests 2026-04-28 10:12:32 +02:00
log-policy.test.js feat(log): per-hoster toggle for writing links to fileuploader.log 2026-05-23 15:29:25 +02:00
log-rotation.test.js test(log): extract log-rotation into testable module + 10 unit tests 2026-04-28 05:10:53 +02:00
queue-dedup.test.js fix(queue): stop auto-dedup from deleting pending jobs on restart/update 2026-05-25 01:08:59 +02:00
queue-prune.test.js test(queue): extract terminal-job prune into testable module + 10 tests 2026-04-28 06:41:47 +02:00
remote-config.test.js feat(remote): add remote control defaults to config store 2026-03-12 06:54:46 +01:00
remote-server.test.js feat(remote): add WebSocket server with auth, signaling relay, and rate limiting 2026-03-12 06:54:51 +01:00
semaphore.test.js test: add edge case tests for throttle and semaphore 2026-03-21 15:16:49 +01:00
throttle.test.js test: add edge case tests for throttle and semaphore 2026-03-21 15:16:49 +01:00
throttled-cache.test.js test(sort): extract throttled-cache utility + 12 unit tests 2026-04-28 07:12:52 +02:00
ui-smoke.js feat: improve account-driven uploads 2026-03-11 02:41:32 +01:00
upload-manager.test.js perf(rotation): rotate after 1 fail on generic errors, not after 5 2026-04-22 18:23:30 +02:00