Skip to content

fix(watch): cleanup resources on Ctrl+Z exit#1012

Merged
fi3ework merged 2 commits intomainfrom
fix/watch-sigtstp-cleanup
Mar 5, 2026
Merged

fix(watch): cleanup resources on Ctrl+Z exit#1012
fi3ework merged 2 commits intomainfrom
fix/watch-sigtstp-cleanup

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Mar 5, 2026

Summary

  • handle Ctrl+Z in watch-mode CLI shortcuts by forwarding SIGTSTP in raw-mode input handling
  • register SIGTSTP cleanup in core test runner so watch/non-watch paths run teardown and exit with signal-consistent code
  • extend browser watch cleanup to include SIGTSTP so detached Playwright browser/runtime resources are closed before process exit

Verification

  • pnpm biome check --write 'packages/core/src/core/cliShortcuts.ts' 'packages/core/src/core/runTests.ts' 'packages/browser/src/hostController.ts'
  • pnpm --filter @rstest/core typecheck
  • pnpm --filter @rstest/browser typecheck
  • manual validation in examples/browser-react watch mode (Ctrl+Z now exits with cleanup)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db08d363bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fi3ework fi3ework merged commit fc5f933 into main Mar 5, 2026
21 of 25 checks passed
@fi3ework fi3ework deleted the fix/watch-sigtstp-cleanup branch March 5, 2026 11:04
@9aoy 9aoy mentioned this pull request Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant