Repository navigation
fix(cloud-agent): report unavailable GitHub installations in repository lists - #8590
Conversation
…ry lists The organization repository helper filtered unhealthy installations before aggregating, so a suspended or reauthorization-needed connection was reported as "No GitHub integration found". Inside the aggregator, an installation without a platform installation id resolved to an empty success and rejected per-installation reads were dropped, so a short list was indistinguishable from a complete one. - github-integration-helpers: keep every stored installation and classify it (repositories, unavailable with a reason, or failed). Zero usable installations returns the reason and the single-path message; a partly readable set returns the reachable repositories with `partial: true`; an all-failed read stays an error. The personal path carries the same reason. - cloud-agent routers publish `unavailableReason` and `partial`. - Web: a shared GitHub notice helper feeds the new-session panel and the settings repository picker; an installation that exists but cannot list keeps the composer and names the reconnect step instead of the connect screen. - Mobile: the GitHub provider gains an `unavailable` status with a reconnect card and a partial-list notice, with new copy in every locale catalog.
|
bot: Verified on the local dev stack with two owned fake organizations. Organization whose only GitHub connection cannot list repositories now keeps the composer and names the reconnect step instead of showing the connect screen:
Organization with one reachable and one unusable connection lists the reachable repositories and says the list is incomplete. Android emulator, same two organizations: the new-session screen renders the reconnect card for the first organization and the partial-list notice for the second, with the picker still listing the reachable repositories. Settings dialog surface (second web picker) could not be exercised here: that dialog reports "Could not load Cloud Agent settings" against the local stack, so its state mapping is covered by the unit test only. |
|
bot: Android emulator, new-session screen, same two owned fake organizations.
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commits resolve the prior unreachable Assumptions: Files Reviewed (7 files)
Previous Review Summaries (2 snapshots, latest commit f3727da)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f3727da)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe incremental commit keeps the retry affordance for a failed sibling read, but the new Assumptions: Overview
Issue Details (click to expand)WARNING
Files Reviewed (6 files)
Previous review (commit 6a9a879)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe new unavailable/partial classification in Assumptions: Overview
Issue Details (click to expand)WARNING
Files Reviewed (104 files)
Reviewed by deepseek-flash-latest · Input: 123.2K · Output: 8.9K · Cached: 766.1K Review guidance: REVIEW.md from base branch |
- A rejected per-installation read next to an unusable installation now marks
the result partial, so the pickers keep the retry control instead of showing
only the unusable reason.
- A pending installation reports its own reason and message ("awaiting
approval") instead of the generic not-configured wording.
The settings repository picker asked the cached query to refetch, which answers from the stored snapshot. The partial-list retry now runs the same force-refresh path the new-session picker uses.
Repository listings only read rows whose GitHub connection role is set, and the role constraint requires a platform installation id, so an installation that is still waiting for approval never reaches this classification. The generic not-configured reason covers a stored row that cannot answer.







What changed
fetchAllGitHubRepositoriesForOrganizationused to drop every installation that was not healthy before aggregating. A suspended, disconnected or reauthorization-needed connection therefore read asintegrationInstalled: falsewith "No GitHub integration found for this organization", and a partly readable set read as an unqualified success.apps/web/src/lib/cloud-agent/github-integration-helpers.ts: every stored installation is now classified as one of three outcomes — readable, unavailable (with a reason), or failed. Zero readable installations returns the single-path message plusunavailableReason; a partly readable set returns the reachable repositories pluspartial: true; an all-failed read stays an error so the caller retries. A rejected read beside an unusable installation also setspartial, so the reason and the retry control are shown together rather than the reason alone. An installation without aplatform_installation_idcounts as unavailable (not_configured) instead of an empty success.fetchGitHubRepositoriesForUsercarries the same reason.apps/web/src/routers/cloud-agent-next-router.tsandorganizations/organization-cloud-agent-next-router.tspublishunavailableReasonandpartialin the output schema; the code-review routers return the result object directly, so their existingerrorMessagebanner now names the real reason.cloud-agent-next/github-repository-status.tsmaps a result to notices.NewSessionPanelkeeps the composer for an installation that exists but cannot list, and shows the reason with a link to the GitHub connection settings; a genuinely absent installation still gets the connect screen. The settingsRepositoryPickershows the same notices.resolveProviderStatusgains anunavailablestate andRepositoryGroupcarries anotice. The GitHub group renders a reconnect card (with the open action and refresh) and a partial-list notice above the reachable rows. Copy lives inrepository-provider-copy.ts; the provider card actions moved intorepository-card-actions.tsxso the section stays under its size limit.Verification (this VM)
apps/web:jestoversrc/lib/cloud-agent,src/lib/integrations/personal-github-installation-selection.test.ts,src/components/cloud-agent-next/github-repository-status.test.ts,src/routers/cloud-agent-next-router.test.ts,src/routers/organizations— 46 suites, 1259 tests passed. New cases: suspended-only organization, auth-invalid organization, suspended sibling with a readable installation, installation without a platform installation id, unconfigured sibling.apps/webtypecheck clean (tsgo --noEmit); root oxlint over the changed files clean;oxfmt --checkclean.apps/mobile:vitest run src/components/agents src/lib/use-new-session-repos.test.ts src/lib/new-session-submit.test.ts src/i18n— 296 files, 6668 tests passed.check:i18n,check:plurals,pnpm --filter kilo-app lint,format:checkandtypecheckclean.Unproven
Proxy answers
The owner's proxy gave these answers in the owner's place.
Answer: Composer + inline reconnect notice (Recommended)
Confidence: 0.60
Answer: Both paths (Recommended)
Confidence: 0.80
Answer: Three new English keys, translated to all 87 locales (Recommended)
Confidence: 0.85
Answer: Both pickers
Confidence: 0.70