Skip to content

fix: remount terminal panes after shutdown to restore PTY connections#73

Merged
AmethystLiang merged 1 commit intomainfrom
AmethystLiang/shutdownDoesNotActivate
Mar 24, 2026
Merged

fix: remount terminal panes after shutdown to restore PTY connections#73
AmethystLiang merged 1 commit intomainfrom
AmethystLiang/shutdownDoesNotActivate

Conversation

@AmethystLiang
Copy link
Copy Markdown
Contributor

Summary

  • After app shutdown, terminal tabs retain stale state with dead PTY connections. When switching to a worktree where all PTYs are dead, bump a generation counter on each tab so React remounts TerminalPane components with fresh PTY connections.
  • Adds generation field to TerminalTab type and uses it in the React key for TerminalPane.
  • Converts interface declarations to type aliases in types.ts to satisfy oxlint consistent-type-definitions rule.

Test plan

  • Launch app, open a worktree with terminal tabs, quit and relaunch
  • Verify terminals reconnect and are functional after relaunch
  • Verify switching between worktrees still works correctly

🤖 Generated with Claude Code

When all PTYs are dead after shutdown, bump a generation counter on
terminal tabs so React remounts TerminalPane components with fresh
PTY connections instead of showing stale terminals.

Also converts interfaces to type aliases in types.ts to satisfy linter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AmethystLiang AmethystLiang merged commit 82425df into main Mar 24, 2026
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.

1 participant