Go to file
xRangerDE 379048f191 harden: defensive parsing for config + queue, normalize stale downloading
- loadConfig now checks isPlainObject(parsed) before spreading over
  defaults. Non-object JSON (array, primitive, null) is logged and the
  app falls back to defaults instead of silently polluting the config
  with array indices or dropping values.

- loadQueue runs every entry through sanitizeQueueItem which validates
  the status enum, clamps progress to [0, 100], validates customClip
  and mergeGroup shapes (with sanitizeCustomClip / sanitizeMergeGroup
  helpers), and demotes stale status="downloading" entries to "pending"
  with progress=0 on cold start. The previous filter only checked
  typeof id/url/status === "string" and let through whatever shape
  customClip / mergeGroup happened to have.

- The stale-downloading normalisation fixes a real user trap: after a
  hard kill mid-download, the queue persisted status="downloading", but
  no download was running on next launch and start-download only resumed
  paused items, leaving "downloading" entries stuck.

- Bonus: CustomClip and MergeGroupItem imports now have call sites
  (previously unused-import warnings).

docs/IMPROVEMENT_LOG.md gains a Cycle 2 dated section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 15:29:28 +02:00
build chore: migrate repository to Codeberg, bump version to 4.2.0, update update logic 2026-03-01 20:23:21 +01:00
docs harden: defensive parsing for config + queue, normalize stale downloading 2026-05-03 15:29:28 +02:00
scripts infra: release_gitea.mjs --skip-build + playwright in devDeps 2026-05-03 15:29:17 +02:00
src harden: defensive parsing for config + queue, normalize stale downloading 2026-05-03 15:29:28 +02:00
.gitignore chore: migrate repository to Codeberg, bump version to 4.2.0, update update logic 2026-03-01 20:23:21 +01:00
eslint.config.mjs chore: add ESLint with security plugin, fix code quality warnings 2026-03-22 14:55:35 +01:00
package-lock.json infra: release_gitea.mjs --skip-build + playwright in devDeps 2026-05-03 15:29:17 +02:00
package.json infra: release_gitea.mjs --skip-build + playwright in devDeps 2026-05-03 15:29:17 +02:00
README_AI_RELEASE.md docs: add AI release runbook for gitea 2026-03-05 01:04:18 +01:00
tsconfig.json chore: migrate repository to Codeberg, bump version to 4.2.0, update update logic 2026-03-01 20:23:21 +01:00