Skip to content

feat(pty): close terminal tabs on process exit - #338

Merged
AprilNEA merged 2 commits into
masterfrom
xuan/code-349-pty-tab-close
Jul 30, 2026
Merged

feat(pty): close terminal tabs on process exit#338
AprilNEA merged 2 commits into
masterfrom
xuan/code-349-pty-tab-close

Conversation

@AprilNEA

Copy link
Copy Markdown
Member

Summary

  • close right and bottom terminal tabs when their PTY process exits
  • preserve exit delivery across terminal panel handoffs
  • support Cmd+W / Ctrl+W for the focused terminal tab without closing the Electron window

Verification

  • devenv shell -- pnpm check:ci
  • devenv shell -- pnpm test
  • verified normal exit, forced PTY termination, and Cmd+W in the real Electron app

Linear: https://linear.app/arcbox/issue/CODE-349/featuipty-终端进程被杀后自动关闭对应-tab

@linear-code

linear-code Bot commented Jul 30, 2026

Copy link
Copy Markdown

CODE-349

@AprilNEA
AprilNEA requested a review from SukkaW July 30, 2026 08:49
@AprilNEA
AprilNEA marked this pull request as ready for review July 30, 2026 08:49
@AprilNEA
AprilNEA requested review from Zerlight and lucas77778 July 30, 2026 09:10

@lucas77778 lucas77778 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The PTY-exit/handoff path looks sound, but the Cmd+W path still conflicts with the native macOS Close Window accelerator. Please resolve that main-process/menu ownership conflict before merging.

Comment thread apps/desktop/src/renderer/src/shell/use-desktop-shell-shortcuts.ts
@AprilNEA
AprilNEA merged commit 1e77c38 into master Jul 30, 2026
10 checks passed
@AprilNEA
AprilNEA deleted the xuan/code-349-pty-tab-close branch July 30, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants