feat(claude-do): UI-Prozess loggt auf Platte (ui-.log) + fehlgeschlagene Hub-

## Problem
Beim DeleteTask-Bug (Fix 352aaa52) gab es null Spuren: Der UI-Prozess (ClaudeDo.App) hat gar kein File-Logging (weder Serilog noch `Microsoft.Extensions.Logging` sind in App/Ui referenziert), und im Worker loggt SignalR fehlgeschlagene Hub-Invocations nur auf Debug (`Microsoft.AspNetCore` steht in `src/ClaudeDo.Worker/Program.cs` Z. 60 auf Warning). Die Ursache ließ sich nur finden, ind

ClaudeDo-Task: d2ae3831-733f-4d40-93d7-70c93da11590
This commit is contained in:
Mika Kuns
2026-09-28 13:27:21 +02:00
parent 352aaa525b
commit 57dd676672
8 changed files with 93 additions and 2 deletions
@@ -0,0 +1,27 @@
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
namespace ClaudeDo.Worker.Hub;
/// <summary>
/// Logs a Warning for any exception thrown out of a hub method body, so a failed UI action
/// leaves a trace in <c>worker-.log</c> instead of only a generic error at the caller.
/// Does NOT see an argument-binding failure (e.g. a stray CancellationToken parameter) — SignalR
/// rejects those while parsing the invocation message, before a hub method is ever dispatched.
/// </summary>
public sealed class HubExceptionLoggingFilter(ILogger<HubExceptionLoggingFilter> logger) : IHubFilter
{
public async ValueTask<object?> InvokeMethodAsync(
HubInvocationContext invocationContext, Func<HubInvocationContext, ValueTask<object?>> next)
{
try
{
return await next(invocationContext);
}
catch (Exception ex)
{
logger.LogWarning(ex, "Hub method {Method} failed", invocationContext.HubMethodName);
throw;
}
}
}