The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
fix(hn): anchor New Harness and clarify machine context (#485)
Dee6b22d2d11421
diff --git a/docs/research/2026-09-30-hn-new-harness-centered.png b/docs/research/2026-09-30-hn-new-harness-centered.pngnew file mode 100644index 000000000..042a21813Binary files /dev/null and b/docs/research/2026-09-30-hn-new-harness-centered.png differdiff --git a/docs/research/2026-09-30-hn-new-harness-picker.png b/docs/research/2026-09-30-hn-new-harness-picker.pngnew file mode 100644index 000000000..30ee1d26cBinary files /dev/null and b/docs/research/2026-09-30-hn-new-harness-picker.png differdiff --git a/docs/research/2026-09-30-hn-pane-machine-headers.png b/docs/research/2026-09-30-hn-pane-machine-headers.pngnew file mode 100644index 000000000..caab03e7eBinary files /dev/null and b/docs/research/2026-09-30-hn-pane-machine-headers.png differdiff --git a/docs/research/2026-09-30-hn-status-local-host.png b/docs/research/2026-09-30-hn-status-local-host.pngnew file mode 100644index 000000000..b20d172c3Binary files /dev/null and b/docs/research/2026-09-30-hn-status-local-host.png differdiff --git a/tui/Cargo.lock b/tui/Cargo.lockindex 8c898fe5b..caf9fdd4c 100644--- a/tui/Cargo.lock+++ b/tui/Cargo.lock@@ -619,7 +619,7 @@ dependencies = [[[package]]name = "harness-tui"-version = "0.1.2"+version = "0.1.3"dependencies = ["alacritty_terminal","crossterm",diff --git a/tui/Cargo.toml b/tui/Cargo.tomlindex 95a74b36b..408fe601f 100644--- a/tui/Cargo.toml+++ b/tui/Cargo.toml@@ -1,6 +1,6 @@[package]name = "harness-tui"-version = "0.1.2"+version = "0.1.3"edition = "2024"[dependencies]diff --git a/tui/README.md b/tui/README.mdindex 754bfbc9b..457150d14 100644--- a/tui/README.md+++ b/tui/README.md@@ -101,12 +101,13 @@ harness's name, not what the program sets), `history-limit 10000` (agents printharnesses waiting on you and the one in front; `set-titles-string` changes it), and the status line:each window's most urgent harness state follows its name and tmux marker; idle dots are hiddenin tabs and pane headers. Connection, quota,-fleet counts, `machine:folder` and clock sit on the right. The git branch stays in its pane-header, aligned to the right with its PR and written `⑂ branch` without redundant punctuation.+fleet counts, the quoted local machine name and clock sit on the right. The git branch stays in its pane+header, aligned to the right with its PR and written `⎇ branch` without redundant punctuation.Status-bar groups are separated by two spaces, with one space at each outer edge to align-with the pane surfaces. The left session label always stays visible: the-desk uses the local machine name, independent of the focused pane's machine on the right.-Custom session names and the prefix cue remain supported.+with the pane surfaces. Window tabs start at the left, without a machine/session label.+The right side shows the machine running hn by its name in the app, such as `"office"`,+falling back to its hostname, independent of the focused pane or session name.+Custom status formats and the prefix cue remain supported.One key differs on purpose: ⇧⏎reaches the pane as `CSI 13;2u` (a new line in an agent's prompt; tmux, without `extended-keys`,sends a plain Enter).@@ -199,7 +200,7 @@ pane counts as done and unread (`✓`) until you go to that pane.- **The status line** counts the whole fleet: `?2 ✗1 ✓5 ⠹41` means two need you, one failed,five are done and unread, and 41 are working. Idle ones aren't counted, and a state with none- drops out. The right side keeps the focused pane's `machine:folder` and the clock, with two+ drops out. The right side keeps the quoted local machine name and the clock, with twospaces between groups. Branch and pull request context stay in the pane header.- **`C-b s`** lists every harness, the most urgent nearest the prompt: needs you, failed, done andunread, working, then the rest. Each row has one line: the question, what it is doing now@@ -240,7 +241,8 @@ For your own formats: `#{fleet}` (the status line's counts, ready to drop into ypaused, offline), `#{pane_agent_mark}` (the icon in its colour, as the title row draws it),`#{pane_heading}` (the name, state and watcher label fitted to the pane header; `#{pane_title}`stays complete), `#{window_agent_icon}` and `#{window_agent_state}` (its most urgent pane's), `#{pane_project}`,-`#{pane_branch}`, `#{pane_where}` (`project ⑂ branch #123` as far as it fits beside the title),+`#{pane_branch}`, `#{pane_where}` (`machine:project ⎇ branch #123` as far as it fits beside the title;+local and remote machine prefixes yield to project, branch and PR context in narrow panes),`#{pane_pr}` `#{pane_pr_state}` `#{pane_pr_url}` (the pull request for its branch), `#{pane_tokens}`and `#{fleet_tokens}` (what it, and all of them, have used: `1.2M`), `#{pane_lines}` (`+340 −52`),`#{pane_asked}` and `#{pane_did}` (what it was last asked, and what its last turn came to),@@ -258,7 +260,8 @@ has multiple accounts, extra remote accounts say `Claude@studio 20%` to distinguand Codex; Grok and other providers are not listed until a quota source is available. Existing`usage`, `usage_high` and `usage_high_mark` formats retain their used-quota meaning for customconfigurations. Other formats:-`#{pane_machine}`, `#{pane_far}` (another machine's), `#{pane_watched}` and `#{pane_watcher}`+`#{local_machine}` (this computer's name in the app, falling back to its hostname),+`#{pane_machine}` (the focused pane's machine), `#{pane_far}` (another machine's), `#{pane_watched}` and `#{pane_watcher}`(another window has the pane to type in, and who), and `#{waiting}` (the harnesses waiting onyou).diff --git a/tui/src/app.rs b/tui/src/app.rsindex f1603ac65..7d71234a1 100644--- a/tui/src/app.rs+++ b/tui/src/app.rs@@ -2181,7 +2181,7 @@ impl App {self.fit_panes();}- /// tmux's #S: this computer's name, as the status line's `[…]` shows it.+ /// tmux's #S: the session alias, or this computer's name by default.pub fn session_name(&self) -> String {if let Some(a) = &self.session_alias { return a.clone() }self.machine_session_name()diff --git a/tui/src/format.rs b/tui/src/format.rsindex 031c242fb..26fcadc10 100644--- a/tui/src/format.rs+++ b/tui/src/format.rs@@ -1287,6 +1287,9 @@ fn table(app: &App, name: &str, window: usize, pane_id: Option<u64>) -> Option<V// gethostname(3): the whole name (mac.lan); #{host_short} is it up to the first dot."host" => crate::app::full_hostname(),"host_short" => crate::app::full_hostname().split('.').next().unwrap_or("").to_string(),+ // This computer's name in Harness, including app renames; never the focused pane's.+ "local_machine" => app.fleet.machine(&app.fleet.local_id).or_else(|| app.fleet.machines.iter().find(|m| m.local))+ .map(|m| m.name.clone()).filter(|name| !name.is_empty()).unwrap_or_else(crate::app::full_hostname),// Harness's own: the machine a pane is on, and how many harnesses wait on you."machine" => pane.map(|p| app.fleet.machine_name(&p.machine_id)).unwrap_or_default(),"waiting" => app.fleet.waiting().to_string(),@@ -1321,8 +1324,8 @@ fn table(app: &App, name: &str, window: usize, pane_id: Option<u64>) -> Option<V// The harness's symbol as its title draws it (#{pane_agent_icon}, styled): in its state's// colour, needs you bold, idle dim."pane_agent_mark" => pane.and_then(|p| app.pane_state(p.id)).map(|s| agent_mark(s, app.tick)).unwrap_or_default(),- // Where the harness works: `project ⑂ branch`, then progressively shorter context- // as the pane narrows. The Unicode fork needs no patched icon font. A folder with+ // Where the harness works: `machine:project ⎇ branch`, then progressively shorter context+ // as the pane narrows. The Unicode branch marker needs no patched icon font. A folder with// no git shows its name."pane_where" => pane.zip(agent).and_then(|(p, a)| {if a.branch.is_empty() && a.project.is_empty() { return None }@@ -1330,14 +1333,15 @@ fn table(app: &App, name: &str, window: usize, pane_id: Option<u64>) -> Option<Vlet width = |s: &str| unicode_width::UnicodeWidthStr::width(s);let left = 1 + crate::draw::format_width(&pane_heading(app, window, p.id));let pr = a.pr.as_ref().map(|p| format!(" {}", p.label())).unwrap_or_default();- // A pane on another machine says which (scp's way: gpu-box:ml-lab).- let far = (p.machine_id != app.fleet.local_id && !a.project.is_empty()).then(|| format!("{}:", app.fleet.machine_name(&p.machine_id))).filter(|m| m.len() > 1);- let far_project = far.as_ref().map(|m| format!("{m}{}", a.project));- // A folder that is not a git repository: its name alone (and the machine's).- if a.branch.is_empty() { return [far_project, Some(a.project.clone())].into_iter().flatten().find(|c| room >= left + width(c) + 3) }- [far_project.as_ref().filter(|_| !pr.is_empty()).map(|fp| format!("{fp} ⑂ {}{pr}", a.branch)), far_project.as_ref().map(|fp| format!("{fp} ⑂ {}", a.branch)),- (!a.project.is_empty() && !pr.is_empty()).then(|| format!("{} ⑂ {}{pr}", a.project, a.branch)), (!a.project.is_empty()).then(|| format!("{} ⑂ {}", a.project, a.branch)),- (!pr.is_empty()).then(|| format!("⑂ {}{pr}", a.branch)), Some(format!("⑂ {}", a.branch)), Some(a.branch.clone())]+ // Both local and remote panes name their machine when there is room.+ // Drop it before project, branch or PR context as the pane narrows.+ let machine = app.fleet.machine_name(&p.machine_id);+ let qualified_project = (!machine.is_empty() && !a.project.is_empty()).then(|| format!("{machine}:{}", a.project));+ if a.branch.is_empty() { return [qualified_project, Some(a.project.clone())].into_iter().flatten().find(|c| room >= left + width(c) + 3) }+ [qualified_project.as_ref().filter(|_| !pr.is_empty()).map(|p| format!("{p} ⎇ {}{pr}", a.branch)),+ (!a.project.is_empty() && !pr.is_empty()).then(|| format!("{} ⎇ {}{pr}", a.project, a.branch)),+ qualified_project.as_ref().map(|p| format!("{p} ⎇ {}", a.branch)), (!a.project.is_empty()).then(|| format!("{} ⎇ {}", a.project, a.branch)),+ (!pr.is_empty()).then(|| format!("⎇ {}{pr}", a.branch)), Some(format!("⎇ {}", a.branch)), Some(a.branch.clone())].into_iter().flatten().find(|c| room >= left + width(c) + 3)}).unwrap_or_default(),// A pane's harness at a glance, as its title shows it (empty for a plain shell), and what itdiff --git a/tui/src/new_harness.rs b/tui/src/new_harness.rsindex c967916df..e96077fca 100644--- a/tui/src/new_harness.rs+++ b/tui/src/new_harness.rs@@ -1598,29 +1598,63 @@ mod tests {}#[tokio::test]- async fn form_and_picker_fit_every_terminal_size() {+ async fn compact_form_is_centered_and_stays_anchored_at_every_terminal_size() {let mut app = app();open(&mut app, None, None);let Some(Modal::NewHarness(mut form)) = app.modal.take() else {panic!()};- for expanded in [false, true] {- form.expanded = expanded;- for chooser in [false, true] {- if chooser {- child(&mut app, &mut form, Choice::Agent, "");- } else {- form.child = None;- }- for width in [1, 10, 21, 22, 45, 80, 109, 110, 150] {- for height in [1, 4, 5, 10, 14, 24, 42] {- let area = Rect::new(0, 0, width, height);- let mut buf = Buffer::empty(area);- if let Some(cursor) = draw(&mut buf, area, &mut form) {- assert!(area.contains(cursor), "{area:?} {cursor:?}");+ for width in [+ 1, 10, 21, 22, 45, 80, 109, 110, 120, 122, 123, 124, 150, 220,+ ] {+ for height in [1, 4, 5, 10, 14, 24, 42] {+ let area = Rect::new(3, 2, width, height);+ let mut anchor = None;+ for expanded in [false, true, false] {+ form.expanded = expanded;+ for chooser in [None, Some(Choice::Agent), Some(Choice::Clone), None] {+ if let Some(kind) = chooser {+ child(&mut app, &mut form, kind, "");+ } else {+ form.child = None;}- for (hit, _) in &form.hits {- assert_eq!(hit.intersection(area), *hit);+ for active in [false, true] {+ form.child_active = active;+ let mut buf = Buffer::empty(area);+ if let Some(cursor) = draw(&mut buf, area, &mut form) {+ assert!(area.contains(cursor), "{area:?} {cursor:?}");+ }+ for (hit, _) in &form.hits {+ assert_eq!(hit.intersection(area), *hit);+ }+ if form.area.width > 0 {+ assert!(form.area.width <= 52);+ let left = form.area.x - area.x;+ let right = area.right() - form.area.right();+ assert!(left.abs_diff(right) <= 1, "not centered in {area:?}");+ if !expanded {+ let top = form.area.y - area.y;+ let bottom = area.bottom() - form.area.bottom();+ assert!(top.abs_diff(bottom) <= 1, "not centered in {area:?}");+ }+ let position = (form.area.x, form.area.y, form.area.width);+ assert_eq!(+ *anchor.get_or_insert(position),+ position,+ "form moved in {area:?}: expanded={expanded}, active={active}"+ );+ assert_eq!(form.area.intersection(area), form.area);+ }+ if form.child_area.width > 0 {+ assert_eq!(form.child_area.intersection(area), form.child_area);+ assert_eq!(form.child_area.y, form.area.y);+ if form.child_area.x == form.area.x {+ assert!(active && width < 150);+ assert_eq!(form.child_area.width, form.area.width);+ } else {+ assert_eq!(form.child_area.x, form.area.right() + 2);+ }+ }}}}diff --git a/tui/src/new_harness/view.rs b/tui/src/new_harness/view.rsindex d97a8a620..54b7fdd0d 100644--- a/tui/src/new_harness/view.rs+++ b/tui/src/new_harness/view.rs@@ -97,29 +97,28 @@ pub fn draw(buf: &mut Buffer, body: Rect, form: &mut Form) -> Option<Position> {}}}- let side = form.child.is_some() && body.width >= 110;- let form_w = if side {- ((u32::from(body.width) - 5) * 3 / 5).min(76) as u16- } else {- body.width.saturating_sub(4).min(76)- };- let child_w = if side {- (body.width - form_w - 5).min(60)- } else {- form_w- };+ // Center the compact form itself. Options grow down and choosers open in+ // the remaining space to its right, without moving the form's anchor.+ let form_w = body.width.saturating_sub(4).min(52);+ let compact_h = 11.min(body.height.saturating_sub(2).max(5));+ let x = body.x + (body.width - form_w) / 2;+ let y = body.y + (body.height - compact_h) / 2;+ let side_w = body+ .right()+ .saturating_sub(x + form_w)+ .saturating_sub(4)+ .min(60);+ let side = side_w >= 32;+ let child_w = if side { side_w } else { form_w };let fields = form.fields();- let form_h = (fields.len() as u16 * 2 + 3).min(body.height.saturating_sub(2).max(5));+ let height = body.bottom().saturating_sub(y + 1).max(5);+ let form_h = (fields.len() as u16 * 2 + 3).min(height);let child_h = form.child.as_ref().map(|c| if c.kind.editing() { 8 } else { 22 }).unwrap_or(0)- .min(body.height.saturating_sub(2).max(5));- let total_w = if side { form_w + 2 + child_w } else { form_w };- let height = form_h.max(child_h);- let x = body.x + (body.width - total_w) / 2;- let y = body.y + (body.height - height) / 2;+ .min(height);let r = Rect::new(x, y, form_w, form_h);form.area = r;if form.child.is_none() || side || !form.child_active {@@ -147,7 +146,7 @@ pub fn draw(buf: &mut Buffer, body: Rect, form: &mut Form) -> Option<Position> {};let (label, value) = form.describe(*field);put(buf, r.x + 1, fy, 1, if active { "›" } else { " " }, accent);- let label_w = if r.width < 45 { 10 } else { 15 };+ let label_w = if r.width < 45 { 10 } else { 12 };put(buf,r.x + 3,diff --git a/tui/src/options/mod.rs b/tui/src/options/mod.rsindex b0069b3e7..733edbfad 100644--- a/tui/src/options/mod.rs+++ b/tui/src/options/mod.rs@@ -93,13 +93,12 @@ pub fn defaults() -> &'static BTreeMap<String, String> {// has it] when another window has the pane to type in, and its project and branch// where there is room. Git context stays here; the status bar keeps the location cue.m.insert("pane-border-format".into(), " #{pane_heading}#{?pane_where,#[align=right] #[dim]#{pane_where} #[nodim],}".into());- // Session and window navigation on the left; connection, quota, fleet, location and- // clock on the right. Always show the desk's local machine/session label so- // changing the focused machine or window does not shift the tab list.+ // Window navigation on the left; connection, quota, fleet, machine and clock on the+ // right. The quoted name is this computer's name in Harness, independent of focus.// One cell at each outer edge aligns status text with the pane surfaces.// Two spaces separate the window list from the information on the right.- m.insert("status-left".into(), " #{?client_prefix,#[bold],}[#{session_name}]#{?client_prefix, ›#[nobold],} ".into());- m.insert("status-right".into(), " #{?daemon_down,#[bold]daemon down#[nobold] ,}#{?usage_remaining,#{usage_remaining_mark} ,}#{?fleet,#{s/ / /:fleet} ,}#{?pane_watching,[watching] ,}#{?pane_machine,#{=/12/…:pane_machine},#{host_short}}#{?pane_current_path,:#{=/18/…:#{b:pane_current_path}},#{?pane_project,:#{=/18/…:pane_project},}} %H:%M ".into());+ m.insert("status-left".into(), " #{?client_prefix,#[bold]›#[nobold] ,}".into());+ m.insert("status-right".into(), " #{?daemon_down,#[bold]daemon down#[nobold] ,}#{?usage_remaining,#{usage_remaining_mark} ,}#{?fleet,#{s/ / /:fleet} ,}#{?pane_watching,[watching] ,}\"#{=/21/…:local_machine}\" %H:%M ".into());// Each window's most urgent harness at a glance (the symbol its pane titles show) and its// name in a few whole words (#{window_short_name}): a harness is named for its task.// Keep tmux's familiar current/previous markers beside the name, then any other@@ -117,9 +116,9 @@ pub fn defaults() -> &'static BTreeMap<String, String> {// so a terminal tab says what is in it (the status changing in the title as it works).m.insert("set-titles".into(), "on".into());m.insert("set-titles-string".into(), "#{?fleet_needs,?#{fleet_needs} ,}#{pane_title}#{?pane_agent_state, (#{pane_agent_state}),} — Harness".into());- // A session is a machine, named as the machine is (tmux's are 0, 1, …): room for its name.+ // Leave room for custom status-left formats as well as the prefix cue.m.insert("status-left-length".into(), "24".into());- // Room for both subscription allowances without cutting off location and time.+ // Room for both subscription allowances without cutting off machine name and time.m.insert("status-right-length".into(), "96".into());// Agents print a lot: ten thousand lines of scrollback (tmux keeps two).m.insert("history-limit".into(), "10000".into());@@ -667,9 +666,9 @@ mod tests {#[test]fn every_default_is_in_the_table() {for name in defaults().keys() { assert!(find(name).is_some(), "{name}") }- // tmux's own default, in the fixture; hn's status-left adds emphasis and a prefix cue.+ // tmux's own default stays in the fixture; hn leaves only padding and a prefix cue.assert!(include_str!("../../tests/fixtures/tmux-3.5a-options.txt").contains("session status-left \"[#{session_name}] \""));- assert_eq!(defaults().get("status-left").map(String::as_str), Some(" #{?client_prefix,#[bold],}[#{session_name}]#{?client_prefix, ›#[nobold],} "));+ assert_eq!(defaults().get("status-left").map(String::as_str), Some(" #{?client_prefix,#[bold]›#[nobold] ,}"));assert_eq!(defaults().get("status-interval").map(String::as_str), Some("15"));}diff --git a/tui/tests/new-harness.py b/tui/tests/new-harness.pyindex 14e7a99bf..25f775eae 100644--- a/tui/tests/new-harness.py+++ b/tui/tests/new-harness.py@@ -50,8 +50,8 @@ def state(route='dial'):def screen(): return tmux('capture-pane', '-p', '-t', 'test')def settle_ui():- # The form moves when a side chooser opens/closes. Wait for the visible- # geometry, not tmux send-keys returning, before taking mouse coordinates.+ # Wait for chooser content to redraw, not just tmux send-keys returning,+ # before taking mouse coordinates.# Crop to popup borders so animated working panes cannot keep it unsettled.previous, changed = None, time.monotonic()deadline = changed + 3@@ -137,7 +137,7 @@ try:field('Project'); shows('Clone Repository'); snapshot('new-harness-project')type_text('clone'); keys('Enter'); shows('Choose a machine'); keys('Enter'); shows('GitHub URL')raw('\x1b[200~autonomous-ai/openharness\x1b[201~'); keys('Enter')- shows('Clone: autonomous-ai/openharness')+ shows('Clone: autonomous-ai/')assert create_count() == before, 'choosing fields must not launch'field('Project'); type_text('new folder'); keys('Enter'); shows('Choose a machine'); keys('Enter'); shows('Folder name')type_text('fail-once'); keys('Enter'); shows('New Folder: fail-once')diff --git a/tui/tests/pane-ui.py b/tui/tests/pane-ui.pyindex 8a12c2022..b673fd4e1 100644--- a/tui/tests/pane-ui.py+++ b/tui/tests/pane-ui.py@@ -31,7 +31,8 @@ ENV.update(HOME=str(BASE), HN_TMPDIR=str(BASE), HN_SOCKET_NAME=PREFIX, PORT=str(TERM='xterm-256color', COLORTERM='truecolor', SHELL='/bin/sh', HARNESS_TUI_DESK='sync',HARNESS_TUI_NOTIFY='off', HN_DESKTOP='off', MOCK_DEMO='1', MOCK_RECONNECT='1', MOCK_USAGE='100')CONF = BASE / 'tmux.conf'-CONF.write_text('set -g automatic-rename off\nset -g status-right " #{usage_remaining_mark} #{s/ / /:fleet} #{pane_machine}:#{b:pane_current_path} 20:41 "\n')+CONF.write_text('set -g automatic-rename off\n'+ 'set -g status-right \' #{usage_remaining_mark} #{s/ / /:fleet} "#{=/21/…:local_machine}" 20:41 \'\n')OUTPUT = Path(os.environ['HN_PANE_UI_OUTPUT']) if os.environ.get('HN_PANE_UI_OUTPUT') else Noneif OUTPUT:OUTPUT.mkdir(parents=True, exist_ok=True)@@ -221,38 +222,45 @@ try:assert plain_header.startswith(title + ' '), (title, plain_header)hn('set', '-gu', 'status-right')default_status = hn('show', '-gv', 'status-right', strip=False)- assert all(part not in default_status for part in ('pane_branch', 'pane_where', 'git:'))- location = value('#{pane_machine}:#{b:pane_current_path}')- assert location in value(default_status), (location, value(default_status))- wait(lambda: location in tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1], 'bottom right shows the focused machine and folder')+ assert all(part not in default_status for part in ('pane_branch', 'pane_where', 'pane_machine', 'pane_current_path', 'pane_project', 'git:'))+ assert value('#{host}') == socket.gethostname(), 'standard host format keeps its hostname meaning'+ assert value('#{local_machine}') == 'studio', 'status uses the local machine name configured in the app'+ machine_label = '"studio"'+ assert machine_label in value(default_status), (machine_label, value(default_status))+ def local_machine_status():+ line = tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1]+ return re.search(re.escape(machine_label) + r' \d{2}:\d{2}$', line.rstrip()) and '[' + session + ']' not in linedef aligned_status_edges():line = tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1]- return line.startswith(' [') and len(line.rstrip()) == 149+ return re.match(r' \d+:', line) and len(line.rstrip()) == 149wait(lambda: 'Claude 0% Codex 89%' in tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1], 'default status includes both subscription allowances')wait(aligned_status_edges, 'default status text has one outer space matching the pane margins')- hn('set', '-g', 'status-right', custom_status)default_left = hn('show', '-gv', 'status-left', strip=False)session = value('#{session_name}')assert session == value('#{pane_machine}'), 'desk session is named for the local machine'for target in (third, second, first):hn('select-pane', '-t', target)- assert value(default_left).strip() == '[' + session + ']'- wait(lambda: tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1].startswith(' [' + session + ']'), 'local machine label stays visible across local and remote panes')+ assert value(default_left).strip() == ''+ wait(local_machine_status, 'quoted local machine stays beside the clock across local and remote panes; no machine label on the left')+ if target in (first, third):+ snapshot('status-local' if target == first else 'status-remote')for window in hn('list-windows', '-F', '#{window_id}').splitlines():hn('select-window', '-t', window)- assert value(default_left).strip() == '[' + session + ']'- wait(lambda: tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1].startswith(' [' + session + ']'), 'local machine label stays visible in every window')+ assert value(default_left).strip() == ''+ wait(local_machine_status, 'quoted local machine stays beside the clock in every window')hn('select-window', '-t', current)hn('select-pane', '-t', first)keys('C-b')- wait(lambda: '[' + session + '] ›' in tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1], 'prefix cue stays beside the local machine label')+ wait(lambda: tmux('capture-pane', '-p', '-t', 'test').splitlines()[-1].startswith(' › '), 'prefix cue remains before the window tabs')keys('Escape')hn('rename-session', 'work-review')- assert value(default_left).strip() == '[work-review]', 'distinct session labels remain visible'+ assert value(default_left).strip() == '', 'renaming a session does not add a left label'+ wait(local_machine_status, 'renaming a session does not change the quoted machine name')hn('set', '-g', 'status-left', '[custom] ')assert value(hn('show', '-gv', 'status-left')).strip() == '[custom]'hn('set', '-gu', 'status-left')hn('rename-session', session)+ hn('set', '-g', 'status-right', custom_status)for option in ('window-status-activity-style', 'window-status-bell-style'):assert hn('show', '-gwv', option) == 'bold'assert 'reverse' not in hn('show', '-gv', 'status-format[1]')@@ -302,20 +310,24 @@ try:wait(lambda: value('#{pane_id}') == third, 'second C-b Right')keys('C-b', 'Right')wait(lambda: value('#{pane_id}') == first, 'directional wrap')- keys('C-b', 'z')- wait(lambda: value('#{window_zoomed_flag}') == '1', 'zoom')- branch_context = value('#{pane_where}')- assert '⑂ ' + value('#{pane_branch}') in branch_context, branch_context- assert 'git:(' not in branch_context- wait(lambda: not pane_outline(first) and background_at(1, 1) == active_bg- and background_at(0, 0) == background_at(149, 40) == '#202020',- 'zoomed pane keeps its focused surface inside the canvas')- wait(lambda: background_at(0, 41) == normal_bg, 'status bar keeps its own color after transient completion notices')- x, y, w = map(int, value('#{pane_left} #{pane_top} #{pane_width}', first).split())- wait(lambda: tmux('capture-pane', '-p', '-t', 'test').splitlines()[y - 2][x:x + w].rstrip().endswith(branch_context), 'branch and PR align to the right edge')- snapshot('panes-zoomed')- keys('C-b', 'z')- wait(lambda: value('#{window_zoomed_flag}') == '0', 'unzoom')+ for target in (first, third):+ hn('select-pane', '-t', target)+ keys('C-b', 'z')+ wait(lambda: value('#{window_zoomed_flag}') == '1', 'zoom')+ branch_context = value('#{pane_where}')+ assert branch_context.startswith(value('#{pane_machine}:#{pane_project}') + ' '), branch_context+ assert '⎇ ' + value('#{pane_branch}') in branch_context, branch_context+ assert 'git:(' not in branch_context+ wait(lambda: not pane_outline(target) and background_at(1, 1) == active_bg+ and background_at(0, 0) == background_at(149, 40) == '#202020',+ 'zoomed pane keeps its focused surface inside the canvas')+ wait(lambda: background_at(0, 41) == normal_bg, 'status bar keeps its own color after transient completion notices')+ x, y, w = map(int, value('#{pane_left} #{pane_top} #{pane_width}', target).split())+ wait(lambda: tmux('capture-pane', '-p', '-t', 'test').splitlines()[y - 2][x:x + w].rstrip().endswith(branch_context), 'machine, project, branch and PR align to the right edge')+ snapshot('panes-zoomed' if target == first else 'panes-remote-zoomed')+ keys('C-b', 'z')+ wait(lambda: value('#{window_zoomed_flag}') == '0', 'unzoom')+ hn('select-pane', '-t', first)assert value('#{window_layout}') == originalprint('PASS pane UI: directional keys, wrap, zoom preserve layout structure', flush=True)