Skip to content

Introduce PtySession lifecycle owner#204

Open
khang859 wants to merge 2 commits into
mainfrom
pty-session-lifecycle-owner
Open

Introduce PtySession lifecycle owner#204
khang859 wants to merge 2 commits into
mainfrom
pty-session-lifecycle-owner

Conversation

@khang859
Copy link
Copy Markdown
Owner

Summary

  • Add a per-pane PtySession owner for PTY process lifecycle, buffering, pause/resume, and listener cleanup
  • Refactor PtyManager to store sessions and delegate write/resize/data/exit/shutdown behavior
  • Route PTY attach buffer draining through PtyManager.drainBuffer() instead of mutating PTY entry internals
  • Add lifecycle tests for idempotent kill, natural exit cleanup, ignored writes/resizes after exit, and protected GC behavior

Validation

  • npm run typecheck:node
  • npx vitest run src/main/__tests__/pty-manager.test.ts src/main/__tests__/pty-manager-extended.test.ts

Note: full npm run lint -- --no-cache still reports pre-existing unrelated lint errors across the repo; the new pty-session.ts lint issue found during validation was fixed.

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