mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Hide ephemeral system threads from TUI routing (#40494)
## What changed - Ignore `thread/started` notifications for ephemeral threads whose feature source is `system`, preventing hidden helper threads from entering TUI thread routing or refreshing the agents overview. - Continue routing persisted system threads normally. ## Testing - Add coverage for hidden and persisted system-thread notifications in the agents overview. - Add generated-title normalization cases for wrapping quotes, trailing punctuation, and meaningful leading punctuation. GitOrigin-RevId: e1ea48502b4f9aa7d5a187c7407df69c55abe2a9
This commit is contained in:
1 parent
b3c7e1a47f
commit
0c992c305d
3 files changed
+132
No files matched your search
@@ -99,6 +99,40 @@ fn normalizes_generated_title_whitespace() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn removes_wrapping_quotes_and_trailing_punctuation_from_generated_titles() {
|
||||
for title in [
|
||||
r#""Fix login errors!""#,
|
||||
"'Fix login errors?'",
|
||||
"`Fix login errors.`",
|
||||
"“Fix login errors!”",
|
||||
] {
|
||||
let response = serde_json::json!({ "title": title }).to_string();
|
||||
|
||||
assert_eq!(
|
||||
parse_thread_title(&response),
|
||||
Some("Fix login errors".to_string()),
|
||||
"response: {response}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserves_meaningful_leading_punctuation_in_generated_titles() {
|
||||
for (title, expected) in [
|
||||
(".NET migration.", ".NET migration"),
|
||||
("!important styling!", "!important styling"),
|
||||
] {
|
||||
let response = serde_json::json!({ "title": title }).to_string();
|
||||
|
||||
assert_eq!(
|
||||
parse_thread_title(&response),
|
||||
Some(expected.to_string()),
|
||||
"response: {response}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_invalid_or_empty_generated_titles() {
|
||||
for response in [
|
||||
|
||||
Reference in new issue
Block a user