fix(app): what is left of the virtual monitor's driver stays ours and can be removed from the screen

- a failed install forgets the driver (registry value, settings folder) only when its clean-up
  left no device and no package, and never when it was ours before; otherwise it stays ours and
  the error gives both the install's reason and that something is left to remove
- the driver status separates a usable monitor (installed) from what this app left without one
  (leftover) and names the button (action): uninstall for both, so a removal whose package step
  failed can be retried from the features screen
- pure rules after_failed_install and driver_status with unit tests; checked again on the win-ci
  VM: a declined install leaves nothing, then install and uninstall

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-14 03:00:54 +09:00
parent cfab18a47e
commit 9b53af169d
4 changed files with 93 additions and 29 deletions

View File

@@ -392,12 +392,13 @@ async function displayDriverCard() {
const label = h("span");
const btn = h("button", { class: "btn" });
const show = (s) => {
label.textContent = s.installed ? "설치됨" : s.other ? "다른 프로그램의 같은 드라이버가 있어 쓰지 않습니다" : "설치되지 않음";
btn.textContent = s.installed ? "드라이버 제거" : "드라이버 설치";
btn.disabled = s.other;
label.textContent = s.installed ? "설치됨" : s.leftover ? "정리하지 못한 것이 남아 있습니다. 제거를 눌러 주세요"
: s.other ? "다른 프로그램의 같은 드라이버가 있어 쓰지 않습니다" : "설치되지 않음";
btn.textContent = s.action === "uninstall" ? "드라이버 제거" : "드라이버 설치";
btn.disabled = !s.action;
btn.onclick = async () => {
btn.disabled = true;
try { show(await api(s.installed ? "display_driver_uninstall" : "display_driver_install")); toast("완료했습니다"); }
try { show(await api(`display_driver_${s.action}`)); toast("완료했습니다"); }
catch (e) { fail(e); show(await api("display_driver_status")); }
};
};