You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Known fixes reviewed: reviewed recent TUI history, including fix(tui): route warning logs to status bar instead of stderr (#2210); the shell restoration sequence has been unchanged since the shell feature landed
Findings: reproduced on this Ubuntu host. After the remote exit, OpenShell re-enters and clears the alternate screen, then synchronously runs refresh_data() before the event loop can draw another frame. The refresh consists of several sequential gRPC calls with individual five-second timeouts, leaving an entirely black screen for approximately 20–30 seconds. Once the refresh finishes, the TUI redraws and responds normally
Remaining reason for filing: the blank screen looks like a terminal deadlock, accepts no visible interaction while refresh is running, and can cause users to kill the TTY even though the process eventually recovers
Description
Actual behavior: After opening a sandbox from openshell term, pressing s for a shell, and running exit, OpenShell switches back to an empty alternate screen. The screen remains black for roughly 20–30 seconds before the TUI eventually reappears. Users can reasonably interpret this as a hung terminal and kill the TTY.
Expected behavior: Exiting the sandbox shell should restore and draw the TUI immediately. Any gateway refresh should happen after a visible frame is rendered, preferably asynchronously without blocking input or rendering.
The current flow handles pending_shell_connect in crates/openshell-tui/src/lib.rs by awaiting handle_shell_connect(), then awaiting refresh_data(). handle_shell_connect() re-enters and clears the alternate screen before it returns. The event loop cannot draw until the synchronous refresh chain completes.
The terminal restoration operations (enable_raw_mode, EnterAlternateScreen, mouse capture, and terminal.clear) also discard errors with let _ = ..., which makes a genuine restoration failure indistinguishable from the refresh delay.
Reproduction Steps
Run openshell term.
Select a ready sandbox.
Press s to open its interactive shell.
Run exit.
Observe that OpenShell enters a black alternate screen with no visible TUI or feedback.
Wait approximately 20–30 seconds; the TUI eventually redraws and is responsive again.
Environment
OS: Ubuntu 24.04, Linux 6.17.0-1026-nvidia
Architecture: arm64/aarch64
Terminal: TERM=xterm-256color
Docker: 29.2.1
OpenShell: 0.0.82-dev.10+g40194f93, current main at 40194f93
Agent Diagnostic
tui-development,create-github-issue0.0.82-dev.10+g40194f93from currentmain(40194f93)v0.0.80(published 2026-07-09)fix(tui): route warning logs to status bar instead of stderr (#2210); the shell restoration sequence has been unchanged since the shell feature landedexit, OpenShell re-enters and clears the alternate screen, then synchronously runsrefresh_data()before the event loop can draw another frame. The refresh consists of several sequential gRPC calls with individual five-second timeouts, leaving an entirely black screen for approximately 20–30 seconds. Once the refresh finishes, the TUI redraws and responds normallyDescription
Actual behavior: After opening a sandbox from
openshell term, pressingsfor a shell, and runningexit, OpenShell switches back to an empty alternate screen. The screen remains black for roughly 20–30 seconds before the TUI eventually reappears. Users can reasonably interpret this as a hung terminal and kill the TTY.Expected behavior: Exiting the sandbox shell should restore and draw the TUI immediately. Any gateway refresh should happen after a visible frame is rendered, preferably asynchronously without blocking input or rendering.
The current flow handles
pending_shell_connectincrates/openshell-tui/src/lib.rsby awaitinghandle_shell_connect(), then awaitingrefresh_data().handle_shell_connect()re-enters and clears the alternate screen before it returns. The event loop cannot draw until the synchronous refresh chain completes.The terminal restoration operations (
enable_raw_mode,EnterAlternateScreen, mouse capture, andterminal.clear) also discard errors withlet _ = ..., which makes a genuine restoration failure indistinguishable from the refresh delay.Reproduction Steps
openshell term.sto open its interactive shell.exit.Environment
6.17.0-1026-nvidiaTERM=xterm-256color29.2.10.0.82-dev.10+g40194f93, currentmainat40194f93v0.0.80Logs
The PTY output after
exitstops immediately after alternate-screen entry and clear, with no frame content until the refresh completes: