Long-poll the desktop OAuth await endpoint - #1865
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | cbe9856 | Commit Preview URL Branch Preview URL |
Aug 30 2026, 02:43 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | cbe9856 | Aug 30 2026, 02:44 AM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
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.
Desktop OAuth connects in the system browser waited on a fixed 1s poll of
GET /api/oauth/await/:sessionId. The completed result was already in the in-memory store the moment the provider redirect landed, so the spinner sat on a ready answer for ~500ms average, up to 1s.Before: the server answered each poll synchronously from the store; the client sampled on a 1s
setInterval.After: the server holds the await request open (25s per hold) and resolves it the instant the completion listener publishes for that session; deadline or client disconnect answers
null(still pending). The client now runs one request at a time and reconnects 1s after each settles, so held requests never stack. Single-consumer semantics are unchanged, and waiters that time out or disconnect are removed.Mixed versions work in both directions: an old client gets its answer within one poll of a new server; a new client against an old server behaves exactly as today.
Testing
serve.test.ts: held request answers on publish, pre-published result answers immediately, disconnect drops the waiter without consuming a later result.bun run testin apps/local (94 passed) and packages/react (425 passed); repotypecheck,lint,format:checkall green.