Multi-Hoster-Upload/lib
Administrator 166a49dd0c test(coalesce): extract done-removal coalescer + 11 unit tests
The microtask-coalesce path from 3.3.1 (queueMicrotask + Set so 500
finishing jobs become one queueJobs.filter pass instead of 500) lived
inline in renderer/app.js. Pulled out into lib/coalesced-set.js with
an injectable scheduler so a Node test can drive timing without
async waits.

API: makeCoalescedSet({ apply, scheduler? }) returns
  add(id)        — queue an id for the next batch
  drainSync()    — flush synchronously (used by beforeunload)
  pendingSize()  — diagnostics
  isScheduled()  — diagnostics

Renderer rewires the previous _pendingDoneRemovalIds + manual
queueMicrotask plumbing to the new helper. Optional-chained: if the
script fails to load, a slower per-event filter runs as fallback.

Coverage:
- multiple adds same tick → 1 apply, all ids deduped
- duplicate ids deduped
- batches between flushes stay independent
- add after flush re-schedules
- drainSync flushes synchronously, queued microtask becomes a no-op
- empty drainSync is a no-op
- throwing apply doesn't lock out subsequent batches
- default scheduler (queueMicrotask) runs eventually
- 5000-id burst still coalesces to 1 apply

137/137 green.
2026-04-28 11:59:32 +02:00
..
backup-crypto.js feat(backup): import legacy password-encrypted backups 2026-04-17 11:22:33 +02:00
clouddrop-upload.js perf: final sweep — hot-path allocation, cached log target, sort-header skip 2026-04-19 14:02:34 +02:00
coalesced-set.js test(coalesce): extract done-removal coalescer + 11 unit tests 2026-04-28 11:59:32 +02:00
config-store.js fix(persist): stop swallowing save errors + decouple .bak refresh from save 2026-04-28 09:40:08 +02:00
doodstream-upload.js fix(log): auto-rotate the other 3 internal log files (debug, rot, doodstream) 2026-04-28 11:11:24 +02:00
folder-monitor.js 🐛 fix: folder monitor re-detect deleted files, atomic sync save 2026-03-21 13:31:54 +01:00
hosters.js fix(hosters): defensive null-payload guards in result parsers + 7 tests 2026-04-28 10:12:32 +02:00
log-rotation.js test(log): extract log-rotation into testable module + 10 unit tests 2026-04-28 05:10:53 +02:00
queue-prune.js test(queue): extract terminal-job prune into testable module + 10 tests 2026-04-28 06:41:47 +02:00
remote-capture-preload.js debug: add IPC logging from capture window to main process 2026-03-12 08:46:18 +01:00
remote-capture.html fix: native resolution capture + correct click offset for title bar 2026-03-12 08:55:46 +01:00
remote-server.js 🐛 fix(remote): clean up auth timeout and client state on WebSocket error 2026-03-21 11:40:18 +01:00
secret-store.js fix: encrypt hoster credentials at rest; history CSV Link column urls-only 2026-04-19 11:53:59 +02:00
semaphore.js test: add unit tests (41) and UI smoke tests (21), fix semaphore listener leak 2026-03-10 10:55:50 +01:00
throttle.js fix: multiple bugs found in deep code analysis 2026-03-11 04:16:50 +01:00
throttled-cache.js test(sort): extract throttled-cache utility + 12 unit tests 2026-04-28 07:12:52 +02:00
updater.js 🐛 fix: response body double-read regression + updater JSON safety 2026-03-21 15:35:18 +01:00
upload-manager.js fix(upload): re-check cancellation after _sleep in rotation while-loop 2026-04-28 10:39:09 +02:00
vidmoly-upload.js fix(vidmoly): correct multipart fields & JSON response shape 2026-04-19 22:43:17 +02:00
voe-upload.js chore: remove unused imports (powerSaveBlocker, statusCode) 2026-03-22 14:49:43 +01:00