T36: review round 1: every pair of a known key is checked before the last of each key wins, a clear's too, so a report that breaks a rule anywhere drops whole; a sequence counts its length from OSC through ST with the controls its body skips; the scanners pass DEL and high bytes by in an escape as vte does, so ESC DEL c resets the records too
CI / platforms (ubuntu-24.04) (push) Successful in 1m6s
CI / platforms (windows-latest) (push) Successful in 1m33s
CI / macos (push) Successful in 14m17s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-17 00:54:03 -04:00
1 parent 42b272ece6
commit 4a269cb57a
8 files changed
+133 -56

No files matched your search

+1 -1
View File
@@ -98,4 +98,4 @@ ELYTerminal. A terminal on GPUI and Ely components. `PRD.md` says what it does;
- 2026-10-16: the sessions and right columns resize by a drag on their border toward the terminal, which the owner asked for on macOS, Windows and Linux. Ely's `ShellColumn::resizable`, added to Ely for this, puts Ely's `resize_handle` on the border toward the filling column, the sessions column's right and the right column's left: the handle draws that border, a filled hairline, since gpui paints a border no wider than half its box, and the line it drew at first showed half a pixel on macOS and none on X11; it occludes the header under it, so a press there drags the border, not the window, on Windows too, where an unoccluded drag region takes the press as the caption. A drag sets off from the wider of the width drawn and the one kept: a header's parts may hold a column wider, and a window too narrow for both widths squeezes them, where a drag from the squeezed width jumped back against the pointer; a drag that has not moved sideways changes nothing, and one that comes back where it set off gives the width it had. A set width in Ely became a flex basis, so a column holds its header's own parts: at a set width under them, Windows' caption buttons ran out of the window. The widths, 160 to 960 pixels, show at once and are saved in `sessions_width` and `panel_width` through `SettingsStore::update` 0.5 s after a drag rests, as the window's size is; a drag in the half second before the window closes is lost, and a save the store refuses puts the columns back. A window too narrow for both yields the terminal its header's width, as Ely's set widths give way.
- 2026-10-16: prompts and commands carry OSC 133 marks, which the owner asked for, read as Ghostty reads them: A or N starts a prompt, B or I ends it, C starts a command's output, and D ends the command with its status, D's first option, none when that is no number. The tap reads any program's marks before the parser, so it never sees the cursor: A's fresh line and L, which need it, are not done, and P adds nothing to A. Each session keeps the status its last command ended with. The integration marks what the shell leaves unmarked, and the user's prompt still sees the command's status. zsh: precmd reads `$?` and sends D after a command ran, preexec sends C, and a last precmd hook wraps PS1 in A and B under `prompt_percent`, which the first prompt says while it is off; it moves to the end of `precmd_functions` at each prompt, since a theme that sets PS1 in a hook of its own loads after it, and at the first prompt `sched +0` wraps it once more, since zsh runs due events after every precmd hook; that call returns the command's status, which the prompt shows, but it would reset `$pipestatus`, so it serves the first prompt alone. bash: PROMPT_COMMAND's first entry reads `$?`, which each entry resets, and its last wraps PS1. From bash 4.4 PS0 sends C and its subscript notes that a command ran, since bash prints no PS0 for an empty line, and the first entry sends D for it; both need `promptvars`, on by default. macOS's bash 3.2 has no PS0 and nothing else between reading a line and running it: its DEBUG trap runs for a key binding's command (`bind -x`) as for a typed one, with nothing to tell the two apart, runs for no line that is only a subshell, and under `extdebug` its status decides whether a command runs. So bash 3.2 sends no C, and Ghostty's automatic integration skips bash 3.2. Its D comes from PS1 once `\#`, the command number, has moved, which neither a key binding nor an empty line does; readline sends a prompt's escapes again at each redraw, so that D goes again with it, the same status. Every mark of a command rides an expansion, which `promptvars` turns on, so while it is off at start the script says so rather than mark nothing without a word. fish 4.3 marks its own prompts and commands, fish 4.0 all but B, older ones none: the script adds what the running fish lacks, around the prompt shown, and wraps it again when the user's changes. PowerShell: the prompt reads `$?` first and sets it back for the user's prompt through `Write-Error '' -ErrorAction Ignore`, which adds nothing to `$Error`. A failure ends with `$LASTEXITCODE` when a program set it during the line, since each run stores a new object, equal or not, which `[object]::ReferenceEquals` tells apart, unless the line surely ends in PowerShell: its syntax tree, read as PSReadLine hands the line over, ends in a cmdlet, as `Get-Command` resolves the name, aliases through, in a name not found, or in no command; such a line ends with 1, a cmdlet's failure under `-ErrorAction Ignore` too. A line that ends in a block, a function, a script or a call through a variable takes the code of a program it ran: only a hook on every command lookup would name the last command run, and it slowed a loop of commands by half. `$LASTEXITCODE` is read through `Get-Variable`, since strict mode refuses an unset variable and a prompt that fails falls back to `PS>`. C goes out when PSReadLine hands over a line that is not blank; without PSReadLine the script says it marks no command. herdr passes no OSC 133 on, so a session running herdr keeps the status from before it.
- 2026-10-16: the view jumps between prompts, which the owner asked for, as Ghostty jumps: Cmd-Up and Cmd-Down, with Shift or without, on macOS, Ctrl-Shift-Up and Ctrl-Shift-Down elsewhere, scroll to the prompt that starts before or after the view's top; a prompt on the screen's last page means the bottom, which the view cannot pass, and with none there nothing moves. alacritty's rows hold no marks, and the tap, which reads before the parser, never sees the cursor, so the tap rewrites what goes to the parser: an OSC that may be a mark is held whole until it ends and read as `marks` reads it, and a prompt's start becomes an OSC 8 link of the terminal's own, its target `\x7f`, which no program names, its id `\x7f` and the prompt's number; the prompt's end closes it. The parser stamps each cell the prompt prints with the link, SGR 0 keeps it, and it rides the cells through scroll, reflow and history; a prompt starts on the first row that shows its number, blank rows within it passed. A program's own link keeps its target and takes the prompt's number in its id: one opened inside a prompt carries it, and a prompt that starts inside one opens it again with the number and gives back its own id at the prompt's end, its target kept whole as the scanner keeps it; its end inside a prompt takes the prompt's link up again. A cursor restore that brings back a link passes the rewrite by. An OSC held, a body of 4096 bytes at most as the scanner keeps it and twice that with the controls vte skips, shows nothing until it ends; controls vte runs inside an escape go on before an ESC that waits, and only an ESC from ground waits: one that ends an OSC goes on with it, so what follows runs where the parser stands. A rewrite turns a mark of 8 bytes inside a program's link into that link again, its target up to 4096 bytes, so the tap reads about 2 KB of the buffer's room at a time, which moved 3 MB through a pty as fast as larger reads. Links, Cmd-press among them, pass over the prompt's link. The tap's OSC scanner ends a body as vte does, at BEL, ESC, CAN or SUB, and skips the controls vte skips, so a mark and its link agree.
- 2026-10-17: programs say what they are doing through OSC 7501, revision 0.4 of the Program Status Protocol, which the owner asked for, read as the spec reads it: pairs `key=value` joined by `:`, a malformed pair skipped, an unknown key passed by, the last of a key kept. A sequence over 4096 bytes, a key over 16, an app over 32, an id outside its grammar or limits (128 bytes, 32 a segment, 8 levels), a title or msg over its limits, not base64, not UTF-8 or holding a control character, and a missing or unknown state each drop it whole; kind counts only with blocked, and progress, 0 to 100, only with working and blocked, each absent when unknown. Each terminal keeps its records by id, the root's empty: a report replaces its record whole, clear drops the record and those under it, or all without an id, and past 256 the record updated longest ago goes. A new prompt drops working, blocked and idle records, as kitty does, and keeps done and error; a full reset, which the tap's scanner sees as `ESC c`, drops all, and DECSTR nothing. The query `OSC 7501 ; ?` is answered with every state and kind; the view writes the answer when the session hears the query, ahead of the parser's answers to what came later in the same read, so a DA1 sent after the query, as the spec suggests, comes back second, and one sent before it in the same read comes back after it.
- 2026-10-17: programs say what they are doing through OSC 7501, revision 0.4 of the Program Status Protocol, which the owner asked for, read as the spec reads it: pairs `key=value` joined by `:`, a malformed pair skipped, an unknown key passed by, and every pair of a known key checked, a clear's too, before the last of each key is kept. A sequence over 4096 bytes, counted from OSC through ST with the controls its body skips, a key over 16, an app over 32, an id outside its grammar or limits (128 bytes, 32 a segment, 8 levels), a title or msg over its limits, not base64, not UTF-8 or holding a control character, and a missing or unknown state each drop it whole; kind counts only with blocked, and progress, 0 to 100, only with working and blocked, each absent when unknown. Each terminal keeps its records by id, the root's empty: a report replaces its record whole, clear drops the record and those under it, or all without an id, and past 256 the record updated longest ago goes. A new prompt drops working, blocked and idle records, as kitty does, and keeps done and error; a full reset, which the tap's scanner sees as `ESC c`, through the controls, DEL and high bytes vte passes by in an escape, drops all, and DECSTR nothing. The query `OSC 7501 ; ?` is answered with every state and kind; the view writes the answer when the session hears the query, ahead of the parser's answers to what came later in the same read, so a DA1 sent after the query, as the spec suggests, comes back second, and one sent before it in the same read comes back after it.
+8
View File
@@ -105,6 +105,14 @@ impl Prompts {
self.out.push(byte);
State::Escape { sent }
}
// vte passes DEL and high bytes by in the escape: the ESC goes on, then they.
(State::Escape { sent }, 0x7f..=0xff) => {
if !sent {
self.release();
}
self.out.push(byte);
State::Escape { sent: true }
}
(State::Escape { .. }, _) => {
// A full reset clears the link the parser writes with.
if byte == b'c' {
+8
View File
@@ -211,6 +211,14 @@ fn controls_after_an_osc_s_closing_escape_run_where_vte_runs_them() {
assert_eq!(prompt(&marked.grid()[Line(1)]), Some(1));
}
#[test]
fn del_and_high_bytes_in_an_escape_go_on_after_it() {
assert_eq!(
passed(&[b"\x1b\x7f]133;A\x07$\x1b\xff", b"]133;B\x07"]),
b"\x1b\x7f]8;id=\x7f1;\x7f\x07$\x1b\xff]8;;\x07"
);
}
#[test]
fn controls_vte_runs_inside_an_escape_go_on_before_the_link() {
assert_eq!(
+25 -33
View File
@@ -64,9 +64,9 @@ const BASE64: GeneralPurpose = GeneralPurpose::new(
GeneralPurposeConfig::new().with_decode_padding_mode(DecodePaddingMode::Indifferent),
);
/// The sequence in an OSC 7501 body past `7501;`; none for one the spec drops, logged with why.
pub fn read(body: &[u8]) -> Option<Status> {
parse(body)
/// The sequence in an OSC 7501 body past `7501;`, `length` bytes from OSC through ST; none for one the spec drops, logged with why.
pub fn read(body: &[u8], length: usize) -> Option<Status> {
parse(body, length)
.inspect_err(|why| log::warn!("pty: OSC 7501 dropped: {why}"))
.ok()
}
@@ -81,15 +81,16 @@ fn named(byte: u8) -> bool {
byte.is_ascii_alphanumeric() || b"_.+-".contains(&byte)
}
fn parse(body: &[u8]) -> Result<Status, String> {
// ESC ] 7501 ; and an ST of two bytes frame the body.
if body.len() + 9 > SEQUENCE {
return Err(format!("over {SEQUENCE} bytes"));
fn parse(body: &[u8], length: usize) -> Result<Status, String> {
if length > SEQUENCE {
return Err(format!("{length} bytes, over {SEQUENCE}"));
}
if body.trim_ascii() == b"?" {
return Ok(Status::Query);
}
let mut pairs = Vec::new();
// Every pair is checked before the last of each key wins.
let (mut state, mut id, mut kind, mut progress, mut app, mut title, mut msg) =
(None, None, None, None, None, None, None);
for pair in body.split(|&byte| byte == b':') {
// A malformed pair is skipped: no `=`, no key, or a byte outside the set.
let Some(at) = pair.iter().position(|&byte| byte == b'=') else {
@@ -105,19 +106,20 @@ fn parse(body: &[u8]) -> Result<Status, String> {
if key.len() > KEY {
return Err(format!("a key over {KEY} bytes"));
}
let ascii = |bytes| String::from_utf8(Vec::from(bytes)).expect("ASCII");
pairs.push((ascii(key), ascii(value)));
let value = String::from_utf8(value.to_vec()).expect("ASCII");
match key {
b"state" => state = Some(value),
b"id" => id = Some(self::id(&value)?),
b"kind" => kind = Some(value),
b"progress" => progress = Some(value),
b"app" if value.len() > APP => return Err(format!("an app over {APP} bytes")),
b"app" => app = Some(value),
b"title" => title = Some(text(&value, "title", 256, 192)?),
b"msg" => msg = Some(text(&value, "msg", 2732, 2048)?),
_ => {}
}
}
// The last of a key wins.
let get = |key: &str| {
pairs
.iter()
.rev()
.find(|(name, _)| name == key)
.map(|(_, value)| value.as_str())
};
let id = get("id").map(id).transpose()?;
let state = match get("state").ok_or("no state")? {
let state = match state.as_deref().ok_or("no state")? {
"idle" => State::Idle,
"working" => State::Working,
"done" => State::Done,
@@ -126,30 +128,20 @@ fn parse(body: &[u8]) -> Result<Status, String> {
"clear" => return Ok(Status::Clear(id)),
other => return Err(format!("state {other} is not the spec's")),
};
let kind = match (state, get("kind")) {
let kind = match (state, kind.as_deref()) {
(State::Blocked, Some("permission")) => Some(Kind::Permission),
(State::Blocked, Some("question")) => Some(Kind::Question),
(State::Blocked, Some("auth")) => Some(Kind::Auth),
_ => None,
};
let progress = match state {
State::Working | State::Blocked => get("progress")
State::Working | State::Blocked => progress
.filter(|value| value.bytes().all(|byte| byte.is_ascii_digit()))
.and_then(|value| value.parse::<u8>().ok())
.filter(|&value| value <= 100),
_ => None,
};
let app = match get("app") {
Some(app) if app.len() > APP => return Err(format!("an app over {APP} bytes")),
Some(app) if !app.is_empty() && app.bytes().all(named) => Some(app.to_string()),
_ => None,
};
let title = get("title")
.map(|value| text(value, "title", 256, 192))
.transpose()?;
let msg = get("msg")
.map(|value| text(value, "msg", 2732, 2048))
.transpose()?;
let app = app.filter(|app| !app.is_empty() && app.bytes().all(named));
let record = Record {
state,
kind,
+51 -8
View File
@@ -4,6 +4,11 @@ fn encoded(text: &[u8]) -> String {
BASE64.encode(text)
}
/// What `body` says when its sequence is as long as its frame makes it.
fn said(body: &[u8]) -> Option<Status> {
read(body, body.len() + 9)
}
fn record(state: State, app: Option<&str>) -> Record {
Record {
state,
@@ -16,7 +21,7 @@ fn record(state: State, app: Option<&str>) -> Record {
}
fn reported(body: &str) -> Record {
match read(body.as_bytes()) {
match said(body.as_bytes()) {
Some(Status::Report(_, record)) => record,
other => panic!("{body}: {other:?}"),
}
@@ -30,7 +35,7 @@ fn the_spec_s_examples_read_as_it_means_them() {
msg: Some("Apply 3 to add, 1 to change, 0 to destroy?".into()),
..record(State::Blocked, Some("terraform"))
};
assert_eq!(read(body), Some(Status::Report(String::new(), blocked)));
assert_eq!(said(body), Some(Status::Report(String::new(), blocked)));
let body = b"state=working:id=us-east:title=VVMgRWFzdA==:progress=40:msg=UHVzaGluZyBpbWFnZQ==";
let working = Record {
progress: Some(40),
@@ -38,13 +43,13 @@ fn the_spec_s_examples_read_as_it_means_them() {
msg: Some("Pushing image".into()),
..record(State::Working, None)
};
assert_eq!(read(body), Some(Status::Report("us-east".into(), working)));
assert_eq!(said(body), Some(Status::Report("us-east".into(), working)));
assert_eq!(
read(b"state=clear:id=us-east"),
said(b"state=clear:id=us-east"),
Some(Status::Clear(Some("us-east".into())))
);
assert_eq!(read(b"state=clear"), Some(Status::Clear(None)));
assert_eq!(read(b"?"), Some(Status::Query));
assert_eq!(said(b"state=clear"), Some(Status::Clear(None)));
assert_eq!(said(b"?"), Some(Status::Query));
assert_eq!(
reported("state=done:msg=VXBncmFkZWQgMTIgcGFja2FnZXM")
.msg
@@ -82,9 +87,9 @@ fn a_sequence_that_breaks_a_rule_drops_whole() {
format!("state=done:x={}", "a".repeat(4096 - 9 - 12)),
];
for body in drops {
assert_eq!(read(body.as_bytes()), None, "{body}");
assert_eq!(said(body.as_bytes()), None, "{body}");
}
assert!(read(format!("state=done:x={}", "a".repeat(4096 - 9 - 14)).as_bytes()).is_some());
assert!(said(format!("state=done:x={}", "a".repeat(4096 - 9 - 14)).as_bytes()).is_some());
}
#[test]
@@ -166,3 +171,41 @@ fn past_the_cap_the_record_updated_longest_ago_goes() {
);
assert!(records.list.iter().any(|(id, ..)| id == "r0"));
}
#[test]
fn a_clear_that_breaks_a_rule_drops_whole() {
let drops = [
"state=clear:msg=Cg==".to_string(),
"state=clear:msg=A".into(),
format!("state=clear:app={}", "a".repeat(33)),
format!("state=clear:title={}", "a".repeat(257)),
"state=clear:id=a//b".into(),
];
for body in drops {
assert_eq!(said(body.as_bytes()), None, "{body}");
}
}
#[test]
fn every_pair_counts_though_the_last_of_a_key_wins() {
let drops = [
format!("state=done:app={}:app=ok", "a".repeat(33)),
"state=done:title=A:title=VVMgRWFzdA==".into(),
"state=done:id=a//b:id=ok".into(),
format!("state=done:msg={}:msg=b2s=", encoded(b"a\nb")),
];
for body in drops {
assert_eq!(said(body.as_bytes()), None, "{body}");
}
assert_eq!(reported("state=done:app=x:app=y").app.as_deref(), Some("y"));
assert_eq!(
reported("state=done:app=a,b:app=ok").app.as_deref(),
Some("ok")
);
}
#[test]
fn the_sequence_counts_from_osc_through_st() {
assert_eq!(read(b"state=done", 4097), None);
assert!(read(b"state=done", 4096).is_some());
}
+22 -12
View File
@@ -77,11 +77,14 @@ fn report(found: Found, events: &UnboundedSender<PtyEvent>, pid: u32, last: &mut
log::debug!("pty {pid}: a full reset");
PtyEvent::Reset
}
Found::Osc(body) => {
Found::Osc(body, length) => {
if let Some(mark) = body.strip_prefix(b"133;").and_then(marks::read) {
log::debug!("pty {pid}: {mark:?}");
PtyEvent::Mark(mark)
} else if let Some(status) = body.strip_prefix(b"7501;").and_then(status::read) {
} else if let Some(status) = body
.strip_prefix(b"7501;")
.and_then(|rest| status::read(rest, length))
{
log::debug!("pty {pid}: {status:?}");
PtyEvent::Status(status)
} else if let Some(folder) = body.strip_prefix(b"7;").and_then(folder) {
@@ -152,9 +155,9 @@ enum State {
Osc,
}
/// What the scanner finds: an OSC's body, or a full reset.
/// What the scanner finds: an OSC's body with the sequence's length from OSC through ST, or a full reset.
pub(crate) enum Found<'a> {
Osc(&'a [u8]),
Osc(&'a [u8], usize),
Reset,
}
@@ -163,6 +166,8 @@ pub(crate) enum Found<'a> {
pub(crate) struct Osc {
state: State,
body: Vec<u8>,
/// The sequence's bytes so far, the controls the body leaves out too.
length: usize,
overflow: bool,
}
@@ -185,6 +190,7 @@ impl Osc {
self.state = match (self.state, byte) {
(State::Escape, b']') => {
self.body.clear();
self.length = 2;
self.overflow = false;
State::Osc
}
@@ -192,20 +198,24 @@ impl Osc {
found(Found::Reset);
State::Ground
}
// vte runs controls in an escape and stays there.
(State::Escape, 0x00..=0x17 | 0x19 | 0x1b..=0x1f) => State::Escape,
// vte runs controls in an escape, passes DEL and high bytes by, and stays there.
(State::Escape, 0x00..=0x17 | 0x19 | 0x1b..=0x1f | 0x7f..=0xff) => State::Escape,
(State::Escape, _) => State::Ground,
(State::Osc, 0x07 | 0x18 | 0x1a) => {
self.finish(found);
self.finish(1, found);
State::Ground
}
// ESC ends the body, then reads as an escape: `\` makes ST.
// ESC ends the body, then reads as an escape: `\` makes ST, counted so.
(State::Osc, 0x1b) => {
self.finish(found);
self.finish(2, found);
State::Escape
}
(State::Osc, 0x00..=0x06 | 0x08..=0x17 | 0x19 | 0x1c..=0x1f) => State::Osc,
(State::Osc, 0x00..=0x06 | 0x08..=0x17 | 0x19 | 0x1c..=0x1f) => {
self.length += 1;
State::Osc
}
(State::Osc, byte) => {
self.length += 1;
if self.body.len() < MOST {
self.body.push(byte);
} else {
@@ -218,11 +228,11 @@ impl Osc {
}
}
fn finish(&mut self, found: &mut impl FnMut(Found)) {
fn finish(&mut self, end: usize, found: &mut impl FnMut(Found)) {
if self.overflow {
log::warn!("pty: an OSC over {MOST} bytes dropped");
} else {
found(Found::Osc(&self.body));
found(Found::Osc(&self.body, self.length + end));
}
self.body.clear();
}
+17 -1
View File
@@ -7,7 +7,7 @@ fn scan(chunks: &[&[u8]]) -> Vec<String> {
for chunk in chunks {
scanner.feed(chunk, &mut |thing| {
found.push(match thing {
Found::Osc(body) => String::from_utf8(body.to_vec()).expect("utf-8"),
Found::Osc(body, _) => String::from_utf8(body.to_vec()).expect("utf-8"),
Found::Reset => "RESET".into(),
})
});
@@ -25,6 +25,22 @@ fn finds_a_full_reset_between_bodies() {
scan(&[b"\x1b[c\x1b]0;c"]).is_empty(),
"DA1 and an unfinished body"
);
// vte passes DEL and high bytes by in an escape, and the reset still comes.
assert_eq!(scan(&[b"\x1b\x7fc\x1b\xff", b"c"]), ["RESET", "RESET"]);
}
#[test]
fn a_sequence_counts_from_osc_through_st_skipped_controls_too() {
let mut lengths = Vec::new();
let mut osc = b"\x1b]7501;".to_vec();
osc.extend([0; 5000]);
osc.extend_from_slice(b"state=done\x07\x1b]0;t\x1b\\");
Osc::default().feed(&osc, &mut |found| {
if let Found::Osc(body, length) = found {
lengths.push((body.len(), length));
}
});
assert_eq!(lengths, [(15, 5018), (3, 7)]);
}
#[test]
+1 -1
View File
@@ -53,7 +53,7 @@ What no check reached: no real KWin drew the blur; of Wayland desktops, only Hyp
| Shell integration for zsh, bash, fish, PowerShell; a shell without it reports nothing and the panels say so | T05 | `term::shell` tests on macOS and Linux | Pass |
| Prompt marks, OSC 133, from the shell integration and any program; each session keeps its last command's status | T34 | `term::marks` tests: each letter and option as Ghostty reads them; `term::tap` and `term::pty` tests: marks split across reads reach the session in order; `term::shell` tests: zsh, bash, fish and PowerShell send C, D;1, A and B around a failing command, and the user's prompt still shows the failure, a zsh theme's that sets PS1 in its own hook too, whose first prompt is marked before any command, and `$pipestatus` stays; bash's lone subshell ends with D;7, `$_` stays, a command runs under `extdebug` after a failure, a key binding marks nothing, the user's DEBUG trap runs, bash 3.2 sends no C, and bash says at start why it marks nothing while `promptvars` is off; PowerShell reads 1 for a cmdlet's failure under `-ErrorAction Ignore` after a success, a native code twice, a native failure's code under `$PSNativeCommandUseErrorActionPreference`, on a line that mixes a program and a cmdlet the cmdlet's 1, and through a call by variable the program's code; on macOS fish 4.9 marks itself and bash 3.2 marks no C, in the Linux container fish 4.0 gets B and bash 5.2 marks C through PS0, CI's Ubuntu runs fish 3.7, which the script marks whole; by hand in a pty, PowerShell under strict mode, and a cmdlet's failure after a native one's reads 1 | Pass |
| Jump to the prompt before or after the view's top, as Ghostty jumps | T35 | `term::prompts` tests: a mark becomes its prompt's numbered link, read as the session reads marks, whole when split across reads at every byte, and other sequences, `133;AB` among them, pass as they came; a prompt's cells carry its link through SGR 0 and a resize, its input none; a program's own link and the prompt's keep each other, a program's link inside a prompt carries the prompt's number, a prompt inside a link left open too, a target of 264 bytes in either order; controls after an OSC's closing ESC keep their line; a long escape of controls keeps the pty reading; a prompt over rows starts at its first, blank rows within it too; up and down land as Ghostty's `scrollPrompt`; `term::links`: a prompt's link is no target; `term::pty`: through the event loop the prompt's cell alone carries it; in the app on macOS, Cmd-Up once and twice put PROMPT-3 and PROMPT-2 at the top, and Cmd-Shift-Down and Cmd-Down came back to the screen's bottom; the review's fixtures of a prompt that starts with a link and of a prompt with a blank row jumped to PROMPT-3-FIRST, and its fixture of `133;AB` marks found no prompt; the second review's fixtures of a prompt all in a link and of a linked first row jumped to PROMPT-3-FIRST. The keys off macOS are bound, not run | Pass |
| Program status, OSC 7501 revision 0.4: reports checked as the spec checks them, records per terminal, a new prompt and a full reset, the support query | T36 | `term::status` tests: the spec's examples read as it means them; a malformed pair is skipped, the last of a key wins, unknown keys pass; a sequence over any limit, with bad base64, UTF-8 or a control character, or without a known state drops whole; kind and progress count only with their states; records replace whole, clear with those under them, and past 256 the one updated longest ago goes; a new prompt keeps done and error alone. `term::tap`: a full reset found between bodies. `term::pty`: a report, a query and a full reset reach the session in order through the event loop. In the app on macOS, a program that sent the query and then DA1 read the answer with every state and kind, then DA1's | Pass |
| Program status, OSC 7501 revision 0.4: reports checked as the spec checks them, records per terminal, a new prompt and a full reset, the support query | T36 | `term::status` tests: the spec's examples read as it means them; a malformed pair is skipped, the last of a key wins, unknown keys pass; a sequence over any limit, with bad base64, UTF-8 or a control character, or without a known state drops whole, a clear too, and an earlier pair of a key counts though the last wins; the sequence's length counts the controls its body skips; kind and progress count only with their states; records replace whole, clear with those under them, and past 256 the one updated longest ago goes; a new prompt keeps done and error alone. `term::tap`: a full reset found between bodies, and through DEL and high bytes in its escape. `term::pty`: a report, a query and a full reset reach the session in order through the event loop. In the app on macOS, a program that sent the query and then DA1 read the answer with every state and kind, then DA1's | Pass |
| Inside herdr, the folder of herdr's focused pane, read from its socket, on macOS, Linux and Windows | T29, T32 | `term::herdr` tests: the socket found as herdr 0.9 finds it, only the terminal client followed and a remote one refused, the snapshot read, a socket round trip, a process's path, arguments and variables; `the_foreground_is_the_program_s_own_group`; on X11 with herdr 0.9.5 run in the session: its start showed the focused pane's folder, a cd in the pane moved the panel, the focus moved to a pane in `/etc` and back moved it each time, and the client's end gave the panel back to bash's report, then `exec herdr` from that bash, with `HERDR_SOCKET_PATH` relative to its folder, was followed through the socket there; on macOS under `shot`, herdr 0.9.5 as the program and again by `exec` from `sh` with a relative socket, its pane's cd moved the panel; on Windows, `term::herdr` tests on the CI runner: the folder under `APPDATA` and `USERPROFILE`, the `herdr.exe` nearest under the shell, this test's name, arguments and variables read through the live process list and `sysinfo`, a round trip over a named pipe; no real herdr has run on Windows yet | Partial |
| Colors, styles, five underlines, wide characters, combining marks | T06 | `term::frame`, `term::ink`, `term::paint` tests | Pass |
| Box drawing, blocks and powerline shapes as geometry | T07 | `term::boxes` tests | Pass |