Skip to content

Fix GitHub Copilot OAuth callback completion#1789

Open
devcool20 wants to merge 2665 commits into
different-ai:devfrom
devcool20:fix-github-copilot-oauth-callback
Open

Fix GitHub Copilot OAuth callback completion#1789
devcool20 wants to merge 2665 commits into
different-ai:devfrom
devcool20:fix-github-copilot-oauth-callback

Conversation

@devcool20
Copy link
Copy Markdown
Contributor

Summary

  • Fix GitHub Copilot OAuth device login completion in the provider connection modal.
  • The automatic callback now includes the displayed OAuth device code.
  • OAuth/provider polling is stopped once the provider connects, and overlapping automatic callback attempts are prevented.

Why

  • GitHub device authorization could succeed in the browser, but OpenWork stayed on the confirmation screen because the callback request did not include the device code.

Issue

Scope

  • Updated GitHub Copilot/OAuth auto-completion behavior in the provider auth modal.
  • Added an in-flight guard for automatic OAuth callback polling.

Out of scope

  • No provider UI redesign.
  • No changes to OpenCode provider APIs.
  • No changes to non-OAuth provider setup.

Testing

Ran

  • pnpm typecheck

Result

  • pass/fail: pass
  • if fail, exact files/errors: N/A

CI status

  • pass: not run locally
  • code-related failures: N/A
  • external/env/auth blockers: N/A

Manual verification

  1. Opened Settings -> AI Providers.
  2. Selected GitHub Copilot from Connect provider.
  3. Completed GitHub device auth in the browser.
  4. Confirmed the provider modal closed automatically.
  5. Confirmed GitHub Copilot appeared in connected providers.
  6. Confirmed there was no repeated callback loop.

Evidence

  • Attached screen recording showing the successful GitHub Copilot connection flow.

Risk

  • Low. The change is limited to the provider auth modal OAuth polling flow.

Rollback

  • Revert this PR.
Recording.2026-05-14.133328.1.mp4

benjaminshafii and others added 30 commits April 28, 2026 11:54
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
* fix session resume render loop

* guard session cache fallback

---------

Co-authored-by: Benjamin Shafii <benjamin.shafii@gmail.com>
benjaminshafii and others added 23 commits May 12, 2026 16:13
… fix (different-ai#1771)

* feat(app): full-screen org onboarding page after sign-in, fix browser panel bounds with zoom factor

* feat(app): global cloud providers toast, org onboarding with marketplaces/workers/skills, set-as-default per provider

* fix(app): show onboarding every login, source-agnostic provider toast, detect local provider changes, cleanup old notification files

* fix(app): updated onboarding copy, section descriptions, empty state with dashboard link, remove skills section

* fix(app): toast dedup via localStorage seen-set, per-provider 'Use as default' buttons

* fix(app): simplified toast - lists providers, links to model picker for default selection

* feat(app): model picker shows 'Recently added' section for new provider models

* fix(app): pass new provider IDs through toast event so picker highlights them, add 'Current' badge on selected default

* fix(app): onboarding shows on every sign-in (poll for org, seed seenProviderIds on continue)

* feat(app): two-level model picker (providers → models), recommended models section, cloud/new badges, global provider detection from store

* feat(app): accordion model picker - providers with expand/collapse, recommended models with star, unified search

* fix(app): remove 'Switched to org' toast

* fix(app): onboarding page scrollable when content overflows viewport

* fix(app): onboarding page scroll - h-screen with overflow-y-auto, fixed background/titlebar

* fix(app): allow disconnecting any provider including built-in env providers like opencode zen

* feat(app): fix i18n keys, enable/disable providers from model picker, toggle writes to disabled_providers in config

* feat(app): per-model visibility toggle in model picker, persisted to localStorage, eye icon on hover

* feat(app): two-tab model picker - 'Default model' (select one) + 'Available models' (checkboxes to show/hide)

* feat(app): select all/none per provider, default-hide bulk OpenAI/Anthropic models, compact picker filters by hidden + 'Browse all models' link

* fix(app): provider toast fires for first provider + modal closes after API key save + move defaults to app/defaults/

* fix(app): extension card action label uses text-dls-text instead of invisible text-dls-accent in dark mode

* fix(app): compact model picker re-reads hidden models when popover opens
… branch

Bisected regression to 6b73eae which bundled three changes:
1. @opencode-ai/sdk 1.14.38 -> 1.14.48
2. sidecar pin v1.14.38 -> v1.14.48
3. Removed the dedicated AssistantWaitingCard branch for empty sessions

Reverting all three until we isolate which one causes the broken
send-message visibility and missing thinking progress indicator.
…ifferent-ai#1776)

Remove enterprise-only usage insights section with all mocked data
(sparklines, area charts, fake plugin/skill tables, telemetry settings).

Add a proper Download OpenWork section at the top of the dashboard
that fetches real release assets from the GitHub API and presents
per-platform installers (macOS Apple Silicon/Intel, Windows x64,
Linux AppImage x64/ARM64) with OS auto-detection.
The React port of preferences-view had autoCompactContext hardcoded to
false with a disabled toggle and 'not yet available' alert. The original
Solid app (e47c2ee) wired it to read/write compaction.auto via
openworkClient.patchConfig but this was lost during the React migration.

- Load current compaction.auto from workspace config on mount
- Toggle writes compaction.auto via patchConfig and marks reload required
- Remove disabled attr and unavailable alert from the Switch
…ai#1784)

- Remove Skill Hubs and Shared Workspace sidebar nav items (commented out for easy re-enablement)
- Rename "Shared Workspaces" to "Background Tasks (coming soon)" across all marketing copy
- Update checkout, dashboard, organization, and background-agents screens
- Replace "shared workspace" with "cloud worker" in den-api 402 error messages
- Reframe billing copy around team features instead of shared workspaces
* chore: remove ARCHITECTURE.md and INFRASTRUCTURE.md, clean up AGENTS.md references

* chore: remove DESIGN-LANGUAGE, DESIGN-SYSTEM, PRINCIPLES, PRODUCT, VISION, RELEASE, TRIAGE docs
* feat: Daytona/devcontainer setup for full-stack testing (Den + App, no Electron needed)

* feat: Electron in Daytona via Xvfb + noVNC — real desktop app in the browser, CDP automation on :9825

* fix: Daytona Dockerfile with bun/dbus/vite-host fixes, daytona-dev skill for team

* fix: restore AGENTS.md from dev (remove stale additions)
…different-ai#1787)

* feat: CDP browser tools — direct OpenCode tools, no MCP, multi-target

- .opencode/tools/browser.ts: 7 tools (list, navigate, snapshot, click, fill, eval, screenshot)
- .opencode/tools/lib/cdp.ts: raw WebSocket CDP client, no Puppeteer
- .opencode/tools/lib/snapshot.ts: accessibility tree snapshots with UIDs

Every tool takes browser_url + optional target_id. No singleton browser.
No npx. No MCP subprocess. Works against any Chrome/Electron with CDP.

Tested against Daytona sandbox: target listing, eval, accessibility tree (202 nodes),
screenshot, button discovery all verified.

* fix: rewrite CDP WebSocket URLs when accessing via proxy (Daytona)

* feat: Daytona eval flows, run-evals skill, updated evals README with browser tools

- evals/daytona-flows.md: 3 flows (workspace creation, send message, screenshot)
  with exact code for React fiber dispatch, Lexical input, button clicking
- .opencode/skills/run-evals/SKILL.md: skill that guides agents through
  sandbox creation, service startup, and eval execution
- evals/README.md: updated with Daytona as recommended option, browser_*
  tool reference, conventions for Lexical/React state injection
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 May 14, 2026 8:08am

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 14, 2026

@devcool20 is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Collaborator

@src-opn src-opn left a comment

Choose a reason for hiding this comment

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

looks good to me

@benjaminshafii benjaminshafii force-pushed the dev branch 2 times, most recently from 71d8845 to bb87ed2 Compare May 15, 2026 17:24
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.

[Bug]: GitHub Copilot Login No Effect