Skip to content

Api: order remote repositories by import usefulness - #13245

Draft
ericholscher wants to merge 1 commit into
mainfrom
claude/remoterepo-import-ordering
Draft

Api: order remote repositories by import usefulness#13245
ericholscher wants to merge 1 commit into
mainfrom
claude/remoterepo-import-ordering

Conversation

@ericholscher

Copy link
Copy Markdown
Member

The remote repositories endpoint backs the dashboard's repository picker, and it ordered purely alphabetically — so the first page a new user sees is whichever organization sorts first, not anything they're likely to import. This orders repositories the user can actually import first, sinks repositories that already have a project, and boosts documentation-looking names, keeping the previous alphabetical order as the tiebreak.

This changes the endpoint's default ordering for all consumers, which I'd argue is an improvement everywhere it's used, but it's worth a conscious yes. The new signals are two indexed EXISTS annotations plus a name match on the already per-user-filtered queryset, so the query cost is unchanged in practice. A signal that would sharpen this further — repository activity — isn't possible today because we don't sync anything like pushed_at; that would make a good follow-up.

Pairs with the ext-theme change that shows a browsable repository list on the add project page, which is what makes first-page ordering matter.


Generated by Claude Code

The list backed the dashboard's repository picker alphabetically, so the
first page was whichever organization sorts first. Order importable
repositories first, sink ones that already have a project, and boost
documentation-looking names, with the previous alphabetical order as the
tiebreak.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019yjYstmBb2HiscZUc5eKH4
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