Multi-Hoster-Upload/tasks/todo.md
Administrator d96c6afce0 feat(log): auto-rotate fileuploader.log at 50 MB
A long-running install can otherwise grow the upload log into the
gigabyte range, eating disk and slowing every appendFile. Add a
size-checked rotation right before each flush:

- statSync the resolved log target (cheap, ENOENT skips silently).
- If size exceeds 50 MB, drop the oldest backup (.3), shift .2→.3
  and .1→.2, then rename the live file to .1 and let appendFile
  create a fresh primary on the next call.
- Max 3 backups (~200 MB worst case, bounded). debugLog records
  each rotation for diagnostics.
- Pure additive: skips when file is small or doesn't exist; no
  effect on the daily-log mode (already date-rotated).
2026-04-28 03:40:06 +02:00

1.4 KiB

Verbesserungs-Loop — open items

Released

  • 3.3.0 — Performance-Fixes (queue-cap, sort-throttle, history-delegation, recent-cap) + Log-Recovery
  • 3.3.1 — removeFromQueueOnDone coalesced via microtask (kein O(N²) mehr bei done-Bursts)
  • 3.3.2 — fileuploader.log Auto-Rotation bei 50 MB (max 3 Backups: .1 .2 .3)

Open items (priorisiert)

Stabilität

  • _jobLogCollector (main.js) — wird nur bei start-upload geleert, nicht bei batch-done. Bei vielen Batches ohne neuen start-upload wächst es. Cleanup bei batch-done für jobs die nicht mehr in queueJobs sind.

Performance

  • applyQueueSelectionClasses (renderer/app.js:891) — tbody.querySelectorAll bei jedem Klick. Bei 5000-Jobs-Queue O(N) per click. Cache last rendered range.

Code-Qualität

  • Test-Coverage für 3.3.0 — keine Tests für die queue-cap-prune-Logik in handleBatchDone, sortQueueJobs dynamic-throttle, log-error-recovery.

UX-Politur

  • CSS .queue-row transition auf :hover scopen (aktuell auf jedem row → unnötiger Repaint bei Status-Flip).
  • Module-level Sets _sessionTrackedJobs/_sessionDoneJobs/_completedUploadKeys werden nie geleert — minor memory growth.

Loop-Notes

  • Cron-Job 01e33ae1 läuft alle 30min (:07/:37), Session-only.
  • Pro Iteration: GENAU EIN Issue. Auto-Release bei grünen Tests. Boundary: keine Features, keine Major-Refactors.