diff --git a/bin/fxt/src/tui/data_fetcher.rs b/bin/fxt/src/tui/data_fetcher.rs index f19665421..61b9dffc0 100644 --- a/bin/fxt/src/tui/data_fetcher.rs +++ b/bin/fxt/src/tui/data_fetcher.rs @@ -29,6 +29,9 @@ use super::state::{ RiskAlertData, RiskData, ServiceData, SystemResources, TrainingSessionData, }; +/// Empty filter string means "fetch all" in gRPC requests. +const FILTER_ALL: &str = ""; + // --------------------------------------------------------------------------- // StateUpdate – one variant per data source // --------------------------------------------------------------------------- @@ -143,7 +146,7 @@ impl DataFetcher { let mut backoff = Backoff::new(); loop { let req = Request::new(monitoring::StreamTrainingMetricsRequest { - model_filter: String::new(), + model_filter: FILTER_ALL.into(), interval_seconds: 3, }); match mon.stream_training_metrics(req).await { @@ -420,7 +423,7 @@ impl DataFetcher { let mut backoff = Backoff::new(); loop { let req = Request::new(trading::StreamPortfolioSummaryRequest { - account_id: String::new(), + account_id: FILTER_ALL.into(), interval_seconds: 3, }); match trd.stream_portfolio_summary(req).await { @@ -716,7 +719,7 @@ impl DataFetcher { let mut backoff = Backoff::new(); loop { let req = Request::new(ml::StreamModelStatusRequest { - model_name: String::new(), // all models + model_name: FILTER_ALL.into(), // all models interval_seconds: 5, }); match ml_client.stream_model_status(req).await {