feat(central-ui): Flow Debugger status strip log counts + inline-truncation notes; detail cross-step selection

This commit is contained in:
Joseph Doherty
2026-09-09 12:38:35 -04:00
parent 7d76bf96d5
commit 032598607e
6 changed files with 250 additions and 8 deletions
@@ -253,7 +253,7 @@ public sealed class FlowDebugServiceTests : IDisposable
Assert.IsType<DiscardSiteCallRequest>(Assert.Single(_siteCallRequests));
}
private static string SuccessPayload(int events, bool completed = true, bool truncated = false)
private static string SuccessPayload(int events, bool completed = true, bool truncated = false, bool logsTruncated = false)
{
var root = Guid.NewGuid();
var child = Guid.NewGuid();
@@ -273,10 +273,36 @@ public sealed class FlowDebugServiceTests : IDisposable
occurredAtUtc: t0.AddMilliseconds(2), target: "S", executionId: child, parentExecutionId: root,
sourceSiteId: "site-a", sourceInstanceId: "I", durationMs: 80));
var result = new FlowDebugRunResult(root, completed, null, null, list, truncated, t0, t0.AddSeconds(1));
var result = new FlowDebugRunResult(root, completed, null, null, list, truncated, t0, t0.AddSeconds(1), logsTruncated);
return JsonSerializer.Serialize(result, ServerJson);
}
[Fact]
public async Task RunMethod_LogsTruncated_RidesOntoTheOutcomeAndTheGraph()
{
// Step logs D7: the run result's inline log-truncation flag is the page's only way to
// know the lines it holds are incomplete — carry it onto the outcome AND into the graph.
var svc = CreateService(new ManagementSuccess("c", SuccessPayload(events: 3, logsTruncated: true)));
var outcome = await svc.RunMethodAsync(4, null);
Assert.True(outcome.Success);
Assert.True(outcome.LogsTruncated);
Assert.True(outcome.Graph!.LogsTruncated);
Assert.True(outcome.Raw!.LogsTruncated);
}
[Fact]
public async Task RunMethod_NoLogTruncation_LeavesTheFlagFalse()
{
var svc = CreateService(new ManagementSuccess("c", SuccessPayload(events: 3)));
var outcome = await svc.RunMethodAsync(4, null);
Assert.False(outcome.LogsTruncated);
Assert.False(outcome.Graph!.LogsTruncated);
}
[Fact]
public async Task RunMethod_HolderNull_ReportsServiceUnavailable()
{