feat: add required GitHub setup flow after Auto Claude initialization

This ensures users properly configure GitHub before using Auto Claude,
which is necessary for the branch-based workflow to function correctly.

Changes:
- Add GitHubSetupModal component with 3-step flow:
  1. GitHub OAuth authentication (via gh CLI)
  2. Auto-detect repository from git remote
  3. Select base branch for task worktrees (with recommended default)
- Add IPC handlers for detectGitHubRepo and getGitHubBranches
- Integrate modal into App.tsx to show after Auto Claude init
- Update ElectronAPI types and browser mocks

The flow now is:
1. User adds project
2. Git must be initialized (GitSetupModal if not)
3. Auto Claude initialized (creates .auto-claude folder)
4. GitHub setup required (new GitHubSetupModal)
5. Project ready for task creation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
AndyMik90
2025-12-19 08:00:17 +01:00
co-authored by Claude Opus 4.5
parent 64d5170c94
commit 03ccce5cc1
7 changed files with 601 additions and 2 deletions
@@ -41,6 +41,10 @@ export interface GitHubAPI {
getGitHubUser: () => Promise<IPCResult<{ username: string; name?: string }>>;
listGitHubUserRepos: () => Promise<IPCResult<{ repos: Array<{ fullName: string; description: string | null; isPrivate: boolean }> }>>;
// Repository detection
detectGitHubRepo: (projectPath: string) => Promise<IPCResult<string>>;
getGitHubBranches: (repo: string, token: string) => Promise<IPCResult<string[]>>;
// Event Listeners
onGitHubInvestigationProgress: (
callback: (projectId: string, status: GitHubInvestigationStatus) => void
@@ -109,6 +113,13 @@ export const createGitHubAPI = (): GitHubAPI => ({
listGitHubUserRepos: (): Promise<IPCResult<{ repos: Array<{ fullName: string; description: string | null; isPrivate: boolean }> }>> =>
invokeIpc(IPC_CHANNELS.GITHUB_LIST_USER_REPOS),
// Repository detection
detectGitHubRepo: (projectPath: string): Promise<IPCResult<string>> =>
invokeIpc(IPC_CHANNELS.GITHUB_DETECT_REPO, projectPath),
getGitHubBranches: (repo: string, token: string): Promise<IPCResult<string[]>> =>
invokeIpc(IPC_CHANNELS.GITHUB_GET_BRANCHES, repo, token),
// Event Listeners
onGitHubInvestigationProgress: (
callback: (projectId: string, status: GitHubInvestigationStatus) => void