feat(installer): add Diagnose section to SettingsWindow

Re-runs the environment checks against the installed configuration
(worker.config.json + detected install dir) without blocking navigation
and without auto-running on window open, only on a "Recheck" click.

Extracted the check-row rendering and check-run logic (busy state,
summary, Recheck command) out of SystemCheckPage into a shared
Checks/CheckListViewModel + Checks/CheckListView, composed by both
SystemCheckPage (wizard) and the new DiagnosePage (settings) instead
of duplicating it.
This commit is contained in:
mika kuns
2026-08-06 08:22:45 +02:00
parent b3a8373c70
commit 7e1b1177de
15 changed files with 529 additions and 205 deletions
@@ -1,4 +1,6 @@
using ClaudeDo.Installer.Checks;
using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Pages.DiagnosePage;
using ClaudeDo.Installer.Pages.PathsPage;
using ClaudeDo.Installer.Pages.ServicePage;
using ClaudeDo.Installer.Pages.SystemCheckPage;
@@ -40,4 +42,33 @@ public class PageResolverTests
Assert.False(page.ShowInSettings);
}
[Fact]
public void DiagnosePage_is_shown_in_settings_but_not_in_the_wizard()
{
var context = new InstallContext();
var page = new DiagnosePageViewModel(context, () => throw new InvalidOperationException(), () => new InstallerWorkerConfig());
Assert.True(page.ShowInSettings);
Assert.False(page.ShowInWizard);
}
[Fact]
public void DiagnosePage_appears_in_the_settings_sidebar_after_the_other_settings_pages()
{
var context = new InstallContext();
var pages = new IInstallerPage[]
{
new PathsPageViewModel(context),
new ServicePageViewModel(context),
new UiSettingsPageViewModel(context),
new DiagnosePageViewModel(context, () => throw new InvalidOperationException(), () => new InstallerWorkerConfig()),
};
var resolver = new PageResolver(pages);
var settingsPages = resolver.SettingsPages.ToList();
Assert.Equal(4, settingsPages.Count);
Assert.IsType<DiagnosePageViewModel>(settingsPages[^1]);
}
}