fix(ci): resolve SIGTTOU hang in ci view for snap installations
Closes #8165 (closed)
Summary
The explicit screen.Init() call added in v1.83.0 (commit a146646e) to fix MCP non-interactive crashes caused glab ci view to hang with SIGTTOU signal in snap strict confinement environments.
Root Cause
- In v1.82.0, tview called
screen.Init()internally, which worked fine - In v1.83.0+, explicitly calling
screen.Init()before passing the screen to tview caused terminal control issues in snap's strict sandbox - The process lost proper terminal foreground control, resulting in SIGTTOU signal blocking terminal output and 100% CPU usage
Solution
- Keep the TTY check to protect MCP/non-interactive environments
- Remove explicit
screen.Init()andscreen.Fini()calls - Let
tview.Application.Run()handle screen initialization internally
This preserves the fix for work item #8168 (closed) (MCP crashes) while resolving the snap installation hang reported by multiple users.
Testing
- Compiled successfully
- TTY check remains in place for non-interactive environments
- Screen initialization is delegated to tview as it was in v1.82.0