fix(central-ui): notification deep link and relay use the stored N-form NotificationId

Notify.Send mints NotificationId as Guid "N" (no dashes) and the outbox parses it back into
the audit row's CorrelationId, so the Flow Debugger's Notify node linked and relayed a "D"
string the Notifications table never matches (found live: the report opened empty). The
link and RetryNotificationRequest now use "N", and the Notification report normalises any
Guid-shaped ?correlationId= to "N" so Audit Log and Flow Debugger callers both land.

Claude-Session: https://claude.ai/code/session_01NcMG6xXdsJbmD2wYAgkK29
This commit is contained in:
Joseph Doherty
2026-09-06 11:16:24 -04:00
parent 1f8c5810ca
commit 91d14ebdee
6 changed files with 29 additions and 6 deletions
@@ -223,7 +223,7 @@
private string? ReportHref
=> Step is { CorrelationId: { } c } s && IsOutbound && s.Lifecycle is { Count: > 0 }
? s.Kind == FlowStepKind.Notify
? $"/notifications/report?correlationId={c:D}"
? $"/notifications/report?correlationId={c:N}" // NotificationId is minted as "N" (no dashes) — see ScriptRuntimeContext.Notify
: $"/site-calls/report?correlationId={c:D}"
: null;
@@ -515,7 +515,9 @@
var candidate = values.ToString()?.Trim();
if (!string.IsNullOrEmpty(candidate) && candidate.Length <= MaxNotificationIdFilterLength)
{
_notificationIdFilter = candidate;
// NotificationId is minted as a Guid in "N" form (no dashes); a caller that only has the
// audit row's CorrelationId (a Guid, usually rendered "D") must still land on the row.
_notificationIdFilter = Guid.TryParse(candidate, out var guid) ? guid.ToString("N") : candidate;
}
}
}
@@ -225,7 +225,9 @@ public sealed class FlowDebugService : IFlowDebugService
if (isNotify)
{
var notificationId = c.ToString("D");
// Notify.Send mints NotificationId as Guid "N" (no dashes; ScriptRuntimeContext) and the
// outbox parses it back into the audit row's CorrelationId — so the relay key is "N".
var notificationId = c.ToString("N");
if (retry)
{
var r = await _comms.RetryNotificationAsync(new RetryNotificationRequest(corr, notificationId, requestedBy), ct);