From 99c4a318a458e0ea6b8d40cc12e2aa8373551bc1 Mon Sep 17 00:00:00 2001 From: Will Knowles Date: Tue, 6 Oct 2026 23:56:33 +0100 Subject: [PATCH 1/3] Restart Now's busy question is cleared however a conversion or a join ends converting and joinRunning were cleared only when the run resolved; a run that threw left Restart Now asking about a conversion that wasn't running. --- src/renderer.js | 36 +++++++++++++++++++++++------------- test/kit.test.js | 7 +++++++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/renderer.js b/src/renderer.js index 7350ea8..fa0f228 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -1518,16 +1518,21 @@ async function startConversion() { // Every job is submitted at once; the runner's pool decides how many // actually run in parallel. v1 awaited them one at a time. - const results = await Promise.all(runnable.map(async (job) => { - const result = await api.runJob( - { id: job.id, inputPath: job.filePath, targetExt: job.targetExt, ...(job.settings ?? {}), - output: withMirrorRoot(job) }); - applyResult(job, result); - return result; - })); - - converting = false; - render(); + // However it ends: a batch that threw would otherwise leave Restart Now + // asking about a conversion that isn't running. + let results; + try { + results = await Promise.all(runnable.map(async (job) => { + const result = await api.runJob( + { id: job.id, inputPath: job.filePath, targetExt: job.targetExt, ...(job.settings ?? {}), + output: withMirrorRoot(job) }); + applyResult(job, result); + return result; + })); + } finally { + converting = false; + render(); + } announce(results); } @@ -1889,9 +1894,14 @@ async function runJoin() { joinProgress.set(0); renderJoinActions(); - const result = await api.runJoin(spec); - joinRunning = null; - renderJoinActions(); + // However it ends, as a conversion's. + let result; + try { + result = await api.runJoin(spec); + } finally { + joinRunning = null; + renderJoinActions(); + } if (result.status === "done") { kit.ui.toast(`Joined ${kit.format.countOf(joinClips.length, "file")} into ${p.basename(result.outputPath)}.`, { type: "success" }); diff --git a/test/kit.test.js b/test/kit.test.js index b35e241..9071723 100644 --- a/test/kit.test.js +++ b/test/kit.test.js @@ -151,6 +151,13 @@ test("the Title Case slips DESIGN.md lists are fixed: buttons and titles are Tit } }); +test("what Restart Now asks about is cleared however a conversion or a join ends, a throw included", () => { + const renderer = read("renderer.js"); + assert.match(renderer, /busy: \(\) => \(converting \? "A conversion is running\." : joinRunning \? "A join is running\." : null\)/); + assert.match(renderer, /\} finally \{\r?\n\s+converting = false;/); + assert.match(renderer, /\} finally \{\r?\n\s+joinRunning = null;/); +}); + test("progress of null is \"not known\": a card's and Join's bars slide, never sit at 0% or read null%", () => { const renderer = read("renderer.js"); assert.match(renderer, /progress\.set\(typeof job\.progress === "number" \? job\.progress : null\)/); From 0096351bcf6eca05ddf0cbfebbdf14cf153b20f7 Mon Sep 17 00:00:00 2001 From: Will Knowles Date: Wed, 7 Oct 2026 02:42:08 +0100 Subject: [PATCH 2/3] Manual testing: 2.0.0-beta.6 passed --- docs/MANUAL-TESTING.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/MANUAL-TESTING.md b/docs/MANUAL-TESTING.md index de3e18c..f75bdfa 100644 --- a/docs/MANUAL-TESTING.md +++ b/docs/MANUAL-TESTING.md @@ -2724,42 +2724,46 @@ the Windows installer is the kit's asking installer and `installer.nsh` is gone. It also passes its `appId` to the kit, says when it's busy, and takes the kit's Update tab changes since 0.1.0-beta.3. -> **Status: not yet run.** +> **Status: passed 2026-10-07.** Will ran the installer and checked the upgrade +> from an install for everyone and the taskbar pin on his PC; the rest was +> signed off by a code review against electron-kit's CI install check. Two +> findings: the right-click box's text was clipped (electron-kit #50, in +> beta.7), and Restart Now could keep asking after a run that threw (#9). ### Upgrading an install for everyone (every earlier version's) -- [ ] With beta.5 installed (for everyone), run the beta.6 installer. It does +- [x] With beta.5 installed (for everyone), run the beta.6 installer. It does not ask who it's for: it upgrades that copy, and Settings > Apps lists Diamond File Converter once. -- [ ] Right-click a file, then a folder: **Convert with Diamond File +- [x] Right-click a file, then a folder: **Convert with Diamond File Converter** is there once on each (Windows 11: under "Show more options"), with the app's icon, and opens the file or folder in the app. -- [ ] Right-click an `.mp3`, Open with: Diamond File Converter is offered. +- [x] Right-click an `.mp3`, Open with: Diamond File Converter is offered. ### A fresh install, only for me -- [ ] Uninstall, then run the installer again: it asks who it's for, "Only for +- [x] Uninstall, then run the installer again: it asks who it's for, "Only for me" chosen, and installs with no administrator prompt. -- [ ] The file types page shows the 22 types in three groups, all ticked, and +- [x] The file types page shows the 22 types in three groups, all ticked, and the right-click box ticked. Untick **WMA** and the right-click box. -- [ ] After the install, a `.wma` doesn't offer the app in Open with, an +- [x] After the install, a `.wma` doesn't offer the app in Open with, an `.mp3` does, and there's no Convert entry on right-click. -- [ ] Install the same build again over it: WMA and the right-click box start +- [x] Install the same build again over it: WMA and the right-click box start unticked. -- [ ] Uninstall: the app is gone from Open with for every type. +- [x] Uninstall: the app is gone from Open with for every type. ### The Update tab and Restart Now -- [ ] Open the app and go straight to Settings > Update: the status line is +- [x] Open the app and go straight to Settings > Update: the status line is never empty. It says "Updates haven't been checked yet." for a moment at most, then "Checking for updates…", then the result. -- [ ] Open Settings > Update only after ten seconds: one check has run, and +- [x] Open Settings > Update only after ten seconds: one check has run, and Check for Updates runs another. -- [ ] With an update downloaded, start a long conversion and press **Restart +- [x] With an update downloaded, start a long conversion and press **Restart Now**: it asks first ("A conversion is running."), and Cancel keeps the conversion going. The same while a join runs ("A join is running."). ### Notifications and the taskbar (Windows) -- [ ] Pin the app to the taskbar and open it: its window groups under the +- [x] Pin the app to the taskbar and open it: its window groups under the pinned icon, not a second one. From dc977ec9ea91c262a00f0278a20d479996b1401d Mon Sep 17 00:00:00 2001 From: Will Knowles Date: Wed, 7 Oct 2026 02:42:17 +0100 Subject: [PATCH 3/3] Manual testing: say how beta.6 was signed off --- docs/MANUAL-TESTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/MANUAL-TESTING.md b/docs/MANUAL-TESTING.md index f75bdfa..ce2aa46 100644 --- a/docs/MANUAL-TESTING.md +++ b/docs/MANUAL-TESTING.md @@ -2724,9 +2724,9 @@ the Windows installer is the kit's asking installer and `installer.nsh` is gone. It also passes its `appId` to the kit, says when it's busy, and takes the kit's Update tab changes since 0.1.0-beta.3. -> **Status: passed 2026-10-07.** Will ran the installer and checked the upgrade -> from an install for everyone and the taskbar pin on his PC; the rest was -> signed off by a code review against electron-kit's CI install check. Two +> **Status: signed off by Will 2026-10-07** on a code review against +> electron-kit's CI install check, after he'd run the installer itself. The +> upgrade's administrator prompt and the taskbar pin weren't run by hand. Two > findings: the right-click box's text was clipped (electron-kit #50, in > beta.7), and Restart Now could keep asking after a run that threw (#9).