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:
@@ -248,6 +248,25 @@ public class NotificationReportPageTests : BunitContext
|
||||
// with that id comes back.
|
||||
// ─────────────────────────────────────────────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
public void NotificationReport_CorrelationIdQuery_DashedGuid_IsNormalisedToTheStoredNForm()
|
||||
{
|
||||
// Notify.Send mints NotificationId as Guid "N"; the Flow Debugger / Audit Log hold the
|
||||
// same value as a Guid and may render it "D". Either spelling must filter to the row.
|
||||
var guid = Guid.Parse("a72bc17f-b681-43eb-a364-e136c54d51c0");
|
||||
var nav = (BunitNavigationManager)Services.GetRequiredService<NavigationManager>();
|
||||
nav.NavigateTo($"/notifications/report?correlationId={guid:D}");
|
||||
|
||||
var cut = Render<NotificationReportPage>();
|
||||
|
||||
cut.WaitForAssertion(() =>
|
||||
{
|
||||
Assert.Single(_queryRequests);
|
||||
Assert.Equal(guid.ToString("N"), _queryRequests[0].NotificationIdFilter);
|
||||
Assert.Contains(guid.ToString("N")[..12], cut.Find("[data-test='notif-filter-notification']").TextContent);
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NotificationReport_CorrelationIdQuery_SeedsTheNotificationFilterAndAutoOpensDetail()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user