Skip to content

Fix macOS graphics detection through installer terminal input - #31

Merged
codr1 merged 4 commits into
mainfrom
fix/installer-terminal-probe
Sep 29, 2026
Merged

codr1 merged 4 commits into
mainfrom
fix/installer-terminal-probe

Conversation

@codr1

@codr1 codr1 commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

The installer launches Termium with stdin reopened from /dev/tty. Native macOS returns POLLNVAL for poll() on that device, so graphics detection immediately falls back to ASCII even when the terminal supports Kitty graphics. A direct launch works. Increasing the timeout in v0.2.3 could not fix that failure.

Use select() for bounded terminal-query waits, retain the one-second graphics deadlines, and log probe errors and the auto-selected renderer. Add subprocess/PTY tests covering direct launch, explicit /dev/tty redirection, the installer-style pipe handoff, delayed Kitty/Sixel replies, and no-response ASCII fallback.

Before-fix evidence: native Apple Silicon probe run passes direct launch and fails all three redirected graphics cases with POLLNVAL and renderer=tcell. The same tests pass on Linux. The temporary investigation workflow is removed from the final diff; tests run in normal platform CI.

After-fix evidence: all five cases pass on Linux, Apple Silicon, and Intel macOS in the native probe run. The before-fix run fails the redirected graphics cases on both Macs.

Local validation: Go suites with race detector and go vet passed. Includes v0.2.4 release notes.

@codr1
codr1 merged commit 8fdfb17 into main Sep 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant