Fix API offset limit 400 Bad Request, implement requested UI/UX improvements

This commit is contained in:
Richard
2026-07-06 22:34:33 +02:00
parent fb703b6c81
commit 10eefd3546
35 changed files with 4900 additions and 145 deletions
@@ -72,9 +72,10 @@ public class TradeRetentionWorker : BackgroundService
var compactionCutoff = utcNow.Date.AddDays(-compactionDays);
// 1. Prune Old Trades (C1 & C2)
// Exclude trades if the trader is on any active Watchlist
_logger.LogInformation("Pruning trades older than {Cutoff}...", retentionCutoff);
var deletedCount = await db.Trades
.Where(t => t.ExecutedAt < retentionCutoff)
.Where(t => t.ExecutedAt < retentionCutoff && !t.Trader.WatchlistEntries.Any())
.ExecuteDeleteAsync(ct);
_logger.LogInformation("Pruned {Count} old trades from the database.", deletedCount);