fix(tui): suspend cleanly on ctrl-z#3697
Merged
esengine merged 2 commits intoJun 9, 2026
Merged
Conversation
Map Ctrl+Z to Bubble Tea's suspend path so explicit user suspend can release terminal state before stopping.
esengine
approved these changes
Jun 9, 2026
esengine
left a comment
Owner
There was a problem hiding this comment.
Verified end-to-end. Reproduced #3655's gap: without the mapping, TestCtrlZSendsSuspend fails because Ctrl+Z returns no command. With case "ctrl+z": return m, tea.Suspend it returns Bubble Tea's suspend command (tea.SuspendMsg), and the full cli package passes. The earlier lint red was the unrelated SA5011 staticcheck false positive that #3715 already suppressed — green after updating the base. Thanks.
SuMuxi66
pushed a commit
to SuMuxi66/DeepSeek-Reasonix
that referenced
this pull request
Jun 10, 2026
Map Ctrl+Z to Bubble Tea's tea.Suspend so an explicit user suspend releases terminal state before stopping. First mitigation for esengine#3655; the Unix SIGTTIN job-control guard is tracked separately.
dorokuma
pushed a commit
to dorokuma/DeepSeek-Reasonix
that referenced
this pull request
Jun 10, 2026
Map Ctrl+Z to Bubble Tea's tea.Suspend so an explicit user suspend releases terminal state before stopping. First mitigation for esengine#3655; the Unix SIGTTIN job-control guard is tracked separately.
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.
Map Ctrl+Z to Bubble Tea's suspend path so explicit user suspend can release terminal state before stopping.## Summary
tea.SuspendMsg.Scope
This is the first mitigation for #3655. It covers explicit Ctrl+Z suspend only; the Unix job-control guard for background tty-read /
SIGTTINis planned separately.Refs: #3655
Test plan
go test ./internal/cli -run TestCtrlZSendsSuspend -count=1go test ./internal/cli -count=1go test -race ./internal/cli -run TestCtrlZSendsSuspend -count=1