fix(init): lock non-essential input during async wizard steps#930
Open
MathurAditya724 wants to merge 1 commit intomainfrom
Open
fix(init): lock non-essential input during async wizard steps#930MathurAditya724 wants to merge 1 commit intomainfrom
MathurAditya724 wants to merge 1 commit intomainfrom
Conversation
Contributor
|
Contributor
Codecov Results 📊✅ 6835 passed | Total: 6835 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 14049 uncovered lines. 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
a2b7c21 to
4c67495
Compare
Member
Author
|
Self-review clean, all CI checks green (unit tests, lint, typecheck, build, CodeQL, warden). Marked ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
inputLockedflag to theWizardStorethat the wizard runner sets aroundexecuteTool(),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/unlockInputbehavior (idempotency, subscriber notification).Fixes #478