From e7b8aa6cc28f8dbc419a1e3f560a390622ee7569 Mon Sep 17 00:00:00 2001 From: huchenxi Date: Mon, 20 Apr 2026 01:04:21 +0800 Subject: [PATCH 1/3] fix(cli): set TERM, COLORTERM, and LANG defaults for terminal pty sessions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Terminals spawned by the hub inherit a filtered process.env, but when the hub itself is started via launchd, systemd, or Docker, these variables are often missing: - TERM unset → programs fall back to "dumb", disabling colors and cursor movement - COLORTERM unset → shells/prompts (e.g. p10k) skip truecolor output - LANG unset → non-ASCII glyphs (powerline symbols, emoji) render as replacement characters Add sensible defaults (`xterm-256color`, `truecolor`, `en_US.UTF-8`) only when the value is not already present, so explicit user overrides are still respected. --- cli/src/terminal/TerminalManager.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cli/src/terminal/TerminalManager.ts b/cli/src/terminal/TerminalManager.ts index 1b6b9eb96..3437f12a2 100644 --- a/cli/src/terminal/TerminalManager.ts +++ b/cli/src/terminal/TerminalManager.ts @@ -68,6 +68,15 @@ function buildFilteredEnv(): NodeJS.ProcessEnv { } env[key] = value } + if (!env.TERM) { + env.TERM = 'xterm-256color' + } + if (!env.COLORTERM) { + env.COLORTERM = 'truecolor' + } + if (!env.LANG) { + env.LANG = 'en_US.UTF-8' + } return env } From 1d46dc791cc835571844ffff7f99f6efb8540c98 Mon Sep 17 00:00:00 2001 From: huchenxi Date: Mon, 20 Apr 2026 01:13:48 +0800 Subject: [PATCH 2/3] ci: retrigger CI (flaky AcpSdkBackend test) From c2b73de5d84683a85c4290495ca084b5bea613de Mon Sep 17 00:00:00 2001 From: huchenxi Date: Mon, 20 Apr 2026 01:45:35 +0800 Subject: [PATCH 3/3] fix: use C.UTF-8 locale fallback on Linux for portability Address review feedback: minimal Debian-based Docker images often do not have en_US.UTF-8 generated, causing locale warnings. Use C.UTF-8 (always available) on Linux, keep en_US.UTF-8 on macOS. --- cli/src/terminal/TerminalManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/terminal/TerminalManager.ts b/cli/src/terminal/TerminalManager.ts index 3437f12a2..c3c45c047 100644 --- a/cli/src/terminal/TerminalManager.ts +++ b/cli/src/terminal/TerminalManager.ts @@ -75,7 +75,7 @@ function buildFilteredEnv(): NodeJS.ProcessEnv { env.COLORTERM = 'truecolor' } if (!env.LANG) { - env.LANG = 'en_US.UTF-8' + env.LANG = process.platform === 'darwin' ? 'en_US.UTF-8' : 'C.UTF-8' } return env }