Stability + UX cycle.
- saveConfig and writeQueueToDisk now use openSync+writeSync+fsyncSync+
closeSync+renameSync via writeFileAtomicSync. Survives power loss
between write and rename (used to leave the renamed file empty and
silently reset config / queue on next launch).
- Per-item claimedFilenames map fixes the parallel-download race where
one item finishing wiped sibling claims and let a third item collide
on the same output path.
- Renderer queue lookup by [data-id] (no more index drift), active tab
persisted in localStorage, Escape closes the topmost open modal,
Ctrl/Cmd+1..5 jumps tabs.
See docs/IMPROVEMENT_LOG.md for the dated rationale and regression run.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Renderer-side polish bundle.
- updateQueueItemProgress now looks up items by [data-id] selector instead
of array index. Resilient against queue/DOM divergence between renders.
Determinate vs indeterminate progress logic tightened.
- Active tab persisted to localStorage on every showTab; restored on init
via loadPersistedActiveTab (whitelisted to known tab IDs so a future
rename cannot strand the user on a missing tab). Page title now only
shows the streamer name on the VODs tab — it no longer leaks into
Settings / Cutter / Merge.
- Escape closes the topmost open modal regardless of focus (clip dialog,
template guide, update modal — in that priority order).
- Ctrl+1..5 (Cmd+1..5 on macOS) jumps directly to a tab. The existing Del
(delete selected) and S (start/pause) shortcuts still work and remain
blocked while typing in inputs.
Adds docs/IMPROVEMENT_LOG.md (new, single dated section for this cycle).
Build: tsc clean. Full smoke suite green (failures: [], runtimeIssues: []).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two server-side correctness fixes for parallel downloads and crash recovery.
1. Atomic file writes survive power loss / crash mid-write.
saveConfig and writeQueueToDisk used writeFileSync + renameSync. Node's
writeFileSync does NOT fsync — a power loss between write and rename can
leave the renamed file empty or truncated, and the next launch silently
falls back to defaults / empty queue.
New writeFileAtomicSync helper: openSync + writeSync + fsyncSync +
closeSync + renameSync (with the existing Windows copy fallback). fsync
failure is non-fatal (some FS reject it) but file ordering is preserved.
2. Per-item claimed filenames fix the parallel-download race.
With max 2 parallel downloads, processOneQueueItem.finally was calling
claimedFilenames.clear() — wiping every parallel item's claims when any
one finished. In the window between an active item claiming a filename
and streamlink actually writing the first bytes, a third item could
compute the same filename and both downloads would race the same path.
New Map<itemId, Set<filename>> tracks claims per active download.
ensureUniqueFilename(path, itemId) registers per-item;
releaseClaimedFilenamesForItem(itemId) removes only that item's claims.
splitMergedFile gained an itemId parameter for the same reason. The
dead releaseClaimedFilename(path) function was removed.
Build: tsc clean. Tests: smoke + smoke-template-guide + smoke-full + merge-split
+ update-version-logic all pass. No new ESLint warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Set app.setAppUserModelId('com.twitch.vodmanager') on startup so Windows
notifications display the correct app name.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The old formula (avgSpeed * expectedDurationSeconds) simplified to just
(videoDuration - elapsedTime), showing 59min ETA for a 60min part after
1min of downloading. Now uses streamlink's actual progress percentage:
ETA = (elapsed / percent) * (100 - percent), which reflects real download
speed rather than video length.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use dataTransfer.effectAllowed='none' instead of preventDefault() for dragstart
(preventDefault does not cancel dragstart events per HTML spec)
- Clear claimedFilenames Set in processOneQueueItem finally block to prevent
stale claims from blocking re-downloads of same VODs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Queue selector uses min-width instead of fixed width for double-digit numbers
- Drag-start handler validates item is still pending before allowing drag
- ensureUniqueFilename uses in-memory claim set to prevent TOCTOU race
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move streamlink/ffmpeg path discovery, bundled tool management,
auto-install logic, and related caches (~430 lines) into a
dedicated tools module. main.ts uses dependency injection for
debug logging and directory paths to keep the module decoupled.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add parallel_downloads config option (1 or 2) with Settings UI dropdown.
Refactor processQueue to run concurrent download slots using Promise.race,
extracting per-item logic into processOneQueueItem. Add per-item process
tracking via activeDownloads Map and cancelledItemIds Set so cancel/pause
correctly terminates all active downloads.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Queue section now uses flex layout with flex-shrink:0 on action buttons,
so they stay visible regardless of queue list length.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace checkboxes with numbered selectors (1, 2, 3...) that show the
merge order. Click order determines VOD sequence in the merged result.
Chronological auto-sort removed — user controls the order.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12-task step-by-step plan with exact code, file paths, and line numbers.
Reviewed and fixed 5 issues (locale schema, language-awareness, TypeScript
union types, execSync import, cleanup scope).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comprehensive design for combining multiple queue VODs into a merge group,
downloading them, merging via FFmpeg, and splitting into time-based parts.
Reviewed through two spec-review iterations fixing 14 issues.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace unreliable emoji flags in the native select with a custom language picker that renders real CSS flag icons, improve retry button naming/tooltips, and keep quick/full e2e coverage green after the UI change.
Introduce a longer smoke-test-full workflow for validating queue, media tools, localization, and reliability flows in one pass, and document both quick and full test commands for contributors.
Expose a single runnable end-to-end test command for fast regression sweeps and update the smoke test to validate preflight and localization-aware clip errors reliably across language modes.
After exhaustive end-to-end validation, fix clip error localization in English mode and confirm full cutter/merge reliability with regenerated local media tests, then ship a patch release for immediate auto-update rollout.
Ship a major update that adds in-app preflight diagnostics with health badge, live debug log tooling, retry management, pause/resume downloads, queue reordering support, locale polish (flags + clearer retry wording), and extensive backend hardening for day-to-day stability.
Add an in-app preflight diagnostics center with optional auto-fix, introduce backend retry handling for failed downloads, provide live debug log viewing in settings, and expand queue controls with retry-failed actions while keeping language switching instant and locale data organized.
Move DE/EN translation content into separate renderer locale files, keep instant language switching, add locale-aware date/number formatting helpers, and set English as the default language for fresh installs.
Make English the initial language for fresh installations while keeping live DE/EN switching, and split locale dictionaries into dedicated per-language files for cleaner long-term translation maintenance.
Introduce a centralized renderer text dictionary with German and English locales, add a language selector in settings, and apply translations instantly across UI sections and dynamic status labels without requiring app restart.
Polish mixed-language labels across tabs by replacing leftover English terms (views, queue, cutter naming, clip heading) with consistent German wording so the interface reads uniformly end-to-end.
Align visible queue and clip messages to German terminology, remove remaining mixed English labels, and reuse resilient streamlink command resolution for clip downloads to keep behavior consistent across environments.
Remove duplicate part-progress wording in the queue by keeping part index in the meta line and using the progress line for transferred data/percent, while labeling throughput as Geschwindigkeit for clearer download monitoring.
Improve first-phase download feedback by emitting explicit preflight/start statuses from the backend so the queue no longer appears to jump between ambiguous placeholder texts during active transfers.
Defer heavy tool auto-install checks from startup to first-use paths to avoid long launch stalls, and merge backend queue snapshots with in-flight renderer progress state so download status text no longer jumps between placeholder states.
Download and extract streamlink/ffmpeg dependencies into ProgramData when unavailable so fresh server installs can start downloads without manual tool setup, while preserving detailed debug logging for failures.
Resolve streamlink execution more robustly by trying direct binary and Python module launchers, then return actionable error messages when streamlink is missing on server environments.
Keep queue visibility synced while downloads run, show richer per-item progress/error states in the sidebar, and write backend downloader diagnostics to ProgramData debug.log so instant start/stop failures can be traced on user systems.
Allow streamer/VOD browsing without Twitch credentials via public GraphQL fallback, harden queue visibility by syncing renderer state with backend updates, and ship a comprehensive Astro/MDX documentation set similar to established downloader projects.