mirror of
https://github.com/openai/codex.git
synced 2026-04-30 09:26:44 +00:00
Enable TUI notifications by default (#6633)
## Summary - default the `tui.notifications` setting to enabled so desktop notifications work out of the box - update configuration tests and documentation to reflect the new default ## Testing - `cargo test -p codex-core` *(fails: `exec::tests::kill_child_process_group_kills_grandchildren_on_timeout` is flaky in this sandbox because the spawned grandchild process stays alive)* - `cargo test -p codex-core exec::tests::kill_child_process_group_kills_grandchildren_on_timeout` *(fails: same sandbox limitation as above)* ------ [Codex Task](https://chatgpt.com/codex/tasks/task_i_69166f811144832c9e8aaf8ee2642373)
This commit is contained in:
@@ -1323,7 +1323,7 @@ persistence = "none"
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tui_config_missing_notifications_field_defaults_to_disabled() {
|
||||
fn tui_config_missing_notifications_field_defaults_to_enabled() {
|
||||
let cfg = r#"
|
||||
[tui]
|
||||
"#;
|
||||
@@ -1332,7 +1332,7 @@ persistence = "none"
|
||||
.expect("TUI config without notifications should succeed");
|
||||
let tui = parsed.tui.expect("config should include tui section");
|
||||
|
||||
assert_eq!(tui.notifications, Notifications::Enabled(false));
|
||||
assert_eq!(tui.notifications, Notifications::Enabled(true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -338,7 +338,7 @@ pub enum Notifications {
|
||||
|
||||
impl Default for Notifications {
|
||||
fn default() -> Self {
|
||||
Self::Enabled(false)
|
||||
Self::Enabled(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ impl Default for Notifications {
|
||||
#[derive(Deserialize, Debug, Clone, PartialEq, Default)]
|
||||
pub struct Tui {
|
||||
/// Enable desktop notifications from the TUI when the terminal is unfocused.
|
||||
/// Defaults to `false`.
|
||||
/// Defaults to `true`.
|
||||
#[serde(default)]
|
||||
pub notifications: Notifications,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user