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:
19
src/ClaudeDo.Ui/Services/ForegroundHelper.cs
Normal file
19
src/ClaudeDo.Ui/Services/ForegroundHelper.cs
Normal 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 { }
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user