!WIP: General changes

This commit is contained in:
Mika Kuns
2026-08-10 14:52:44 +02:00
parent 6a2a19cc9e
commit 0bfb1f5657
2 changed files with 20 additions and 6 deletions
+3
View File
@@ -1,4 +1,7 @@
{ {
"worktree": {
"baseRef": "head"
},
"permissions": { "permissions": {
"allow": [ "allow": [
"Bash(git add:*)", "Bash(git add:*)",
+17 -6
View File
@@ -52,8 +52,14 @@ sealed class Program
// Dispose the container so WorkerClient.DisposeAsync runs — // Dispose the container so WorkerClient.DisposeAsync runs —
// cancels the retry loop and closes the SignalR connection cleanly // cancels the retry loop and closes the SignalR connection cleanly
// instead of abandoning it. // instead of abandoning it.
try { services.DisposeAsync().AsTask().GetAwaiter().GetResult(); } try
catch { /* best effort on shutdown */ } {
services.DisposeAsync().AsTask().GetAwaiter().GetResult();
}
catch
{
/* best effort on shutdown */
}
} }
} }
@@ -102,7 +108,9 @@ sealed class Program
sc.AddSingleton<IWorkerClient>(sp => sp.GetRequiredService<WorkerClient>()); sc.AddSingleton<IWorkerClient>(sp => sp.GetRequiredService<WorkerClient>());
// Release check + installer update // Release check + installer update
sc.AddSingleton<HttpClient>(_ => new HttpClient { Timeout = TimeSpan.FromSeconds(10) }); sc.AddSingleton<HttpClient>(_ =>
new HttpClient(new SocketsHttpHandler { PooledConnectionLifetime = TimeSpan.FromMinutes(5) })
{ Timeout = TimeSpan.FromSeconds(10) });
sc.AddSingleton<IReleaseClient>(sp => new ReleaseClient(sp.GetRequiredService<HttpClient>())); sc.AddSingleton<IReleaseClient>(sp => new ReleaseClient(sp.GetRequiredService<HttpClient>()));
sc.AddSingleton<InstallerLocator>(); sc.AddSingleton<InstallerLocator>();
sc.AddSingleton<WorkerLocator>(); sc.AddSingleton<WorkerLocator>();
@@ -124,7 +132,8 @@ sealed class Program
sc.AddTransient<DiffViewerViewModel>(); sc.AddTransient<DiffViewerViewModel>();
sc.AddTransient<Func<DiffViewerViewModel>>(sp => () => sp.GetRequiredService<DiffViewerViewModel>()); sc.AddTransient<Func<DiffViewerViewModel>>(sp => () => sp.GetRequiredService<DiffViewerViewModel>());
sc.AddTransient<WorktreesOverviewModalViewModel>(); sc.AddTransient<WorktreesOverviewModalViewModel>();
sc.AddTransient<Func<WorktreesOverviewModalViewModel>>(sp => () => sp.GetRequiredService<WorktreesOverviewModalViewModel>()); sc.AddTransient<Func<WorktreesOverviewModalViewModel>>(sp =>
() => sp.GetRequiredService<WorktreesOverviewModalViewModel>());
sc.AddTransient<MergeHelperSelectionModalViewModel>(); sc.AddTransient<MergeHelperSelectionModalViewModel>();
sc.AddSingleton<IPrimeScheduleApi, WorkerPrimeScheduleApi>(); sc.AddSingleton<IPrimeScheduleApi, WorkerPrimeScheduleApi>();
sc.AddSingleton<INotesApi, WorkerNotesApi>(); sc.AddSingleton<INotesApi, WorkerNotesApi>();
@@ -137,9 +146,11 @@ sealed class Program
sc.AddTransient<RepoImportModalViewModel>(); sc.AddTransient<RepoImportModalViewModel>();
sc.AddTransient<Func<RepoImportModalViewModel>>(sp => () => sp.GetRequiredService<RepoImportModalViewModel>()); sc.AddTransient<Func<RepoImportModalViewModel>>(sp => () => sp.GetRequiredService<RepoImportModalViewModel>());
sc.AddTransient<WeeklyReportModalViewModel>(); sc.AddTransient<WeeklyReportModalViewModel>();
sc.AddTransient<Func<WeeklyReportModalViewModel>>(sp => () => sp.GetRequiredService<WeeklyReportModalViewModel>()); sc.AddTransient<Func<WeeklyReportModalViewModel>>(sp =>
() => sp.GetRequiredService<WeeklyReportModalViewModel>());
sc.AddTransient<UsageMonitorModalViewModel>(); sc.AddTransient<UsageMonitorModalViewModel>();
sc.AddTransient<Func<UsageMonitorModalViewModel>>(sp => () => sp.GetRequiredService<UsageMonitorModalViewModel>()); sc.AddTransient<Func<UsageMonitorModalViewModel>>(sp =>
() => sp.GetRequiredService<UsageMonitorModalViewModel>());
sc.AddSingleton<Func<string, ClaudeDo.Ui.ViewModels.Conflicts.ConflictResolverViewModel>>(sp => sc.AddSingleton<Func<string, ClaudeDo.Ui.ViewModels.Conflicts.ConflictResolverViewModel>>(sp =>
taskId => new ClaudeDo.Ui.ViewModels.Conflicts.ConflictResolverViewModel( taskId => new ClaudeDo.Ui.ViewModels.Conflicts.ConflictResolverViewModel(
sp.GetRequiredService<IWorkerClient>(), taskId)); sp.GetRequiredService<IWorkerClient>(), taskId));