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): make shortcut hints readable across terminal themes (#475)
Dee385f5284f73d
diff --git a/docs/research/2026-09-29-hn-shortcuts-dark.png b/docs/research/2026-09-29-hn-shortcuts-dark.pngnew file mode 100644index 000000000..6f9e6b3a1Binary files /dev/null and b/docs/research/2026-09-29-hn-shortcuts-dark.png differdiff --git a/docs/research/2026-09-29-hn-shortcuts-light.png b/docs/research/2026-09-29-hn-shortcuts-light.pngnew file mode 100644index 000000000..40c16138cBinary files /dev/null and b/docs/research/2026-09-29-hn-shortcuts-light.png differdiff --git a/tui/src/modal.rs b/tui/src/modal.rsindex 3df98d366..d330b39cc 100644--- a/tui/src/modal.rs+++ b/tui/src/modal.rs@@ -480,7 +480,7 @@ pub fn inbox_rows(app: &App) -> Vec<Row> {let (mark, mark_color) = engine_mark(&a.engine);let since = crate::fleet::now_ms().saturating_sub(q.since.elapsed().as_millis() as u64);let mut detail = vec![span(who.clone(), fg(theme::MUTED))];- if !options.is_empty() { detail.push(span(format!(" {options}"), fg(theme::ACCENT))) }+ if !options.is_empty() { detail.push(span(format!(" {options}"), fg(theme::accent()))) }rows.push(Row::new(format!("{}:{}#", a.machine_id, a.id), q.prompt.clone()).extra(format!("{who} {} {options}", a.branch)).lead(vec![span("? ", fg(theme::ATTENTION).add_modifier(ratatui::style::Modifier::BOLD)), span(mark, fg(mark_color)), span(" ", Style::default())]).detail(detail)@@ -534,7 +534,7 @@ pub fn new_machine_rows(app: &App, prefer: &str) -> Vec<Row> {let mut rows: Vec<Row> = app.fleet.machines.iter().filter(|m| m.usable()).map(|m| {let running = app.fleet.agents.values().filter(|a| a.machine_id == m.id && a.status == "active").count();Row::new(m.id.clone(), m.name.clone())- .lead(vec![span(if m.id == prefer { "● " } else { "○ " }, fg(if m.id == prefer { theme::ACCENT } else { theme::ONLINE }))])+ .lead(vec![span(if m.id == prefer { "● " } else { "○ " }, fg(if m.id == prefer { theme::accent() } else { theme::ONLINE }))]).detail(vec![span(format!("{}{running} running", if m.local { "this computer · " } else { "" }), fg(theme::MUTED))])}).collect();rows.sort_by_key(|r| r.id != prefer);diff --git a/tui/src/theme.rs b/tui/src/theme.rsindex b3b0234ac..2da663b6c 100644--- a/tui/src/theme.rs+++ b/tui/src/theme.rs@@ -395,10 +395,13 @@ pub mod fzfcolor {}-// Hn's own chrome speaks the 16 ANSI colours, as tmux's does: the terminal's theme decides what-// they look like, so it reads on dark, light and Solarized alike. SOFT and MUTED are not colours-// but emphasis (the terminal's dim), `fg` turns them into that.-pub const ACCENT: Color = Color::Blue;+/// Readable accent for hn controls. ANSI blue can be nearly black in terminal themes.+/// Keep engine branding and explicitly configured tmux colors separate from chrome.+pub fn accent() -> Color {+ if palette().2 { Color::Rgb(0, 100, 120) } else { Color::Rgb(95, 215, 230) }+}+// Semantic status colors use the terminal palette. SOFT and MUTED represent emphasis;+// `fg` applies it to the theme's foreground.pub const ACCENT_SOFT: Color = Color::Cyan;pub const ONLINE: Color = Color::Green;pub const WARN: Color = Color::Yellow;@@ -1170,7 +1173,7 @@ fn engine_mark_raw(engine: &str) -> (&'static str, Color) {"grok" => ("X", TEXT),"devin" => ("◆", TEAL),"copilot" => ("◉", Color::Rgb(0x8B, 0x94, 0x9E)),- "commandcode" => ("⌘", ACCENT),+ "commandcode" => ("⌘", Color::Blue),"muse" => ("♪", ATTENTION),"agy" => ("◈", Color::Rgb(0x42, 0x85, 0xF4)),"terminal" => ("❯", SOFT),diff --git a/tui/src/ui.rs b/tui/src/ui.rsindex 8f7a1e67d..35d3109d9 100644--- a/tui/src/ui.rs+++ b/tui/src/ui.rs@@ -222,7 +222,7 @@ fn which_key(buf: &mut Buffer, app: &App, body: Rect) {if col >= cols || (items.len() > fits && i + 1 >= fits) { break }let x = area.x + 2 + (col * col_w) as u16;let y = area.y + 1 + row as u16;- buf.set_string(x, y, format!("{key:>key_w$}"), Style::default().fg(theme::ACCENT).add_modifier(Modifier::BOLD));+ buf.set_string(x, y, format!("{key:>key_w$}"), bold(theme::accent()));let room = col_w - key_w - 3;buf.set_stringn(x + key_w as u16 + 1, y, clip(what, room), room, Style::default());}@@ -378,8 +378,8 @@ fn empty_window(buf: &mut Buffer, app: &App, area: Rect) {let left = area.x + (area.width.saturating_sub(width)) / 2;let compact = area.height < 22;let mut lines: Vec<Line> = Vec::new();- if !compact { for w in WORDMARK { lines.push(Line::styled(w, fg(theme::ACCENT))) } lines.push(Line::raw("")) }- else { lines.push(Line::styled("harness", bold(theme::ACCENT))) }+ if !compact { for w in WORDMARK { lines.push(Line::styled(w, fg(theme::accent()))) } lines.push(Line::raw("")) }+ else { lines.push(Line::styled("harness", bold(theme::accent()))) }let local = app.fleet.machine(&app.fleet.local_id).map(|m| m.name.clone()).unwrap_or_default();let up = app.fleet.machines.iter().filter(|m| m.usable()).count();let sub = if app.fleet.machines.len() > 1 { format!("{local} · {up}/{} machines connected", app.fleet.machines.len()) } else { local };@@ -394,7 +394,7 @@ fn empty_window(buf: &mut Buffer, app: &App, area: Rect) {} else if rows.is_empty() {lines.push(Line::styled("Nothing running.", fg(theme::SOFT)));let hint = |c: &str| app.keymap.hint(c).unwrap_or_default();- lines.push(Line::from(vec![Span::styled(hint("new-harness"), bold(theme::ACCENT)), Span::styled(" starts a harness · ", fg(theme::MUTED)), Span::styled(hint("choose-tree -Zs"), bold(theme::ACCENT)), Span::styled(" opens a paused one", fg(theme::MUTED))]));+ lines.push(Line::from(vec![Span::styled(hint("new-harness"), bold(theme::accent())), Span::styled(" starts a harness · ", fg(theme::MUTED)), Span::styled(hint("choose-tree -Zs"), bold(theme::accent())), Span::styled(" opens a paused one", fg(theme::MUTED))]));} else {let many = app.fleet.machines.iter().filter(|m| m.usable()).count() > 1;for (index, row) in rows.iter().enumerate() {@@ -430,7 +430,7 @@ fn empty_window(buf: &mut Buffer, app: &App, area: Rect) {let bg = match (selected, theme::fzf().bw) { (true, true) => Style::default().add_modifier(Modifier::REVERSED), (true, false) => Style::default().bg(theme::fzf().bg_plus), _ => Style::default() };let tint = |c: Color| if c == theme::MUTED || c == theme::SOFT { bg.fg(theme::paint(theme_fg)).add_modifier(Modifier::DIM) } else { bg.fg(theme::paint(c)) };lines.push(Line::from(vec![- Span::styled(format!("{} ", index + 1), tint(theme::ACCENT)),+ Span::styled(format!("{} ", index + 1), tint(theme::accent())),Span::styled(format!("{dot} "), tint(color)),Span::styled(format!("{mark} "), tint(mark_color)),Span::styled(format!("{name} "), bg.fg(theme::paint(theme_fg)).add_modifier(Modifier::BOLD)),@@ -451,14 +451,14 @@ fn empty_window(buf: &mut Buffer, app: &App, area: Rect) {for (k, w) in keys {let piece_w = k.width() + w.width() + 4;if row_w + piece_w > width as usize { lines.push(Line::from(std::mem::take(&mut row))); row_w = 0 }- row.push(Span::styled(k.clone(), bold(theme::ACCENT)));+ row.push(Span::styled(k.clone(), bold(theme::accent())));row.push(Span::styled(format!(" {w} "), fg(theme::SOFT)));row_w += piece_w;}if !row.is_empty() { lines.push(Line::from(row)) }lines.push(Line::raw(""));let prefix = crate::keys::name(&app.keymap.prefix);- lines.push(Line::from(vec![Span::styled(format!("{prefix} ?"), bold(theme::ACCENT)), Span::styled(" every key ", fg(theme::SOFT)), Span::styled(format!("{prefix} d"), bold(theme::ACCENT)), Span::styled(" detach — everything keeps running", fg(theme::SOFT))]));+ lines.push(Line::from(vec![Span::styled(format!("{prefix} ?"), bold(theme::accent())), Span::styled(" every key ", fg(theme::SOFT)), Span::styled(format!("{prefix} d"), bold(theme::accent())), Span::styled(" detach — everything keeps running", fg(theme::SOFT))]));let top = area.y + area.height.saturating_sub(lines.len() as u16) / 2;for (index, line) in lines.iter().enumerate() {let y = top + index as u16;