feat(anomalies): filter the feed by detector kind
Adds a detector-kind chip row to the anomaly feed (SuspensionFlip / SteamMove / SuspensionFreeze / OverroundCompression), multi-select like the sport filter — so with four detectors live you can slice the feed to a single signal type. The kind set lives on AnomalyFilter and filters in-memory alongside severity/sport, persisted via AnomalyBrowsingState like the other filters. - AnomalyFilter.Kinds + AnomalyBrowsingService in-memory Where clause; feed chip row + ToggleKind/KindLabel; en/ru resx (Anomaly.Filter.Kind). - 2 tests: kind-filtered subset + no-filter returns all kinds.
This commit is contained in:
@@ -59,6 +59,11 @@ public sealed class AnomalyBrowsingService : IAnomalyBrowsingService
|
||||
filtered = filtered.Where(i => sports.Contains(i.Sport.Value));
|
||||
}
|
||||
|
||||
if (filter.Kinds is { Count: > 0 } kinds)
|
||||
{
|
||||
filtered = filtered.Where(i => kinds.Contains(i.Kind));
|
||||
}
|
||||
|
||||
return filtered
|
||||
.OrderByDescending(static i => i.DetectedAt)
|
||||
.ToList();
|
||||
|
||||
Reference in New Issue
Block a user