Skip to content

fix: remove awaits inside Promise.race in shell integration test#319068

Merged
anthonykim1 merged 1 commit into
microsoft:mainfrom
Tyriar:cursor/fix-promise-race-awaits-0f62
May 30, 2026
Merged

fix: remove awaits inside Promise.race in shell integration test#319068
anthonykim1 merged 1 commit into
microsoft:mainfrom
Tyriar:cursor/fix-promise-race-awaits-0f62

Conversation

@Tyriar
Copy link
Copy Markdown
Contributor

@Tyriar Tyriar commented May 29, 2026

Awaiting promises before passing them to Promise.race serializes the competitors and defeats the race. Pass the timeout and onDidChangeInput promises directly so the timeout can fire while waiting for input.

@meganrogge @anthonykim1

Awaiting promises before passing them to Promise.race serializes the
competitors and defeats the race. Pass the timeout and onDidChangeInput
promises directly so the timeout can fire while waiting for input.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 22:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes an async/await misuse in the shell integration addon integration test so the prompt input change wait logic actually races a timeout against an input-change event.

Changes:

  • Removes premature await from the promises passed into Promise.race, ensuring the race behaves as intended.

@anthonykim1 anthonykim1 enabled auto-merge (squash) May 30, 2026 22:15
@anthonykim1 anthonykim1 added this to the 1.123.0 milestone May 30, 2026
@anthonykim1 anthonykim1 merged commit f2c2a86 into microsoft:main May 30, 2026
25 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.

5 participants