feat(ui): live task updates from worker events + planning polish

Wire TasksIslandViewModel to TaskUpdated/WorktreeUpdated/TaskMessage worker
events so rows refresh without a full reload; add ForegroundHelper to permit
wt.exe to take foreground on planning launch; misc UI polish on lists, task
rows and settings modal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-04-24 11:12:27 +02:00
parent e455d85578
commit b7c60f5838
18 changed files with 200 additions and 56 deletions

View File

@@ -0,0 +1,19 @@
using System.Runtime.InteropServices;
namespace ClaudeDo.Ui.Services;
internal static class ForegroundHelper
{
private const int ASFW_ANY = -1;
[DllImport("user32.dll", SetLastError = true)]
private static extern bool AllowSetForegroundWindow(int dwProcessId);
// Grants any process the right to take foreground on next SetForegroundWindow call.
// Used before RPCs that cause a helper process (e.g. wt.exe) to spawn a new window.
public static void AllowAny()
{
if (!OperatingSystem.IsWindows()) return;
try { AllowSetForegroundWindow(ASFW_ANY); } catch { }
}
}

View File

@@ -2,6 +2,10 @@ namespace ClaudeDo.Ui.Services;
public interface IWorkerClient
{
event Action<string>? TaskUpdatedEvent;
event Action<string>? WorktreeUpdatedEvent;
event Action<string, string>? TaskMessageEvent;
Task WakeQueueAsync();
Task StartPlanningSessionAsync(string taskId, CancellationToken ct = default);
Task ResumePlanningSessionAsync(string taskId, CancellationToken ct = default);