From 4b6842d03448e4b1887d3c52f5a1c7486547dbb2 Mon Sep 17 00:00:00 2001 From: sudacode Date: Sun, 4 Oct 2026 17:13:10 -0700 Subject: [PATCH] fix(setup): label missing launcher "Not set up" instead of "Not installed" (#284) --- changes/setup-launcher-badge-label.md | 4 +++ .../runtime/first-run-setup-window.test.ts | 36 +++++++++++++++++++ src/main/runtime/first-run-setup-window.ts | 4 ++- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 changes/setup-launcher-badge-label.md diff --git a/changes/setup-launcher-badge-label.md b/changes/setup-launcher-badge-label.md new file mode 100644 index 00000000..0bed41f1 --- /dev/null +++ b/changes/setup-launcher-badge-label.md @@ -0,0 +1,4 @@ +type: fixed +area: setup + +- First-run setup now labels a missing command-line launcher "Not set up" instead of "Not installed", so the AppImage catalog test no longer reads the setup window as an error screen. diff --git a/src/main/runtime/first-run-setup-window.test.ts b/src/main/runtime/first-run-setup-window.test.ts index 024ff27e..eb2de879 100644 --- a/src/main/runtime/first-run-setup-window.test.ts +++ b/src/main/runtime/first-run-setup-window.test.ts @@ -324,6 +324,42 @@ test('buildFirstRunSetupHtml reports a broken included runtime in the optional l ); }); +// The AppImage catalog test OCRs this fresh-install state and fails on "not installed". +test('buildFirstRunSetupHtml labels a missing launcher without error-message wording', () => { + const html = buildFirstRunSetupHtml({ + configReady: true, + dictionaryCount: 0, + canFinish: false, + externalYomitanConfigured: false, + pluginStatus: 'required', + pluginInstallPathSummary: null, + mpvExecutablePath: '', + mpvExecutablePathStatus: 'blank', + windowsMpvShortcuts: { + supported: false, + startMenuEnabled: true, + desktopEnabled: true, + startMenuInstalled: false, + desktopInstalled: false, + status: 'optional', + }, + commandLineLauncher: createCommandLineLauncherSnapshot({ + bun: { + status: 'ready', + commandPath: '/tmp/.mount_SubMiner/resources/bun', + version: '1.3.0', + installMethod: null, + installCommand: null, + message: null, + }, + }), + message: null, + }); + + assert.match(html, /Not set up<\/span>/); + assert.doesNotMatch(html, /not installed/i); +}); + test('buildFirstRunSetupHtml disables launcher install when no target is installable', () => { const html = buildFirstRunSetupHtml({ configReady: true, diff --git a/src/main/runtime/first-run-setup-window.ts b/src/main/runtime/first-run-setup-window.ts index f0135e8a..bd91fac9 100644 --- a/src/main/runtime/first-run-setup-window.ts +++ b/src/main/runtime/first-run-setup-window.ts @@ -77,7 +77,9 @@ function getLauncherStatusLabel(status: LauncherSnapshot['status']): string { case 'installed_bun_missing': return 'Unavailable'; case 'not_installed': - return 'Not installed'; + // Not "Not installed": the AppImage catalog test OCRs the fresh-install + // setup window and fails on that phrase as an error message. + return 'Not set up'; case 'not_on_path': return 'Not on PATH'; case 'shadowed':