mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Use the cloud emoji for cloud thread labels (#62573)
## What changed Request emoji presentation for the cloud marker in thread labels. Preserve the emoji variation selector immediately after the cloud symbol in Unicode terminal titles and keep GNU Screen titles ASCII. ## Testing Update rendering snapshots for the task overview, side panes, mentions, resume picker, and thread identity displays. Extend the terminal title test to cover the cloud marker in both title encodings. GitOrigin-RevId: 15959a0760f63a45d8fff917df2e008cda7536a5
This commit is contained in:
committed by
copyberry
parent
3869f396aa
commit
6eea328081
@@ -363,11 +363,11 @@ async fn live_center_columns() {
|
||||
.insert(ThreadId::from_u128(/*value*/ 47));
|
||||
let mut view = app.agents_overview_view(threads, Some(current));
|
||||
let narrow = screen(&view, /*width*/ 50, /*height*/ 24);
|
||||
assert!(narrow.contains("● Error: ☁︎ Failed task"));
|
||||
assert!(narrow.contains("● Error: ☁️ Failed task"));
|
||||
assert!(
|
||||
narrow
|
||||
.lines()
|
||||
.any(|line| { line.contains("☁︎ A longer task title") && line.contains('…') })
|
||||
.any(|line| { line.contains("☁️ A longer task title") && line.contains('…') })
|
||||
);
|
||||
insta::assert_snapshot!(screen(&view, /*width*/ 160, /*height*/ 22));
|
||||
view.pinned_thread_ranks = None;
|
||||
|
||||
+3
-3
@@ -7,12 +7,12 @@ expression: "screen(&view, 160, 22)"
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Tasks Status Updated │ Task details
|
||||
Pinned 2 │
|
||||
› ○ ☁︎ Current task Ready now │ ☁︎ Current task
|
||||
› ○ ☁️ Current task Ready now │ ☁️ Current task
|
||||
● Needs an answer Needs input 2h ago │ ○ Ready
|
||||
│
|
||||
/tmp/project 4 │ Model: Unknown
|
||||
○ ☁︎ A longer task title that uses the available column voice Ready 5m ago │ Reasoning: Unknown
|
||||
● ☁︎ Failed task Error 1h ago │
|
||||
○ ☁️ A longer task title that uses the available column voice Ready 5m ago │ Reasoning: Unknown
|
||||
● ☁️ Failed task Error 1h ago │
|
||||
● Working task Working 1d ago │ Project
|
||||
○ Unloaded task Inactive 2d ago │ /tmp/project
|
||||
│
|
||||
|
||||
@@ -5392,7 +5392,7 @@ async fn handle_start_side_seeds_navigation_before_thread_started() -> Result<()
|
||||
let header = frame.lines().next().unwrap().split_once('│').unwrap().1;
|
||||
insta::assert_snapshot!(
|
||||
header.split_inclusive('×').take(2).collect::<String>(),
|
||||
@" ☁︎ Investigate …× ☁︎ Fix cache ×"
|
||||
@" ☁️ Investigate…× ☁️ Fix cache ×"
|
||||
);
|
||||
keys!(prefix, chooser_key);
|
||||
let frame = side_frame(&mut app, &mut tui, even)?;
|
||||
@@ -5402,12 +5402,12 @@ async fn handle_start_side_seeds_navigation_before_thread_started() -> Result<()
|
||||
.filter_map(|line| line.split_once('│').map(|(_, pane)| pane))
|
||||
.filter(|pane| pane.contains("Investigate rendering") || pane.contains("Fix cache"))
|
||||
.map(|pane| pane.trim().trim_start_matches(['›', '○', ' ']))
|
||||
.filter(|pane| pane.starts_with("☁︎"))
|
||||
.filter(|pane| pane.starts_with("☁️"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
insta::assert_snapshot!(labels, @"
|
||||
☁︎ Investigate rendering
|
||||
☁︎ Fix cache
|
||||
☁️ Investigate rendering
|
||||
☁️ Fix cache
|
||||
");
|
||||
keys!(KeyCode::Enter.into());
|
||||
app.backend_registry = local_registry;
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ expression: terminal.backend()
|
||||
" Mentions "
|
||||
" All Results Filesystem Only Plugins "
|
||||
" migr "
|
||||
"› ☁︎ Review database migration /workspace/project Task "
|
||||
"› ☁️ Review database migration /workspace/project Task " Hidden by multi-width symbols: [(3, " ")]
|
||||
" enter/tab insert · esc close · ↑/↓ select · ←/→ filter "
|
||||
" "
|
||||
"› @migr "
|
||||
|
||||
+8
-8
@@ -14,16 +14,16 @@ title: Fix login timeout | Fix login timeout | 550e8400-e29b-41d4-a716-44665...
|
||||
default title: Fix login timeout | project
|
||||
|
||||
Cloud name=None
|
||||
status: | ☁︎ 550e8400-e29b-41d4-a716-446655440000 | 550e8400-e29b-41d4-a716-446655440000
|
||||
title: | ☁︎ 550e8400-e29b-41d4-a716-446655440000 | 550e8400-e29b-41d4-a716-44665...
|
||||
status: | ☁️ 550e8400-e29b-41d4-a716-446655440000 | 550e8400-e29b-41d4-a716-446655440000
|
||||
title: | ☁️ 550e8400-e29b-41d4-a716-446655440000 | 550e8400-e29b-41d4-a716-44665...
|
||||
default title: project
|
||||
|
||||
Cloud name=Some("Fix login timeout")
|
||||
status: ☁︎ Fix login timeout | ☁︎ Fix login timeout | 550e8400-e29b-41d4-a716-446655440000
|
||||
title: ☁︎ Fix login timeout | ☁︎ Fix login timeout | 550e8400-e29b-41d4-a716-44665...
|
||||
default title: ☁︎ Fix login timeout | project
|
||||
status: ☁️ Fix login timeout | ☁️ Fix login timeout | 550e8400-e29b-41d4-a716-446655440000
|
||||
title: ☁️ Fix login timeout | ☁️ Fix login timeout | 550e8400-e29b-41d4-a716-44665...
|
||||
default title: ☁️ Fix login timeout | project
|
||||
|
||||
Cloud name=Some("A long thread name that must leave room for the cloud icon")
|
||||
status: ☁︎ A long thread name that must leave room for the cloud icon | ☁︎ A long thread name that must leave room for the cloud icon | 550e8400-e29b-41d4-a716-446655440000
|
||||
title: ☁︎ A long thread name that must leave room for... | ☁︎ A long thread name that must leave room for... | 550e8400-e29b-41d4-a716-44665...
|
||||
default title: ☁︎ A long thread name that must leave room for... | project
|
||||
status: ☁️ A long thread name that must leave room for the cloud icon | ☁️ A long thread name that must leave room for the cloud icon | 550e8400-e29b-41d4-a716-446655440000
|
||||
title: ☁️ A long thread name that must leave room for... | ☁️ A long thread name that must leave room for... | 550e8400-e29b-41d4-a716-44665...
|
||||
default title: ☁️ A long thread name that must leave room for... | project
|
||||
|
||||
@@ -4893,7 +4893,7 @@ mod tests {
|
||||
state.cloud_backends.insert(state.backend_id);
|
||||
insta::assert_snapshot!(
|
||||
render_expanded_session_details(&row, &state, /*width*/ 53)[0].to_string(),
|
||||
@" │ Session: ☁︎ feat(tui): add raw scrollback mode…"
|
||||
@" │ Session: ☁️ feat(tui): add raw scrollback mod…"
|
||||
);
|
||||
assert!(rendered.contains("Branch: codex/raw-scrollback-mode"));
|
||||
assert!(rendered.contains("Conversation:"));
|
||||
@@ -5243,7 +5243,7 @@ mod tests {
|
||||
)[0]
|
||||
.to_string()
|
||||
.trim_end(),
|
||||
@" 42s ago ☁︎ Fix resume p…"
|
||||
@" 42s ago ☁️ Fix resume …"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
source: tui/src/resume_picker.rs
|
||||
expression: snapshot
|
||||
---
|
||||
☁︎ Fix resume picker timestamps
|
||||
☁️ Fix resume picker timestamps
|
||||
42s ago ⌁ no cwd no branch
|
||||
|
||||
› ● Investigate lazy pagination cap
|
||||
|
||||
@@ -139,7 +139,11 @@ pub(crate) fn sanitize_terminal_title(title: &str, encoding: TitleEncoding) -> S
|
||||
continue;
|
||||
}
|
||||
|
||||
if is_disallowed_terminal_title_char(ch) {
|
||||
let is_cloud_emoji_selector = matches!(encoding, TitleEncoding::Unicode)
|
||||
&& ch == '\u{FE0F}'
|
||||
&& !pending_space
|
||||
&& sanitized.ends_with('☁');
|
||||
if is_disallowed_terminal_title_char(ch) && !is_cloud_emoji_selector {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -260,7 +264,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn screen_title_stays_ascii_across_activity_and_user_named_fields() {
|
||||
let title = " ● ⠇ | ě[31m thread \u{202e}\x07| 日本語 ćafé ";
|
||||
let title = " ☁️ ● ⠇ | ě[31m thread \u{202e}\x07| 日本語 ćafé ";
|
||||
let screen = sanitize_terminal_title(title, TitleEncoding::Screen);
|
||||
let unicode = sanitize_terminal_title(title, TitleEncoding::Unicode);
|
||||
|
||||
@@ -268,8 +272,8 @@ mod tests {
|
||||
insta::assert_snapshot!(
|
||||
format!("Screen: {screen}\nDirect: {unicode}"),
|
||||
@r#"
|
||||
Screen: * | | ?[31m thread | ??? ?af?
|
||||
Direct: ● ⠇ | ě[31m thread | 日本語 ćafé
|
||||
Screen: ? * | | ?[31m thread | ??? ?af?
|
||||
Direct: ☁️ ● ⠇ | ě[31m thread | 日本語 ćafé
|
||||
"#
|
||||
);
|
||||
assert_eq!(
|
||||
|
||||
@@ -22,8 +22,8 @@ impl ThreadLabelStyle {
|
||||
fn prefix(self) -> &'static str {
|
||||
match self {
|
||||
Self::Plain => "",
|
||||
// U+FE0E requests text presentation on terminals with emoji-capable fonts.
|
||||
Self::Cloud => "☁\u{fe0e} ",
|
||||
// U+FE0F requests emoji presentation.
|
||||
Self::Cloud => "☁\u{fe0f} ",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user