fix: prevent UI freeze when tmux server is dead#444
Open
mr-sk wants to merge 1 commit intoasheshgoplani:mainfrom
Open
fix: prevent UI freeze when tmux server is dead#444mr-sk wants to merge 1 commit intoasheshgoplani:mainfrom
mr-sk wants to merge 1 commit intoasheshgoplani:mainfrom
Conversation
When the tmux server crashes but leaves a stale socket, every tmux subprocess call hangs for ~3s before failing. The status worker makes dozens of these calls per tick across all sessions, causing 30-50s UI freezes. Changes: - Add IsServerAlive() health check with 1s probe cached for 5s - Short-circuit backgroundStatusUpdate() when tmux server is dead - Add 3s timeouts to GetEnvironment() and SetEnvironment() (had none) - Add 3s timeouts to RefreshSessionCache() and RefreshPaneInfoCache() subprocess fallbacks (had none) - Pin GOTOOLCHAIN=go1.24.0 globally in Makefile (was only in release-local target) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/tmp/tmux-*/default), every tmux subprocess call hangs for ~3s before failing. The background status worker makes dozens of these calls per tick across all sessions, causing 30-50s UI freezes.IsServerAlive()health check (1s probe, cached 5s) and short-circuitsbackgroundStatusUpdate()when the server is unreachable.GetEnvironment(),SetEnvironment(),RefreshSessionCache(), andRefreshPaneInfoCache()subprocess fallbacks which previously had no timeout.GOTOOLCHAIN=go1.24.0globally in the Makefile (was only applied to therelease-localtarget).Test plan
go test ./internal/tmux/...passesgo test ./internal/ui/...passes (pre-existingTestDialogPresetCommandsfailure unrelated)make builduses Go 1.24.0 toolchain🤖 Generated with Claude Code