From ee22d853eb131ecdce3a8ba54a9a1c39ee5ca4a1 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Sun, 28 Jun 2026 17:43:27 -0500 Subject: [PATCH] fix(windows): hide pdftoppm console flash on PDF attach server.py's PDF-attach handler shells out to `pdftoppm` from the console-less desktop/gateway backend; on Windows that pops a conhost window each attach. Route it through windows_hide_flags() like the sibling _list_repo_files git calls (no-op on POSIX). --- tui_gateway/server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tui_gateway/server.py b/tui_gateway/server.py index a654d690496..4eb4a1b2ff9 100644 --- a/tui_gateway/server.py +++ b/tui_gateway/server.py @@ -9126,8 +9126,13 @@ def _(rid, params: dict) -> dict: "-f", str(first_page), "-l", str(last_page), str(pdf_path), str(out_prefix), ] + from hermes_cli._subprocess_compat import windows_hide_flags + try: - res = subprocess.run(argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL) + res = subprocess.run( + argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL, + creationflags=windows_hide_flags(), + ) except subprocess.TimeoutExpired: return _err(rid, 5028, "pdftoppm timed out (>120s)") if res.returncode != 0: