mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Add a searchable /config preferences panel to the TUI (#52990)
## What changed - Group preferences into Appearance, Notifications, Input, Sessions, and Text selection tabs, with search and links to existing theme, status line, terminal title, and keyboard editors. - Persist preference changes to the selected local configuration file, apply supported changes immediately, and show save errors, configuration overrides, and restart requirements in the panel. - Add a delayed notification test and controls for notification timing while preserving custom event filters. - Add `tui.copy_on_select_clear_selection`, disabled by default, to clear transcript selection highlights only after confirmed automatic clipboard delivery. - Keep local configuration editors usable while disconnected and prevent held activation keys or buffered input from triggering actions across editor and reconnect transitions. ## Testing Add regression tests and rendering snapshots for panel navigation, search, dependency states, editor handoffs, offline persistence, notification timers, custom filter preservation, and confirmed-copy deselection. GitOrigin-RevId: a16d218046060fcb6e61705a803fcd9297266e6e
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
//! Entry points for the configuration browser and its existing child editors.
|
||||
|
||||
use super::ChatWidget;
|
||||
use crate::config_panel::ConfigEditor;
|
||||
use crate::config_panel::ConfigEditorHandoff;
|
||||
use crate::config_panel::ConfigPanel;
|
||||
use crate::config_panel::ConfigPanelStatus;
|
||||
use crate::config_panel::ConfigPanelUpdate;
|
||||
use crossterm::event::KeyEvent;
|
||||
|
||||
impl ChatWidget {
|
||||
pub(crate) fn open_config_panel(&mut self) {
|
||||
self.bottom_pane.show_view(Box::new(ConfigPanel::new(
|
||||
&self.config_panel_tui,
|
||||
self.app_event_tx.clone(),
|
||||
self.bottom_pane.list_keymap(),
|
||||
self.config_panel_status(),
|
||||
)));
|
||||
}
|
||||
|
||||
pub(crate) fn open_config_editor(
|
||||
&mut self,
|
||||
handoff: ConfigEditorHandoff,
|
||||
resume_current_availability: crate::config_panel::ResumeCurrentAvailability,
|
||||
) {
|
||||
match handoff.editor {
|
||||
ConfigEditor::Theme => self.open_theme_picker(),
|
||||
ConfigEditor::StatusLine => self.open_status_line_setup(),
|
||||
ConfigEditor::TerminalTitle => self.open_terminal_title_setup(),
|
||||
ConfigEditor::Keyboard => self.open_keymap_picker(),
|
||||
ConfigEditor::SessionPickerLayout => {
|
||||
let keymap = self.bottom_pane.list_keymap();
|
||||
let params =
|
||||
crate::config_panel::session_picker_layout(&self.local_settings.tui, &keymap);
|
||||
self.bottom_pane.show_selection_view(params);
|
||||
}
|
||||
ConfigEditor::ResumeDirectory => {
|
||||
let keymap = self.bottom_pane.list_keymap();
|
||||
let params = crate::config_panel::resume_directory(
|
||||
&self.local_settings.tui,
|
||||
&keymap,
|
||||
resume_current_availability,
|
||||
);
|
||||
self.bottom_pane.show_selection_view(params);
|
||||
}
|
||||
ConfigEditor::CopyOnSelect => {
|
||||
let keymap = self.bottom_pane.list_keymap();
|
||||
let params = crate::config_panel::copy_on_select(&self.local_settings.tui, &keymap);
|
||||
self.bottom_pane.show_selection_view(params);
|
||||
}
|
||||
ConfigEditor::RightClickPaste => {
|
||||
let keymap = self.bottom_pane.list_keymap();
|
||||
let params =
|
||||
crate::config_panel::right_click_paste(&self.local_settings.tui, &keymap);
|
||||
self.bottom_pane.show_selection_view(params);
|
||||
}
|
||||
ConfigEditor::NotificationCondition => {
|
||||
let keymap = self.bottom_pane.list_keymap();
|
||||
let params =
|
||||
crate::config_panel::notification_condition(&self.local_settings.tui, &keymap);
|
||||
self.bottom_pane.show_selection_view(params);
|
||||
}
|
||||
}
|
||||
if let Some(activated_at) = handoff.active_at() {
|
||||
self.bottom_pane
|
||||
.suppress_current_view_key_until_release(handoff.activation_key, activated_at);
|
||||
}
|
||||
self.bottom_pane.config_editor_opened();
|
||||
}
|
||||
|
||||
pub(crate) fn interrupt_config_editor_transition(&mut self) {
|
||||
self.bottom_pane.interrupt_config_editor_transition();
|
||||
}
|
||||
|
||||
pub(crate) fn observe_config_editor_transition_key_event(&mut self, key: KeyEvent) {
|
||||
self.bottom_pane
|
||||
.observe_config_editor_transition_key_event(key);
|
||||
}
|
||||
|
||||
pub(crate) fn refresh_config_panel(&mut self, notice: Option<String>) -> bool {
|
||||
self.bottom_pane.update_config_panel(&ConfigPanelUpdate {
|
||||
tui: self.config_panel_tui.clone(),
|
||||
keymap: self.bottom_pane.list_keymap(),
|
||||
status: self.config_panel_status(),
|
||||
notice,
|
||||
})
|
||||
}
|
||||
|
||||
fn config_panel_status(&self) -> ConfigPanelStatus {
|
||||
ConfigPanelStatus {
|
||||
copy_on_select: self
|
||||
.local_settings
|
||||
.copy_on_select(&codex_terminal_detection::terminal_info()),
|
||||
right_click_paste: crate::app::PasteEnvironment::detect().status(
|
||||
self.local_settings.tui.right_click_paste,
|
||||
self.local_settings.transcript_mode,
|
||||
),
|
||||
custom_notification_filters: self.local_settings.custom_notification_filters,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn report_config_save_error(&mut self, message: String) {
|
||||
self.add_error_message(message.clone());
|
||||
self.refresh_config_panel(Some(message));
|
||||
}
|
||||
|
||||
pub(crate) fn config_editor_open_failed(&mut self, message: String) {
|
||||
self.bottom_pane.config_editor_opened();
|
||||
self.add_error_message(message.clone());
|
||||
self.refresh_config_panel(Some(message));
|
||||
}
|
||||
}
|
||||
@@ -88,13 +88,14 @@ impl ChatWidget {
|
||||
config.http_client_factory(),
|
||||
codex_http_client::ClientRouteClass::Other,
|
||||
);
|
||||
pets::start_configured_pet_load_if_needed(
|
||||
let configured_pet_load_generation = pets::start_configured_pet_load_if_needed(
|
||||
&local_settings,
|
||||
/*ambient_pet_missing*/ true,
|
||||
frame_requester.clone(),
|
||||
app_event_tx.clone(),
|
||||
pet_http_client.clone(),
|
||||
);
|
||||
let config_panel_tui = local_settings.tui.clone();
|
||||
let mut widget = Self {
|
||||
empty_state_animation: std::cell::RefCell::new(empty_state_animation),
|
||||
daybreak_enabled: false,
|
||||
@@ -116,6 +117,7 @@ impl ChatWidget {
|
||||
raw_output_mode: local_settings.tui.raw_output_mode,
|
||||
config,
|
||||
local_settings,
|
||||
config_panel_tui,
|
||||
effective_service_tier,
|
||||
skills_all: Vec::new(),
|
||||
skills_initial_state: None,
|
||||
@@ -220,6 +222,7 @@ impl ChatWidget {
|
||||
active_hook_cell: None,
|
||||
pet_http_client,
|
||||
ambient_pet: None,
|
||||
configured_pet_load_generation,
|
||||
pet_picker_preview_state: crate::pets::PetPickerPreviewState::default(),
|
||||
pet_picker_preview_pet: None,
|
||||
pet_picker_preview_request_id: 0,
|
||||
|
||||
@@ -30,6 +30,7 @@ impl ChatWidget {
|
||||
SlashCommand::Model
|
||||
| SlashCommand::Keymap
|
||||
| SlashCommand::Memories
|
||||
| SlashCommand::Config
|
||||
| SlashCommand::Title
|
||||
| SlashCommand::Statusline
|
||||
| SlashCommand::Theme,
|
||||
|
||||
@@ -65,7 +65,21 @@ impl ChatWidget {
|
||||
std::mem::take(&mut self.bottom_pane.key_chord_reset_requested)
|
||||
}
|
||||
|
||||
pub(crate) fn consume_view_transition_key_event(&mut self, key_event: KeyEvent) -> bool {
|
||||
self.bottom_pane
|
||||
.consume_view_transition_key_event(key_event)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn handle_key_event(&mut self, key_event: KeyEvent) -> KeyEventAction {
|
||||
self.handle_key_event_with_activation_key(key_event, /*activation_key*/ None)
|
||||
}
|
||||
|
||||
pub(crate) fn handle_key_event_with_activation_key(
|
||||
&mut self,
|
||||
key_event: KeyEvent,
|
||||
activation_key: Option<crate::key_hint::KeyBinding>,
|
||||
) -> KeyEventAction {
|
||||
if self.handle_startup_submission_key(key_event) {
|
||||
return KeyEventAction::None;
|
||||
}
|
||||
@@ -89,7 +103,8 @@ impl ChatWidget {
|
||||
let should_pause_active_goal = self
|
||||
.bottom_pane
|
||||
.active_view_will_interrupt_turn_on_key_event(key_event);
|
||||
self.bottom_pane.handle_key_event(key_event);
|
||||
self.bottom_pane
|
||||
.handle_key_event_with_activation_key(key_event, activation_key);
|
||||
if should_pause_active_goal {
|
||||
self.pause_active_goal_for_interrupt();
|
||||
}
|
||||
@@ -100,7 +115,8 @@ impl ChatWidget {
|
||||
}
|
||||
|
||||
if self.shortcut_overlay_visible() && key_hint::plain(KeyCode::Esc).is_press(key_event) {
|
||||
self.bottom_pane.handle_key_event(key_event);
|
||||
self.bottom_pane
|
||||
.handle_key_event_with_activation_key(key_event, activation_key);
|
||||
return KeyEventAction::None;
|
||||
}
|
||||
|
||||
@@ -258,7 +274,9 @@ impl ChatWidget {
|
||||
let had_modal_or_popup = !self.bottom_pane.no_modal_or_popup_active();
|
||||
let should_pause_active_goal =
|
||||
self.bottom_pane.should_interrupt_running_task(key_event);
|
||||
let input_result = self.bottom_pane.handle_key_event(key_event);
|
||||
let input_result = self
|
||||
.bottom_pane
|
||||
.handle_key_event_with_activation_key(key_event, activation_key);
|
||||
if matches!(
|
||||
input_result,
|
||||
InputResult::None | InputResult::ParentOwnedInputBlocked
|
||||
|
||||
@@ -172,6 +172,7 @@ impl ChatWidget {
|
||||
self.copy_last_response_binding = runtime_keymap.app.copy.clone();
|
||||
self.chat_keymap = runtime_keymap.chat.clone();
|
||||
self.bottom_pane.set_keymap_bindings(runtime_keymap);
|
||||
self.refresh_config_panel(Some("Saved".into()));
|
||||
self.update_realtime_footer();
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ impl ChatWidget {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(super) enum Notification {
|
||||
pub(crate) enum Notification {
|
||||
AgentTurnComplete { response: String },
|
||||
ExecApprovalRequested { command: String },
|
||||
EditApprovalRequested { cwd: PathBuf, changes: Vec<PathBuf> },
|
||||
|
||||
@@ -2,6 +2,22 @@
|
||||
|
||||
use super::*;
|
||||
use codex_config::types::TuiPetAnchor;
|
||||
use std::sync::atomic::AtomicU64;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
// A configured-pet load can finish after its ChatWidget is replaced, so
|
||||
// generations must remain unique across widget replacements.
|
||||
static NEXT_CONFIGURED_PET_LOAD_GENERATION: AtomicU64 = AtomicU64::new(/*v*/ 1);
|
||||
|
||||
/// Identifies one configured-pet load across widget replacements.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) struct ConfiguredPetLoadGeneration(u64);
|
||||
|
||||
fn next_configured_pet_load_generation() -> ConfiguredPetLoadGeneration {
|
||||
ConfiguredPetLoadGeneration(
|
||||
NEXT_CONFIGURED_PET_LOAD_GENERATION.fetch_add(/*val*/ 1, Ordering::Relaxed),
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn load_ambient_pet(
|
||||
config: &crate::local_settings::LocalSettings,
|
||||
@@ -27,12 +43,13 @@ pub(super) fn start_configured_pet_load_if_needed(
|
||||
frame_requester: FrameRequester,
|
||||
app_event_tx: AppEventSender,
|
||||
pet_http_client: codex_http_client::RouteAwareClientPool,
|
||||
) {
|
||||
) -> ConfiguredPetLoadGeneration {
|
||||
let generation = next_configured_pet_load_generation();
|
||||
let Some(pet_id) = config.tui.pet.clone() else {
|
||||
return;
|
||||
return generation;
|
||||
};
|
||||
if pet_id == crate::pets::DISABLED_PET_ID || !ambient_pet_missing {
|
||||
return;
|
||||
return generation;
|
||||
}
|
||||
|
||||
let codex_home = config.codex_home.clone();
|
||||
@@ -53,10 +70,12 @@ pub(super) fn start_configured_pet_load_if_needed(
|
||||
},
|
||||
app_event_tx,
|
||||
move |result| AppEvent::ConfiguredPetLoaded {
|
||||
generation,
|
||||
pet_id: event_pet_id,
|
||||
result,
|
||||
},
|
||||
);
|
||||
generation
|
||||
}
|
||||
|
||||
impl ChatWidget {
|
||||
@@ -210,15 +229,48 @@ impl ChatWidget {
|
||||
pub(crate) fn set_tui_pet(&mut self, pet: Option<String>) {
|
||||
self.local_settings.tui.pet = pet;
|
||||
self.ambient_pet = load_ambient_pet(&self.local_settings, self.frame_requester.clone());
|
||||
self.configured_pet_load_generation = start_configured_pet_load_if_needed(
|
||||
&self.local_settings,
|
||||
/*ambient_pet_missing*/ self.ambient_pet.is_none(),
|
||||
self.frame_requester.clone(),
|
||||
self.app_event_tx.clone(),
|
||||
self.pet_http_client.clone(),
|
||||
);
|
||||
self.apply_ambient_pet_image_support_override_for_tests();
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
/// Applies a configured-pet result only if it belongs to this widget's current load.
|
||||
pub(crate) fn finish_configured_pet_load(
|
||||
&mut self,
|
||||
generation: ConfiguredPetLoadGeneration,
|
||||
pet_id: String,
|
||||
result: Result<Option<crate::pets::AmbientPet>, String>,
|
||||
) -> bool {
|
||||
if generation != self.configured_pet_load_generation
|
||||
|| self.local_settings.tui.pet.as_deref() != Some(pet_id.as_str())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
match result {
|
||||
Ok(ambient_pet) => {
|
||||
self.set_tui_pet_loaded(Some(pet_id), ambient_pet);
|
||||
true
|
||||
}
|
||||
Err(err) => {
|
||||
self.add_warning_message(format!("Failed to load configured pet: {err}"));
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn set_tui_pet_loaded(
|
||||
&mut self,
|
||||
pet: Option<String>,
|
||||
ambient_pet: Option<crate::pets::AmbientPet>,
|
||||
) {
|
||||
self.configured_pet_load_generation = next_configured_pet_load_generation();
|
||||
self.local_settings.tui.pet = pet;
|
||||
self.ambient_pet = ambient_pet;
|
||||
self.apply_ambient_pet_image_support_override_for_tests();
|
||||
|
||||
@@ -11,13 +11,14 @@ fn pet_load_without_runtime_sends_completion_event() {
|
||||
async { Ok::<Option<crate::pets::AmbientPet>, String>(None) },
|
||||
app_event_tx,
|
||||
|result| AppEvent::ConfiguredPetLoaded {
|
||||
generation: next_configured_pet_load_generation(),
|
||||
pet_id: crate::pets::DEFAULT_PET_ID.to_string(),
|
||||
result,
|
||||
},
|
||||
);
|
||||
|
||||
match rx.blocking_recv().expect("pet load completion event") {
|
||||
AppEvent::ConfiguredPetLoaded { pet_id, result } => {
|
||||
AppEvent::ConfiguredPetLoaded { pet_id, result, .. } => {
|
||||
assert_eq!(pet_id, crate::pets::DEFAULT_PET_ID);
|
||||
assert!(result.expect("successful pet load").is_none());
|
||||
}
|
||||
@@ -25,6 +26,70 @@ fn pet_load_without_runtime_sends_completion_event() {
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn configured_pet_loads_are_scoped_across_widget_replacements() {
|
||||
let (mut replaced_chat, _replaced_tx, mut replaced_rx, _replaced_op_rx) =
|
||||
crate::chatwidget::tests::make_chatwidget_manual_with_sender().await;
|
||||
let (mut chat, _tx, mut rx, _op_rx) =
|
||||
crate::chatwidget::tests::make_chatwidget_manual_with_sender().await;
|
||||
let codex_home = tempfile::tempdir().unwrap();
|
||||
replaced_chat.local_settings.codex_home =
|
||||
AbsolutePathBuf::from_absolute_path(codex_home.path()).expect("absolute temporary path");
|
||||
chat.local_settings.codex_home =
|
||||
AbsolutePathBuf::from_absolute_path(codex_home.path()).expect("absolute temporary path");
|
||||
let pet_id = "missing-custom-pet".to_string();
|
||||
|
||||
replaced_chat.set_tui_pet(/*pet*/ Some(pet_id.clone()));
|
||||
let replaced_event = tokio::time::timeout(
|
||||
std::time::Duration::from_secs(/*secs*/ 5),
|
||||
replaced_rx.recv(),
|
||||
)
|
||||
.await
|
||||
.expect("replaced widget pet load completion")
|
||||
.expect("replaced widget pet load event");
|
||||
let AppEvent::ConfiguredPetLoaded {
|
||||
generation: replaced_generation,
|
||||
..
|
||||
} = replaced_event
|
||||
else {
|
||||
panic!("expected configured pet completion");
|
||||
};
|
||||
|
||||
chat.set_tui_pet(/*pet*/ Some(pet_id.clone()));
|
||||
let event = tokio::time::timeout(std::time::Duration::from_secs(/*secs*/ 5), rx.recv())
|
||||
.await
|
||||
.expect("configured pet load completion")
|
||||
.expect("configured pet load event");
|
||||
let AppEvent::ConfiguredPetLoaded {
|
||||
generation,
|
||||
pet_id: loaded_pet_id,
|
||||
..
|
||||
} = event
|
||||
else {
|
||||
panic!("expected configured pet completion");
|
||||
};
|
||||
assert_eq!(loaded_pet_id, pet_id);
|
||||
|
||||
assert!(!chat.finish_configured_pet_load(
|
||||
replaced_generation,
|
||||
pet_id.clone(),
|
||||
/*result*/ Ok(None),
|
||||
));
|
||||
assert!(chat.finish_configured_pet_load(
|
||||
generation,
|
||||
pet_id,
|
||||
/*result*/
|
||||
Ok(Some(crate::pets::test_ambient_pet(
|
||||
chat.frame_requester.clone(),
|
||||
/*animations_enabled*/ false,
|
||||
))),
|
||||
));
|
||||
let area = ratatui::layout::Rect::new(
|
||||
/*x*/ 0, /*y*/ 0, /*width*/ 80, /*height*/ 24,
|
||||
);
|
||||
assert!(chat.ambient_pet_draw(area, area.bottom()).is_some());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn shared_pet_load_uses_cached_builtin_assets() {
|
||||
let (chat, _tx, _rx, _op_rx) =
|
||||
|
||||
@@ -161,8 +161,35 @@ impl ChatWidget {
|
||||
self.refresh_pending_input_preview();
|
||||
}
|
||||
|
||||
pub(crate) fn handle_disconnected_view_key(&mut self, key: KeyEvent) {
|
||||
self.bottom_pane.handle_key_event(key);
|
||||
pub(crate) fn handle_disconnected_view_key(
|
||||
&mut self,
|
||||
key: KeyEvent,
|
||||
activation_key: Option<crate::key_hint::KeyBinding>,
|
||||
) {
|
||||
if crate::key_hint::ctrl(KeyCode::Char('c')).is_press(key) {
|
||||
let _ = self.cancel_active_disconnected_view();
|
||||
} else {
|
||||
self.bottom_pane
|
||||
.handle_key_event_with_activation_key(key, activation_key);
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn active_view_accepts_input_when_disconnected(&self) -> bool {
|
||||
self.bottom_pane
|
||||
.active_view_accepts_input_when_disconnected()
|
||||
}
|
||||
|
||||
pub(crate) fn cancel_active_disconnected_view(&mut self) -> bool {
|
||||
let had_view = self.active_view_accepts_input_when_disconnected();
|
||||
if had_view {
|
||||
self.revert_terminal_title_setup_preview();
|
||||
let _ = self.bottom_pane.on_ctrl_c();
|
||||
}
|
||||
had_view
|
||||
}
|
||||
|
||||
pub(crate) fn active_view_is(&self, view_id: &'static str) -> bool {
|
||||
self.bottom_pane.active_view_id() == Some(view_id)
|
||||
}
|
||||
|
||||
pub(crate) fn handle_restricted_key(&mut self, key: KeyEvent, mode: RestrictedInputMode) {
|
||||
|
||||
@@ -304,6 +304,7 @@ impl ChatWidget {
|
||||
|
||||
/// Set the syntax theme override in the widget's config copy.
|
||||
pub(crate) fn set_tui_theme(&mut self, theme: Option<String>) {
|
||||
self.config_panel_tui.theme.clone_from(&theme);
|
||||
self.local_settings.tui.theme = theme;
|
||||
}
|
||||
|
||||
|
||||
@@ -585,6 +585,9 @@ impl ChatWidget {
|
||||
SlashCommand::Statusline => {
|
||||
self.open_status_line_setup();
|
||||
}
|
||||
SlashCommand::Config => {
|
||||
self.open_config_panel();
|
||||
}
|
||||
SlashCommand::Theme => {
|
||||
self.open_theme_picker();
|
||||
}
|
||||
@@ -1333,6 +1336,7 @@ impl ChatWidget {
|
||||
| SlashCommand::Hooks
|
||||
| SlashCommand::Title
|
||||
| SlashCommand::Statusline
|
||||
| SlashCommand::Config
|
||||
| SlashCommand::Theme
|
||||
| SlashCommand::Tui
|
||||
| SlashCommand::Pets => QueueDrain::Stop,
|
||||
|
||||
@@ -129,6 +129,8 @@ impl ChatWidget {
|
||||
"status line setup confirmed with items: {items:#?}, use_theme_colors: {use_theme_colors}"
|
||||
);
|
||||
let ids = items.iter().map(ToString::to_string).collect::<Vec<_>>();
|
||||
self.config_panel_tui.status_line = Some(ids.clone());
|
||||
self.config_panel_tui.status_line_use_colors = use_theme_colors;
|
||||
self.local_settings.tui.status_line = Some(ids);
|
||||
self.local_settings.tui.status_line_use_colors = use_theme_colors;
|
||||
self.refresh_status_line();
|
||||
@@ -171,6 +173,7 @@ impl ChatWidget {
|
||||
tracing::info!("terminal title setup confirmed with items: {items:#?}");
|
||||
let ids = items.iter().map(ToString::to_string).collect::<Vec<_>>();
|
||||
self.terminal_title_setup_original_items = None;
|
||||
self.config_panel_tui.terminal_title = Some(ids.clone());
|
||||
self.local_settings.tui.terminal_title = Some(ids);
|
||||
self.refresh_terminal_title();
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ async fn configured_pet_load_is_deferred_until_after_construction() {
|
||||
.unwrap();
|
||||
assert_matches!(
|
||||
event,
|
||||
AppEvent::ConfiguredPetLoaded { pet_id, result } => {
|
||||
AppEvent::ConfiguredPetLoaded { pet_id, result, .. } => {
|
||||
assert_eq!(pet_id, crate::pets::DEFAULT_PET_ID);
|
||||
assert!(result.unwrap().is_some());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user