The fileuploader.log rotation introduced in 3.3.2 lived inline in main.js — fine for the runtime path, but it required electron's `app` to even reach the function under test. Pull the rotation logic into lib/log-rotation.js (pure fs/path, no electron deps) and cover it properly: - ENOENT (file missing) → no-op - Below cap → no-op - Over cap → live → .1, returns true - Existing backups shift up: .1 → .2, .2 → .3 - At maxBackups limit → oldest dropped, others shift, live becomes .1 - Idempotent: rotating twice keeps the chain consistent - maxBackups=1: never grows past .1 - Invalid maxBytes (0/negative/NaN) → safe no-op - Provided debug callback receives a "rotated" message - File without extension still rotates correctly main.js now imports `maybeRotateLogFile` and calls it directly. 97/97 tests pass.
1.5 KiB
1.5 KiB
Verbesserungs-Loop — open items
Released
- ✅ 3.3.0 — Performance-Fixes (queue-cap, sort-throttle, history-delegation, recent-cap) + Log-Recovery
- ✅ 3.3.1 —
removeFromQueueOnDonecoalesced via microtask (kein O(N²) mehr bei done-Bursts) - ✅ 3.3.2 —
fileuploader.logAuto-Rotation bei 50 MB (max 3 Backups: .1 .2 .3) - ✅ 3.3.3 —
_jobLogCollectorCap auf 1000 tracked jobs (FIFO-eviction beim Überschreiten) - ✅ 3.3.4 —
applyQueueSelectionClasses+applyRecentSelectionClassesnutzengetElementsByClassName(live HTMLCollection statt querySelectorAll re-query bei jedem Klick) - ✅ 3.3.5 — Log-Rotation extrahiert nach
lib/log-rotation.js+ 10 neue Unit-Tests (cap, shift, eviction, idempotency, maxBackups=1, invalid input, no-extension)
Open items (priorisiert)
Code-Qualität
- queue-cap-prune-Logik (3.3.0 handleBatchDone) — DOM-abhängig, bräuchte jsdom; deferred bis sich anderes lohnt
- sortQueueJobs dynamic-throttle (3.3.0) — modul-state-abhängig im renderer; deferred
UX-Politur
- CSS
.queue-rowtransition auf:hoverscopen (aktuell auf jedem row → unnötiger Repaint bei Status-Flip). - Module-level Sets
_sessionTrackedJobs/_sessionDoneJobs/_completedUploadKeyswerden nie geleert — minor memory growth.
Loop-Notes
- Cron-Job
01e33ae1läuft alle 30min (:07/:37), Session-only. - Pro Iteration: GENAU EIN Issue. Auto-Release bei grünen Tests. Boundary: keine Features, keine Major-Refactors.