Drop gum from the orchestrator's progress lines

The dashboard owns the visible UI: it captures the orchestrator's stdout into
the support log and strips CSI sequences on the way in, so the colouring was
never seen by anyone. gum charged a Go process start per line for it, on every
phase and every package group. Plain writes keep the same indented shape.

Flushing stays: pacstrap and arch-chroot inherit this fd, so buffering would
reorder our lines against theirs in the log.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier HanssonandClaude Opus 5 committed 2026-07-27 15:24:35 -07:00
1 parent a8c3a671ea
commit e47ce379ad
1 file changed
+17 -13
@@ -1,24 +1,28 @@
"""Thin gum wrapper so the orchestrator keeps the same terminal UX as the
existing bash installer."""
"""Orchestrator progress lines.
These land in the install log, not on a screen: omarchy-install-dashboard owns
the visible UI, captures the orchestrator's stdout into the support log, and
strips CSI sequences on the way in. The colouring was therefore never seen by
anyone, while gum charged a Go process start per line for it. Plain writes keep
the same indented shape at no cost.
Flush every line: pacstrap and arch-chroot inherit this fd, so buffering here
would reorder our lines against theirs in the log.
"""
from __future__ import annotations
import subprocess
import sys
def style(text: str, *, foreground: str | None = None, padding: str | None = None) -> None:
cmd = ["gum", "style"]
if foreground:
cmd += ["--foreground", foreground]
if padding:
cmd += ["--padding", padding]
cmd.append(text)
subprocess.run(cmd, check=False)
def _emit(text: str) -> None:
sys.stdout.write(f"\n {text}\n")
sys.stdout.flush()
def info(text: str) -> None:
style(text, foreground="3", padding="1 0 0 4")
_emit(text)
def error(text: str) -> None:
style(text, foreground="1", padding="1 0 0 4")
_emit(text)