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>
20 lines
615 B
C#
20 lines
615 B
C#
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 { }
|
|
}
|
|
}
|