From f07a484fb73b21da22ff96eb30fb2a5d02fb88de Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 26 Oct 2026 22:54:35 +0000 Subject: [PATCH] test(automation): read UI_SET_FIELDS from control/params.rs The ui-egui control.rs split moved the UI_SET_FIELDS declaration to control/params.rs; the MCP test reads it from source by path. --- crates/automation/tests/it/mcp.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/automation/tests/it/mcp.rs b/crates/automation/tests/it/mcp.rs index fe44d0be6b..0ac5c17a5f 100644 --- a/crates/automation/tests/it/mcp.rs +++ b/crates/automation/tests/it/mcp.rs @@ -273,12 +273,13 @@ async fn command_ids_in_tool_schemas_exist() { client.cancel().await.unwrap(); } -/// `UI_SET_FIELDS` in `crates/ui-egui/src/control.rs`, read from source. The desktop shell owns the +/// `UI_SET_FIELDS` in `crates/ui-egui/src/control/params.rs`, read from source. The desktop shell owns the /// list; this crate describes it over MCP without depending on the UI crate (both are L6). /// Anchored on the declaration, not on the doc comment that mentions it first, and checked against /// the declared array length so a mis-parse fails loudly instead of testing the wrong names. fn ui_set_fields() -> Vec { - let src = std::fs::read_to_string(std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../ui-egui/src/control.rs")).expect("ui-egui control.rs"); + let src = + std::fs::read_to_string(std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../ui-egui/src/control/params.rs")).expect("ui-egui control/params.rs"); let (_, rest) = src.split_once("UI_SET_FIELDS: [&str; ").expect("UI_SET_FIELDS is declared"); let declared: usize = rest.split_once(']').expect("declared length").0.parse().expect("declared length"); let body = rest.split_once('[').expect("field array").1.split_once("];").expect("terminated array").0;