Skip to content

feat: discover developers you already follow on GitHub - #150

Open
mathiasonea wants to merge 5 commits into
dev-null-sh:productionfrom
mathiasonea:feat/github-people
Open

mathiasonea wants to merge 5 commits into
dev-null-sh:productionfrom
mathiasonea:feat/github-people

Conversation

@mathiasonea

@mathiasonea mathiasonea commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Developers can find people they already follow on GitHub who have joined devnull, then follow them individually or select up to 100 at a time. The discovery page is linked from Who to follow and the empty Following log.

Discovery starts only on request and scans at most five pages of 100 public GitHub follows. That page budget is shared across an automatic rename restart. Truncated results show the number actually checked and explain that more matches may exist, including when no local matches were found.

The owner is resolved by immutable GitHub ID at the start and verified again before results become available. Pages reuse the resolved username. A confirmed rename discards accumulated results and restarts page one under a fresh run ID, once, without resetting the page budget. Repeated renames, exhausted restart budgets, rate limits, and temporary failures have retry states. Redirects are not followed, and successful following responses are still verified before publication. These checks detect ordinary rename/reclaim cases; separate GitHub API requests do not provide an atomic snapshot.

Local matches use immutable GitHub IDs. Completed snapshots are cached for one hour, and loading/error polls do not hydrate partial profiles. Selected follows are validated against the signed-in user's verified results. Single and bulk follows share one transactional, idempotent implementation and preserve existing once-ever notifications.

Queue recovery covers crashes between saving progress or a renamed run and enqueuing its continuation. Stale callbacks cannot overwrite newer runs. Discovery and bulk following have independent rate-limit counters, and expired results return a useful validation message.

Validation:

  • 119 focused PHP tests passed with 901 assertions.
  • Pint, Rector dry-run, frontend formatting/lint, PHPStan, TypeScript, and production build passed.
  • Two independent reviews of the complete PR diff; the restart handoff crash finding was fixed and regression-tested.
  • The full PHP suite was not rerun for this update. No JavaScript test suite is configured.

@vtlxx

vtlxx commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Really like this one, great idea

One thing: discovery goes through the whole following list with no limit. If someone follows a few thousand people, that's a lot of jobs, all running on the app's shared GitHub quota. Maybe cap it at 5 pages (500 follows)? Should be enough for most people.

Also, getPage calls user/{id} on every page to resolve the username. I guess it’s to handle renames mid-scan, but that seems pretty unlikely. Reusing the username from the first page would cut the requests almost in half.

@mathiasonea

Copy link
Copy Markdown
Contributor Author

@vtlxx pushed an update in cde745b. Discovery now stops at 5 pages / 500 follows, with a notice if more remain.

The username is reused across pages now. I kept a final check against the GitHub ID before showing results, since someone else can claim the old name. That's 7 requests for a five-page scan instead of 10.

If we detect a rename, we discard the collected results and restart from page 1 with the new username. One automatic restart, within the original five-page budget. Another rename or no budget left gives the user a retry message. A 404 or redirect triggers an owner check too; it only restarts if that confirms a new username.

Added tests for the cap, reclaimed usernames and restart failures.

Preserve GitHub discovery links alongside upstream transitions, follow hover behavior, and skeleton sizing. Apply production's bilateral block filtering to discovery and bulk follows, with regression coverage.
Keep production's ranked log behavior and React state imports alongside the GitHub discovery link.
@xHeaven

xHeaven commented Oct 18, 2026

Copy link
Copy Markdown
Member

@nunomaduro This PR touches new services. Could you take a look?

@garrettw

Copy link
Copy Markdown

Closes #1095

@jubianchi

Copy link
Copy Markdown
Contributor

Thanks @mathiasonea. Since this was opened, d8f3aa7 (feat: auto-follows) landed on production and seems to cover most of it:

  1. On GitHub sign-in, ImportGitHubFollowsJob runs CreateUserGitHubFollows.
  2. It imports both directions: you follow the people you follow on GitHub, and your GitHub followers follow you here (matched by github_id, blocks excluded).
  3. Up to 10 pages (~1,000 accounts) each way, once per account (github_follows_imported_at), so unfollows stick.
  4. People who join later are covered: their import makes their GitHub followers, you included, follow them.
Auto-follows (production) This PR
Trigger Automatic on sign-in Manual discovery page
Direction Following + followers Following only
Scope ~1,000 each way 500 follows
Re-run later No — once per account; "Sync from GitHub" only refreshes profile and SSH keys Yes

From what I can see, what this PR adds on top is picking up GitHub follows made after the import. Would re-running the import from "Sync from GitHub" (UpdateUserProfile) be enough for that, rather than a second GitHub client (GitHubFollowing next to GitHub::accountIds), a multi-step job and a new page?

One open point: it would re-follow people you unfollowed here, since unfollows aren't recorded.

This also relates to #1095: its first ask looks met by the auto-follows, its second (a longer onboarding suggestion list) isn't covered by either.

Just flagging the overlap to help triage, maintainers will know best how to move forward.

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.

5 participants