Skip to content

fix(dashboard): keep GitHub device sign-in visible until completion - #862

Open
AbdullahM07 wants to merge 1 commit into
oblien:mainfrom
AbdullahM07:fix/851-github-device-signin
Open

AbdullahM07 wants to merge 1 commit into
oblien:mainfrom
AbdullahM07:fix/851-github-device-signin

Conversation

@AbdullahM07

Copy link
Copy Markdown
Member

Summary

Keep the GitHub device code and verification link visible until that grant completes, then refresh Settings to show the newly connected identity.

Motivation

Settings hid the pending action whenever any GitHub source was connected. The shared provider also discarded it based on an existing App connection or a stale CLI identity. A valid device-code response could therefore disappear immediately, and successful polling did not update Settings' separate status snapshot.

Related issue

Fixes #851

Changes

  • Give the pending login panel precedence over connection badges and background status loading.
  • Complete device grants through their existing poll endpoint; reserve status-based completion for terminal login.
  • Refresh the Settings snapshot when a pending device/token action finishes.
  • Exercise the real provider and Settings component in five interaction regressions, using Happy DOM as a test dependency.

Verification

  • Before the fix: four of the five regression cases fail, covering stale connectivity, an existing App, pending status refresh, and the final connected identity.
  • bun run --cwd apps/dashboard test --maxWorkers=2: 114 files, 1186 tests passed.
  • bun run --cwd apps/dashboard lint: passed.
  • Root non-CLI workspace tests: all six tasks passed.
  • Ran bun run format in an isolated checkout and retained only formatting within this change.
  • Rendered the actual click/poll states in Chromium at 1280×800 and 390×844; code, verification link and connected identity remain visible without horizontal overflow. UI detector reported no findings.

Checklist

  • One issue per PR, with a scoped diff
  • Regression tests fail before the fix and pass afterward
  • Relevant tests, typecheck and formatting completed locally
  • Reviewed the implementation and test behavior

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]: "Sign in with GitHub" (device flow) silently does nothing, backend returns a valid device code but the UI never displays it

1 participant