Rebuild grid agent TUI with Ratatui dashboards
This commit is contained in:
@@ -2,7 +2,7 @@ use std::collections::BTreeSet;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
const ALLOWED_DEPENDENCIES: [&str; 22] = [
|
||||
const ALLOWED_DEPENDENCIES: [&str; 23] = [
|
||||
"async-trait",
|
||||
"base64",
|
||||
"crossterm",
|
||||
@@ -16,6 +16,7 @@ const ALLOWED_DEPENDENCIES: [&str; 22] = [
|
||||
"mentra",
|
||||
"jpeg-encoder",
|
||||
"libremetaverse-types",
|
||||
"ratatui",
|
||||
"rustls",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
||||
@@ -108,3 +108,23 @@ fn dotenv_import_is_explicit_and_preferences_panel_never_renders_secrets() {
|
||||
let _ = tui.reduce(TuiInput::PreferenceSave);
|
||||
fs::remove_dir_all(directory).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preferences_form_keeps_validation_feedback_visible() {
|
||||
let directory = temporary("validation");
|
||||
let config = directory.join("config.yml");
|
||||
let mut tui = OperatorTui::with_preferences(config).unwrap();
|
||||
tui.screen = OperatorScreen::Preferences;
|
||||
let _ = tui.reduce(TuiInput::PreferenceEditOrCommit);
|
||||
for value in "not-a-mode".chars() {
|
||||
let _ = tui.reduce(TuiInput::PreferenceCharacter(value));
|
||||
}
|
||||
let _ = tui.reduce(TuiInput::PreferenceEditOrCommit);
|
||||
let rendered = tui.render(TuiRenderOptions {
|
||||
width: 100,
|
||||
height: 24,
|
||||
color: false,
|
||||
});
|
||||
assert!(rendered.contains("[VALIDATION] mode must be offline, integrated, or split"));
|
||||
fs::remove_dir_all(directory).unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user