Skip to content

fix: resume stdin when setting up dev server interactions - #1525

Merged
dannyhw merged 1 commit into
callstack:mainfrom
iamelmirr:fix-1515-fix-resume-stdin-when-setting-up-dev-o5
Nov 9, 2026
Merged

dannyhw merged 1 commit into
callstack:mainfrom
iamelmirr:fix-1515-fix-resume-stdin-when-setting-up-dev-o5

Conversation

@iamelmirr

Copy link
Copy Markdown
Contributor

Fixes #1515

If process.stdin was paused before the dev server starts (for example a CLI prompt calls unpipe() on close), Ctrl+C and the r / d / j / a shortcuts do nothing. setupInteractions enters raw mode, which clears the TTY's ISIG flag, so Ctrl+C is only delivered as stream data. A paused stream delivers nothing, so the keypress listener and the SIGINT handler are never reached.

This adds process.stdin.resume() right after process.stdin.setRawMode(true) in packages/repack/src/commands/common/setupInteractions.ts.

Testing:

  • Added a test in setupInteractions.test.ts that expects stdin.resume to be called once when interactions are set up. It fails without the change and passes with it.
  • The whole setupInteractions.test.ts file passes (11 tests).

@vercel

vercel Bot commented Nov 9, 2026

Copy link
Copy Markdown

@iamelmirr is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bbf79e6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dannyhw

dannyhw commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

/review

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel

Verdict: approve

No findings.

1 finding below minor not shown (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (a09c6307c057).

Feedback goes in the review comment threads, as a reply under the inline comment of a finding:

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Comment @apex-sentinel-staging review on this conversation to run a full review.

@dannyhw dannyhw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks!

@dannyhw
dannyhw merged commit 499679f into callstack:main Nov 9, 2026
6 of 7 checks passed
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.

Dev server ignores Ctrl+C when stdin was paused before it started (raw mode without resume)

2 participants