T40: sessions post system notifications through gpui's: each terminal posts its own in the order its output asks, when its row turns to waiting, done or error, when a command ends, and when a program asks through OSC 9, 777 or 99, only while its window is inactive or it is hidden, one every 3 seconds, titled with the session's name; a press goes to the window whose session posted it and shows it; OSC 99 hears untracked closes, alive lists what lives, in order before a later DA1, a close and w take one back where gpui can, a closed session's too, and the query says what holds where
CI / platforms (windows-latest) (push) Successful in 1m51s
CI / platforms (ubuntu-24.04) (push) Successful in 2m2s
CI / macos (push) Successful in 12m36s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-17 15:36:28 -04:00
1 parent 53b8978dff
commit 31de5e44ef
18 files changed
+512 -122

No files matched your search

+13 -10
View File
@@ -87,14 +87,9 @@ fn osc_99_gathers_chunks_by_id_and_reads_its_options() {
(Some("a"), "Hel", "World")
);
assert_eq!(
(
notice.occasion,
notice.focus,
notice.report,
notice.close,
notice.expire
),
(Occasion::Unfocused, false, true, true, Some(5000))
(notice.focus, notice.report, notice.close, notice.expire),
(false, true, true, Some(5000)),
"o passes by"
);
let other = shown(kitty.read(b"i=b:p=body;!"));
assert_eq!(
@@ -224,9 +219,17 @@ fn osc_99_drops_what_breaks_its_rules() {
#[test]
fn the_answers_name_the_asker_s_id() {
let offered = if CLOSES {
"p=title,body,close,?,alive:w=1"
} else {
"p=title,body,?,alive"
};
assert_eq!(
answer("q"),
"\x1b]99;i=q:p=?;p=title,body,?,alive:o=always\x1b\\"
format!("\x1b]99;i=q:p=?;a=focus,report:o=invisible:{offered}\x1b\\")
);
assert_eq!(alive("0"), "\x1b]99;i=0:p=alive;\x1b\\");
assert_eq!(alive("0", &[]), "\x1b]99;i=0:p=alive;\x1b\\");
assert_eq!(alive("z", &["a", "b"]), "\x1b]99;i=z:p=alive;a,b\x1b\\");
assert_eq!(untracked("n1"), "\x1b]99;i=n1:p=close;untracked\x1b\\");
assert_eq!(activated("0"), "\x1b]99;i=0;\x1b\\");
}