Skip to content

feat: GitHub integration with OAuth Device Flow#2

Merged
corvid-agent merged 1 commit intomainfrom
feat/github-integration
Feb 24, 2026
Merged

feat: GitHub integration with OAuth Device Flow#2
corvid-agent merged 1 commit intomainfrom
feat/github-integration

Conversation

@corvid-agent
Copy link
Owner

Summary

  • Add full GitHub integration: pull specs from a repo, push changes to branches, and create PRs — all via the GitHub REST API
  • Add GitHub OAuth Device Flow (RFC 8628) as the primary auth method with a "Sign in with GitHub" button, keeping PAT as a fallback
  • Add mobile-responsive layout, CI spec validation workflow, and spec-check CLI tooling

Changes

GitHub Integration (99e24bc)

  • GitHubService — REST API client with PAT auth for pulling .spec.md files, pushing changes to new branches, and creating PRs
  • GitHubConnectComponent — sidebar panel for repo connection (owner/repo/branch/path config, pull/disconnect controls)
  • Editor page — "Create PR" button for GitHub-sourced specs
  • Spec modelgithubSha field for tracking remote blob state
  • Specs for github-service and github-connect, updates to 5 existing specs

OAuth Device Flow (f94c0b1)

  • GitHubOAuthService — full device flow lifecycle: device code request, token polling with slow_down/expired_token handling, user profile fetch, localStorage persistence
  • Environment configGITHUB_CLIENT_ID for the OAuth App
  • GitHubConnectComponent overhaul — four UI states: sign-in, device code display, authenticated + repo config, connected
  • GitHubService — falls back to OAuth token when no PAT configured, connectWithOAuth() method

Mobile & Tooling (293aa04)

  • Mobile-responsive layout with sidebar overlay and section nav toggle
  • spec-check CI workflow (.github/workflows/ci.yml) validates .spec.md on push/PR
  • spec-check CLI tool and npm script
  • CLAUDE.md agent instructions and .speckit/ constitution
  • Fix validator false-positive for sections with subsections

Test plan

  • Verify npm run spec-check passes all 15 specs
  • Verify ng build succeeds with no errors
  • Test GitHub PAT flow: enter token, connect to repo, pull specs, disconnect
  • Test OAuth Device Flow: click "Sign in with GitHub", verify user code appears, complete authorization, confirm avatar/username shown
  • Test "Create PR" from editor page with a GitHub-sourced spec
  • Test mobile layout: sidebar overlay, section nav toggle

🤖 Generated with Claude Code

@corvid-agent
Copy link
Owner Author

@corvid-agent rebase and fix the merge conflicts

Adds GitHub OAuth Device Flow (RFC 8628) as the primary authentication
method, replacing the manual PAT entry with a simple "Sign in with
GitHub" button. PAT remains as a fallback option.

New files:
- GitHubOAuthService: manages device flow lifecycle, token polling,
  user profile fetching, and localStorage persistence
- environment.ts: configures GITHUB_CLIENT_ID for the OAuth App
- github-oauth.spec.md: full spec for the OAuth service

Updated files:
- GitHubService: falls back to OAuth token when no PAT is configured,
  adds connectWithOAuth() method
- GitHubConnectComponent: new UI with OAuth sign-in button, device
  code display, user avatar, and repo config form
- Specs updated for github-service and github-connect

All 15 specs pass, build succeeds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@corvid-agent corvid-agent force-pushed the feat/github-integration branch from f94c0b1 to 0e08a5a Compare February 24, 2026 18:46
@corvid-agent
Copy link
Owner Author

Rebased feat/github-integration onto main.

Two of the three commits were already upstream (from PR #1 merge) and were dropped automatically — no conflicts to resolve. The branch now contains a single commit:

  • 0e08a5a feat: GitHub OAuth Device Flow for one-click sign-in

The PR should be clean to merge now.

@corvid-agent corvid-agent merged commit 36229f3 into main Feb 24, 2026
2 checks passed
@corvid-agent corvid-agent deleted the feat/github-integration branch February 24, 2026 18:47
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.

1 participant