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
tui: harness icons are back beside tab names; native checks follow 0.1.14's panes and keys
bubu-dudu178ec8a50769
diff --git a/tui/src/options/mod.rs b/tui/src/options/mod.rsindex 2a8e4b5ab..c0b264515 100644--- a/tui/src/options/mod.rs+++ b/tui/src/options/mod.rs@@ -150,7 +150,8 @@ pub fn status_window_format(name: &str, star: bool) -> String {// window's auto-renamed name) — the two can differ, which is the point of the option.let name_part = if name == "pane" { "#{pane_title}" } else { "#{window_short_name}" };let mark = if star { "#{?window_active,*,#{?window_last_flag,-,}}" } else { "#{?window_last_flag,-,}" };- format!("#I:{name_part}{mark}#{{s/[*-]//:window_flags}}#{{?#{{==:#{{window_agent_state}},idle}},,#{{?window_agent_icon, #{{window_agent_icon}},}}")+ // (Two closing braces: the idle test's and the icon's. With one, the icon never showed.)+ format!("#I:{name_part}{mark}#{{s/[*-]//:window_flags}}#{{?#{{==:#{{window_agent_state}},idle}},,#{{?window_agent_icon, #{{window_agent_icon}},}}}}")}/// The status bar's `window-status-*` overrides for a tab name source [name] (`tmux`|`pane`) and a@@ -655,6 +656,18 @@ pub fn unescape(s: &str) -> String {mod tests {use super::*;+ /// Every `#{` of a tab's status text is closed: one short, and the harness icon after a tab's+ /// name (working, waiting on you) was never drawn.+ #[test]+ fn a_tabs_status_text_closes_every_brace() {+ for name in ["tmux", "pane"] {+ for star in [true, false] {+ let format = status_window_format(name, star);+ assert_eq!(format.matches("#{").count(), format.matches('}').count(), "{format}");+ }+ }+ }+#[test]fn quoting_as_tmux_prints_it() {assert_eq!(escape("a$b\"c\\d"), r#""a\$b\"c\\d""#);diff --git a/tui/tests/pane-ui.py b/tui/tests/pane-ui.pyindex 43aba6b65..86cd79f49 100644--- a/tui/tests/pane-ui.py+++ b/tui/tests/pane-ui.py@@ -198,16 +198,17 @@ try:wait(lambda: pane_background(first) == active_bg and pane_background(second) == inactive_bg, 'whole-pane focus contrast')assert background_at(149, 0) == inactive_bg, 'panes reach the window edges: no outer margin'wait(lambda: pane_edge_background(first, active_bg), 'focused background fills through the pane edges')- assert background_at(49, 20) == background_at(99, 20) == 'default', 'pane gaps use the native terminal background'+ # Blurred panes touch side by side, as boxes do (#877): the divider column is the left pane's edge.+ assert background_at(49, 20) == active_bg and background_at(99, 20) == inactive_bg, 'side by side panes touch, no gap between them'assert pane_edge_background(second, inactive_bg)tab = value(hn('show', '-gwv', 'window-status-current-format'))label = value('#{window_index}:#{window_short_name}')assert tab.startswith(label + '* '), (tab, label)assert value('#{window_agent_icon}') in tab[len(label):]assert '*' in value('#{window_flags}')- selected_bg = hn('show', '-gwv', 'window-status-current-style').split('bg=')[1].split(',')[0]- normal_bg = hn('show', '-gwv', 'window-status-style').split('bg=')[1].split(',')[0]- assert selected_bg == normal_bg, 'the star identifies the active tab without a second filled highlight'+ # The tab styles leave the bar's own colour alone (#877: no filled tab by default), whatever it is.+ assert hn('show', '-gwv', 'window-status-current-style') == hn('show', '-gwv', 'window-status-style'), 'the star identifies the active tab without a second filled highlight'+ normal_bg = background_at(0, 41)current = value('#{window_id}')other = next(w for w in hn('list-windows', '-F', '#{window_id}').splitlines() if w != current)hn('select-window', '-t', other)@@ -438,12 +439,13 @@ try:wait(lambda: pane_background(first) == '#eeeeee' and pane_background(second) == '#e5e5e5', 'light focus contrast')wait(lambda: pane_edge_background(first, '#eeeeee') and pane_title_color(first, foreground=False) == '#eeeeee', 'light surface fills the focused pane through its padding')assert background_at(149, 0) in ('#eeeeee', '#e5e5e5'), 'light theme: the panes reach the window edges too'- light_status = hn('show', '-gv', 'status-style')+ # The bar is drawn in the theme's colours (#877), not by rewriting status-style: read it off the screen.+ light_status = background_at(0, 41)assert value('#{window_layout}') == layout_before_themesnapshot('panes-light')hn('set', '-gw', 'window-style', 'fg=red,bg=blue')background('#101010')- wait(lambda: hn('show', '-gv', 'status-style') != light_status, 'green status follows the dark theme')+ wait(lambda: background_at(0, 41) != light_status, 'the status bar follows the dark theme')assert hn('show', '-gwv', 'window-style') == 'fg=red,bg=blue'assert hn('show', '-gwv', 'window-active-style') == 'default'wait(lambda: pane_background(first) == 'colour4' and pane_background(second) == 'colour4', 'custom backgrounds win on active and inactive panes')diff --git a/tui/tests/welcome.py b/tui/tests/welcome.pyindex 1c5fa1bae..2fc034ef2 100644--- a/tui/tests/welcome.py+++ b/tui/tests/welcome.py@@ -215,14 +215,15 @@ try:shows(text)snapshot('new-window-80x24')click('Project'); shows('Search projects'); snapshot('new-window-picker-narrow')- keys('Escape', 'Escape'); shows('second window draft')+ # One Esc closes the picker. A second would close this empty window's form, and the window (#877).+ keys('Escape'); shows('second window draft')for width, height in [(45, 14), (22, 5), (1, 1), (150, 42)]: resize(width, height)shows('second window draft')anchor = position('Task')click('Project'); shows('Search projects')assert position('Task') == anchorsnapshot('new-window-picker-right')- keys('Escape', 'Escape')+ keys('Escape'); shows('second window draft')raw('\x1b]10;rgb:2020/2020/2020\x1b\\\x1b]11;rgb:ffff/ffff/ffff\x1b\\')snapshot('new-window-light')print('PASS welcome: modal separation, keyboard ownership, wide/narrow/light rendering and resize', flush=True)