Multi-Hoster-Upload/tests
Administrator d720ba295a feat(log): add per-session log mode (one file per app launch)
Adds a third choice next to the existing single-file and per-day modes: a new
log file is created at every app start (process boot) and used until the app is
closed. A close → reopen of the app starts a new session, hence a new file.
File pattern: fileuploader-session-YYYY-MM-DD_HH-MM-SS-<pid>.log.

The boolean sessionLog field — misnamed: it actually toggled daily mode — is
replaced by a logMode enum: "single" | "daily" | "session". The misnomer made
the migration the trap to watch: existing users with sessionLog:true must land
on "daily", NOT "session". normalizeLogMode handles this and is unit-tested.

- lib/log-mode.js (new, pure, dual CJS/window export): normalizeLogMode +
  resolveLogFileName + format helpers. No fs, no Date.now() at call time.
- config-store.js: normalize at the single load() boundary so downstream
  readers consume logMode only. logMode is deliberately NOT seeded in DEFAULTS
  (would beat the legacy migration after merge).
- main.js: stamp SESSION_ID once at process start (with pid hedge against
  same-second restart collisions); getLogFilePath and buildFallbackLogName
  switch on mode via the lib. _resolveUploadLogTarget cache key is now just
  the primary path, which already encodes mode/date/session — self-invalidates.
- renderer: <select> with three German labels replaces the old checkbox;
  saveSettings writes logMode; index.html loads the lib so window.LogMode is
  available in renderSettings.
- Tests: 14 log-mode tests (incl. legacy-migration regression), 3 config-store
  tests (defaults, legacy migration, round-trip all three values). 200/200.

End-to-end simulated locally: two launches → two distinct session files; PID
hedge produces distinct names even within the same second.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 14:41:06 +02:00
..
account-auth.test.js fix(doodstream): upload via the doodapi API when an API key exists 2026-05-28 21:42:19 +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): add per-session log mode (one file per app launch) 2026-05-30 14:41:06 +02:00
doodstream-api-upload.test.js test(doodstream): end-to-end integration test for the API upload + recovery path 2026-05-28 22:20:21 +02:00
doodstream-upload.test.js fix(doodstream): web upload submits the live form's fields (not stale hardcoded) 2026-05-28 22:28:24 +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-mode.test.js feat(log): add per-session log mode (one file per app launch) 2026-05-30 14:41:06 +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 fix(upload): classify doodstream empty-form as hoster-transient (don't kill account) 2026-05-27 20:34:56 +02:00