Skip to content

fix(connection): avoid stalled blank GitHub OAuth popup #503

Description

@guoxianzhe

Problem

GitHub reconnect opens and focuses an about:blank popup before the OAuth start request completes. The frontend immediately clears popup.opener, then later attempts to navigate the retained popup reference asynchronously. In Chrome the popup remains permanently blank even after waiting, with no loading or error state visible to the user.

Computer Use reproduced this against the HCI Connection console on 2026-09-14: clicking the GitHub 重新连接 button switched to about:blank; the page remained blank after 10 seconds.

Scope

  • Stop opening an about:blank placeholder window.
  • Start OAuth from the Connection page and navigate the current tab only after the server returns the authorization URL.
  • Keep API failures on the Connection page so the existing PageError can render them.
  • Apply the same helper behavior to personal and shared GitHub OAuth.

Acceptance criteria

  • GitHub connect/reconnect never opens about:blank.
  • A successful OAuth start navigates the current tab to the returned authorization URL.
  • A failed OAuth start remains on the Connection page and exposes the existing error state.
  • Personal and shared GitHub flows remain covered by focused tests.
  • Web tests, typecheck, build, and git diff --check pass.

Blocked by

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-agentHuman-confirmed Issue ready for Codex implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions