fix(ui): carry SourceNode on SiteCallDetail + NotificationDetail records

The Site Calls and Notifications detail modals were reading SourceNode from
the summary record (d.SourceNode) while every other field read from the
detail record (det.X). The pattern works today because the modal always
opens via a row click that pre-loads the summary, but a future drill-in
from a deep link or refresh path could leave the summary stale or null and
the field would render blank or wrong.

Add SourceNode to both detail records, project it through the actor's
ToDetail mapping, and switch the razor markup to read det.SourceNode. Now
the modal binds uniformly to the detail record across all fields.
This commit is contained in:
Joseph Doherty
2026-05-23 18:37:53 -04:00
parent 8bf84fb7f3
commit c754666a3d
8 changed files with 20 additions and 7 deletions

View File

@@ -354,6 +354,7 @@ public class NotificationOutboxActorQueryTests : TestKit
row.ResolvedTargets = "[\"ops@example.com\",\"oncall@example.com\"]";
row.TypeData = "{\"priority\":\"high\"}";
row.SourceScript = "HighLevelAlarm.csx";
row.SourceNode = "node-a";
row.SiteEnqueuedAt = DateTimeOffset.UtcNow.AddMinutes(-5);
row.DeliveredAt = DateTimeOffset.UtcNow;
_repository.GetByIdAsync(row.NotificationId, Arg.Any<CancellationToken>()).Returns(row);
@@ -377,6 +378,10 @@ public class NotificationOutboxActorQueryTests : TestKit
Assert.Equal("instance-42", detail.SourceInstanceId);
Assert.Equal(2, detail.RetryCount);
Assert.Equal("transient blip", detail.LastError);
// SourceNode flows through the detail projection so the report detail
// modal binds uniformly to the detail record (was previously read off
// the summary).
Assert.Equal("node-a", detail.SourceNode);
}
[Fact]