Skip to content

fix(tui): suspend cleanly on ctrl-z#3697

Merged
esengine merged 2 commits into
esengine:main-v2from
lizhengwu:fix/tui-ctrl-z-suspend-clean
Jun 9, 2026
Merged

fix(tui): suspend cleanly on ctrl-z#3697
esengine merged 2 commits into
esengine:main-v2from
lizhengwu:fix/tui-ctrl-z-suspend-clean

Conversation

@lizhengwu

@lizhengwu lizhengwu commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Map Ctrl+Z to Bubble Tea's suspend path so explicit user suspend can release terminal state before stopping.## Summary

  • Map Ctrl+Z to Bubble Tea's suspend path so explicit user suspend can release terminal state before stopping.
  • Add focused coverage that verifies Ctrl+Z produces 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 / SIGTTIN is planned separately.

Refs: #3655

Test plan

  • go test ./internal/cli -run TestCtrlZSendsSuspend -count=1
  • go test ./internal/cli -count=1
  • go test -race ./internal/cli -run TestCtrlZSendsSuspend -count=1

Map Ctrl+Z to Bubble Tea's suspend path so explicit user suspend can release terminal state before stopping.
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development tui Terminal UI / CLI (internal/cli, internal/control) labels Jun 9, 2026

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@esengine esengine merged commit 5d1b106 into esengine:main-v2 Jun 9, 2026
13 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tui Terminal UI / CLI (internal/cli, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants