feat(dashboard): show heartbeat, event-channel and replay-byte-cap options on Settings (mxaccessgw#219)

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 12:42:12 -05:00
parent 07badd139e
commit f77062f097
2 changed files with 34 additions and 2 deletions
@@ -95,10 +95,38 @@ public sealed class SettingsPageTagVisibilityRenderTests
Assert.Contains("""<th scope="row">Recent session limit</th><td>456</td>""", html, StringComparison.Ordinal);
}
private static async Task<string> RenderAsync(DashboardOptions dashboard)
/// <summary>
/// The heartbeat, event-channel and replay-byte-cap options (mxaccessgw#192, #172) reach the
/// page, each value in the row its own label names. Non-default values prove plumbing.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task SettingsPage_RendersHeartbeatEventChannelAndReplayByteCapOptions()
{
string html = await RenderAsync(new GatewayOptions
{
Worker = new WorkerOptions
{
HeartbeatCheckIntervalSeconds = 7,
HeartbeatStuckCeilingSeconds = 321,
EventChannelFullModeTimeoutMilliseconds = 4567,
},
Events = new EventOptions { ReplayBufferMaxBytes = 987654321 },
});
Assert.Contains("""<th scope="row">Heartbeat check interval</th><td>7 seconds</td>""", html, StringComparison.Ordinal);
Assert.Contains("""<th scope="row">Heartbeat stuck ceiling</th><td>321 seconds</td>""", html, StringComparison.Ordinal);
Assert.Contains("""<th scope="row">Event channel full-mode timeout</th><td>4567 ms</td>""", html, StringComparison.Ordinal);
Assert.Contains("""<th scope="row">Replay buffer max bytes</th><td>987654321</td>""", html, StringComparison.Ordinal);
}
private static Task<string> RenderAsync(DashboardOptions dashboard) =>
RenderAsync(new GatewayOptions { Dashboard = dashboard });
private static async Task<string> RenderAsync(GatewayOptions options)
{
EffectiveGatewayConfiguration configuration =
new GatewayConfigurationProvider(Options.Create(new GatewayOptions { Dashboard = dashboard }))
new GatewayConfigurationProvider(Options.Create(options))
.GetEffectiveConfiguration();
ServiceCollection services = new();