#792

Prioritize recently used repos in the repo selector without weakening installation-based access checks

Opennicoalbaneseopened 7mo ago

Summary

The repo selector currently relies on GET /user/installations/{installation_id}/repositories, which preserves GitHub App installation permissions but does not support server-side sorting by recent activity. Sorting by scanning more pages adds latency, and switching to /user/repos or /orgs/{org}/repos?sort=pushed weakens the guarantee that surfaced repos are actually available through the installation.

Proposed approach

  • Keep the installation repositories endpoint as the source of truth for available repos
  • Add a small Recent repos section at the top of the selector, powered by the user's own Open Harness session history
  • Scope recent repos to the selected owner/account
  • Revalidate the selected repo against the installation repositories endpoint on the server before creating the session

Why

  • Preserves strict installation-based access semantics
  • Avoids slow full scans of installation repos just to approximate recency
  • Makes the picker feel much faster for common repeat use

Acceptance criteria

  • Opening the repo selector shows a Recent repos section before the full list
  • Recent repos are derived from the current user's own session history and ordered by most recent activity/use
  • Recent repos only appear if they still belong to the selected owner and are still accessible through the installation
  • Final session creation still validates repo access server-side
  • The fallback/full list continues to use installation-scoped repo access

Activity

1
Shubham-Rasal7mo ago

Can I take this up?