Skip to content

fix(oidc): open the authorization page without waiting for the launcher - #133

Merged
peterj merged 1 commit into
agentdesktop-dev:mainfrom
LutzLange:upstream/s1-oidc-detached
Oct 1, 2026
Merged

peterj merged 1 commit into
agentdesktop-dev:mainfrom
LutzLange:upstream/s1-oidc-detached

Conversation

@LutzLange

Copy link
Copy Markdown
Contributor

Found while working on #86; independent of the other PRs.

Why

open::that waits for the launcher to exit. In a Linux session without a display (for example a daemon started over SSH), xdg-open can hang. The wait blocks the runtime worker that holds the just-spawned callback server, so the login page never answers and enrollment times out.

Change

Open the page with open::that_detached, which returns immediately.

Tests

No unit test (it needs a hanging launcher). Lab-tested on an Ubuntu 24.04 VM with a user-mode daemon started over SSH: the login timed out before, and completes after. CI green.

🤖 Generated with Claude Code

open::that waits for xdg-open to exit. In a Linux user session without a
display the launcher can hang on the portal call; the wait blocks the runtime
worker that holds the just-spawned callback server, so the login page never
answers and enrollment times out. open::that_detached returns immediately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused change correctly prevents a hanging launcher from blocking the OIDC callback flow.

Review effort: Balanced
Findings: None

What changed in this PR

Updates OIDC browser launching so callback handling remains responsive when a Linux launcher hangs.

Changes:

  • Replaces blocking open::that with detached browser launching.
  • Documents why detachment is required.
File Description
crates/​agent/​src/​oidc.rs Launches the authorization page without waiting for the system launcher.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@peterj
peterj merged commit 828256b into agentdesktop-dev:main Oct 1, 2026
3 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.

3 participants