Skip to content

chore(code): support multiple gh integrations in cloud repo picker#1586

Merged
VojtechBartos merged 1 commit intomainfrom
vojta/multiple-gh-integrations
Apr 9, 2026
Merged

chore(code): support multiple gh integrations in cloud repo picker#1586
VojtechBartos merged 1 commit intomainfrom
vojta/multiple-gh-integrations

Conversation

@VojtechBartos
Copy link
Copy Markdown
Member

Problem

The cloud repository picker only shows repos from a single GitHub integration (the first one found via .find()). Users can have multiple GitHub integrations connected to a project (e.g., personal and org), but repos from additional integrations are invisible.

Fix

  • Replace the single-integration model with a repo→integration mapping across all GitHub integrations
  • Show full owner/repo format in the picker trigger instead of truncating to just the repo name

Verification

  • pnpm typecheck — clean
  • pnpm lint — no fixes applied
  • pnpm --filter code test — 625 tests pass
  • Manual: cloud mode repo picker shows repos from all GitHub integrations
  • Manual: selecting a repo fetches branches via the correct integration
  • Manual: task creation passes the correct integration ID
  • Manual: archiving/navigating does not trigger infinite re-render loops

Showcase

code-multiple-repos.mov

@VojtechBartos VojtechBartos self-assigned this Apr 9, 2026
@VojtechBartos VojtechBartos requested a review from a team April 9, 2026 12:32
return { integrationId: integration.id, repos };
},
enabled: !!client,
staleTime: 60 * 1000,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1m revalidation might be too frequent for GitHub integrations. Does it revalidate when I focus the window?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah it does when data are stale, any suggestion for stale time? 10m or 30m?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

or we can just disable refetchOnWindowFocus

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

setting up 5mins + disable refetch on focus

@VojtechBartos VojtechBartos force-pushed the vojta/multiple-gh-integrations branch from 92eedac to 68e72b0 Compare April 9, 2026 13:28
@VojtechBartos VojtechBartos enabled auto-merge (squash) April 9, 2026 13:29
},
enabled: !!client,
staleTime: 5 * 60 * 1000,
refetchOnWindowFocus: false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd sitll keep it. 5 minutes with revaliation on focus makes sense to me.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

@VojtechBartos VojtechBartos disabled auto-merge April 9, 2026 13:34
@VojtechBartos VojtechBartos force-pushed the vojta/multiple-gh-integrations branch from 68e72b0 to 7648688 Compare April 9, 2026 13:35
@VojtechBartos VojtechBartos enabled auto-merge (squash) April 9, 2026 13:35
@VojtechBartos VojtechBartos merged commit d092804 into main Apr 9, 2026
15 checks passed
@VojtechBartos VojtechBartos deleted the vojta/multiple-gh-integrations branch April 9, 2026 13:41
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.

2 participants