Skip to content

fix(init): lock non-essential input during async wizard steps#930

Open
MathurAditya724 wants to merge 1 commit intomainfrom
issue-478-disable-inputs-during-async-init
Open

fix(init): lock non-essential input during async wizard steps#930
MathurAditya724 wants to merge 1 commit intomainfrom
issue-478-disable-inputs-during-async-init

Conversation

@MathurAditya724
Copy link
Copy Markdown
Member

During sentry init, keyboard input (tab switching, file panel scrolling) remained active while async operations like tool execution and network calls were in flight. Stray keystrokes could navigate tabs or queue up for the next prompt.

Adds an inputLocked flag to the WizardStore that the wizard runner sets around executeTool(), resumeWithRetry(), and the initial workflow start. Ctrl+C is intentionally exempt so the user can always cancel. Interactive prompts are also exempt since they need keyboard input by design.

Testing

All 6835 unit tests pass. Added 6 new tests for the store's lockInput/unlockInput behavior (idempotency, subscriber notification).

Fixes #478

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-930/

Built to branch gh-pages at 2026-05-08 06:17 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Codecov Results 📊

6835 passed | Total: 6835 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 14049 uncovered lines.
✅ Project coverage is 76.87%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    76.77%    76.87%     +0.1%
==========================================
  Files          317       317         —
  Lines        60809     60751       -58
  Branches         0         0         —
==========================================
+ Hits         46686     46702       +16
- Misses       14123     14049       -74
- Partials         0         0         —

Generated by Codecov Action

When a prompt mounts after an async operation (tool execution, network
call), terminal input buffered during the spinner arrives as a burst.
Without a grace period, those stale keystrokes can accidentally select
an option or navigate the list before the user sees the prompt.

Each prompt component now ignores input for 150ms after mounting via
useInputGracePeriod(). The rest of the UI (tab switching, file panel
scrolling, Ctrl+C) stays fully responsive during spinners — only the
prompt-level shortcuts are delayed.

Fixes #478
@MathurAditya724 MathurAditya724 force-pushed the issue-478-disable-inputs-during-async-init branch from a2b7c21 to 4c67495 Compare May 8, 2026 06:16
@MathurAditya724 MathurAditya724 marked this pull request as ready for review May 8, 2026 06:22
@MathurAditya724
Copy link
Copy Markdown
Member Author

Self-review clean, all CI checks green (unit tests, lint, typecheck, build, CodeQL, warden). Marked ready for review.

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.

Inputs remain active during async init steps (clack)

1 participant