Skip to content

feat: All your repositories in the Link picker (#371) - #406

Merged
bRRRITSCOLD merged 5 commits into
mainfrom
feat/371-all-repos-picker
Nov 24, 2026
Merged

bRRRITSCOLD merged 5 commits into
mainfrom
feat/371-all-repos-picker

Conversation

@bRRRITSCOLD

Copy link
Copy Markdown
Owner

Closes #371

What changes

The "Link a repository…" picker in Edit workspace and New workspace gets its third section, All your repositories: every GitHub repository the sign-in can reach, after Suggested and From your pull requests, without GitHub's search API.

Daemon: the GitHub repository list

  • GET /v1/github/repositories answers the list kept in memory for the run, with its progress: status (not_loaded, loading, loaded, failed, signed_out), loaded, total (estimated from page 1's Link: rel="last", exact once the last page arrives) and error.
  • POST /v1/github/repositories/refresh (204 at once) loads it with REST GET /user/repos?sort=full_name&direction=asc&per_page=100: page 1 first, then the last page, then the pages between, 4 at a time. About 1,100 repositories take 12 requests.
  • While no list is held, each page is served as it arrives, with a changed github_repositories event. A held list is refreshed quietly: clients see the old one until the new one has loaded whole. A failed quiet refresh keeps the list and sets error.
  • Failures (5xx after the usual retries, a 403/429 rate limit at once, a 401 after one re-read of the token's sources) fail the whole load. No token reads signed_out without calling GitHub. A changed token drops the list and, if a picker had asked, loads the new sign-in's.
  • search/repositories is never called. API_VERSION is 27; openapi.json and the client are regenerated.

GUI: the picker's section

  • Each time a dialog opens the picker it asks for a refresh and reads the list, then reads it again on each changed github_repositories. The sidebar now ignores that event.
  • Rows come in GitHub's order, leaving out Repositories listed above, those the Workspace links and Unreachable ones. Private ones carry the lock, and typing filters them with the other sections. A typed owner/name it lists gets no "Link owner/name" row.
  • While the list loads, "Loading your repositories… 400 of about 1,100" sits under the rows, above the footer, so it stays in view however far the rows scroll.
  • A failed list reads "Couldn't load your repositories. Retry" under the section's label. Suggested, From your pull requests and typed names keep working.
  • Signed out, the section is replaced by "Sign in to GitHub to find more repositories." Signed in, the footer reads "Not listed? Type owner/name or paste its URL."
  • Rows scroll past ComboboxList's 252px, and only the rows in view are drawn (GPUI's list), so ~1,100 rows cost a screenful.

docs/spec.md §4, §5, §8, §11 and §12 are rewritten to match.

Tests

  • Daemon integration (tests/integration/github_list.rs, httpmock with Link headers) covers:
    • paging, single page and page 1 before the rest, with the total estimate;
    • last page first, and the events;
    • memory across reads, and a quiet refresh;
    • a refresh during a load;
    • 5xx then Retry, 403 and 429 rate limits, a later page failing, 401, and a failed quiet refresh;
    • signed out, and a token change;
    • search never called.
  • Client contract tests for repositories::github_list and refresh_github_list, the fake API's new operations.
  • GUI view tests cover:
    • the section's loaded, loading (with and without a count, and in view under scrolling rows), failed with Retry (GitHub or the daemon) and signed-out (PR status or the list) states;
    • filtering, exclusions, picking by click and Enter, and the typed row;
    • refresh on open, and the re-read on events;
    • 1,100 rows drawn in view only;
    • the loading line's rounding;
    • the sidebar ignoring the event.

Design

Penpot "Screens · Dialogs": the agentdeck/LinkPickerList main gained the All your repositories label, rows, a Loading line and a Failed row (Retry as a link xs Button). The existing picker boards now show the loaded section, and two new boards sit next to them: "Edit workspace · picker · loading" and "Edit workspace · picker · couldn't load". The signed-out and typed-repo boards hide the section.

Captures, each Penpot export beside the app: ~/Pictures/agentdeck/2026-11-23-all-repos-picker/ (01-picker-loaded, 02-picker-loading, 03-picker-failed, -penpot.png / -app.png). The app ran on a fake GitHub. The section matches the boards; the only differences are the sample data (a loading count of 7 rather than 400, 3 loaded rows rather than 2). A 3–4px offset of the whole dialog body predates this change and is tracked in #405.

Follow-ups

🤖 Generated with Claude Code

bRRRITSCOLD and others added 5 commits November 23, 2026 17:20
GET /v1/github/repositories and POST /v1/github/repositories/refresh:
GET /user/repos 100 a page, page 1 first, then the last page, then the
rest 4 at a time; kept in memory for the run, refreshed quietly, with
progress and changed github_repositories as pages arrive. API_VERSION 27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The picker lists the daemon's GitHub repository list after Suggested and
From your pull requests, leaving out those listed above, linked or
Unreachable, with a lock on private ones; it asks for a refresh each time
it opens, reads the list again on changed github_repositories, says
"Loading your repositories… 400 of about 1,100" while it loads and
"Couldn't load your repositories." with Retry when it fails. Rows are
drawn only in view. The sidebar skips the list's events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#371)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bRRRITSCOLD
bRRRITSCOLD merged commit 66f19f4 into main Nov 24, 2026
6 checks passed
@bRRRITSCOLD
bRRRITSCOLD deleted the feat/371-all-repos-picker branch November 24, 2026 00: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.

All your repositories in the Link picker

1 participant