feat(ui): live dashboard, capture-status pill, bet/backtest UX

- Add IDashboardSummaryService/DashboardSummaryService: real event/snapshot/
  anomaly counts, top-5 signals, and per-stage pipeline health from worker state.
- Home: replace hard-coded zeros + placeholder feed with live data, a clickable
  signal feed, and a first-run empty state with a Settings CTA.
- MainLayout: add an appbar capture-status pill (Capturing/Paused) bound to the
  poller toggles, refreshed via IOptionsMonitor.OnChange.
- MyBets: success snackbar on bet submit. Backtest: surface a Cancel button
  while a run is in flight.
- Add en/ru localization for all new strings; register IOptionsMonitor<WorkerOptions>
  in the bUnit test context for layout-rendering tests.
This commit is contained in:
2026-05-28 22:34:28 +03:00
parent 0501f9c39c
commit 250a93e718
10 changed files with 278 additions and 35 deletions
@@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using MudBlazor.Services;
namespace Marathon.UI.Tests.Support;
@@ -37,6 +38,11 @@ public abstract class MarathonTestContext : TestContext
Services.AddSingleton<IAnomalyBrowsingService>(AnomalyBrowsing);
Services.AddSingleton<IResultsBrowsingService>(Results);
// WorkerOptions monitor backs the MainLayout capture-status pill (defaults
// to all pollers enabled). Tests needing a specific state can re-register.
Services.AddSingleton<IOptionsMonitor<WorkerOptions>>(
new TestOptionsMonitor<WorkerOptions>(new WorkerOptions()));
Services.AddSingleton(typeof(IStringLocalizer<>), typeof(TestLocalizer<>));
Services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
Services.AddLogging();