feat(github): per-repo "Bind to project" button on settings page - #11
Merged
Merged
Conversation
The settings repo list was read-only — users could see all 200+ repos but the only click action was an external link to github.com. Now each row has a project picker dropdown so users can bind/unbind repos to their Crawlproof projects without leaving the page. Pieces: - New BindButton client component: dropdown of the user's projects with checkmarks for currently-bound ones; click toggles via POST/DELETE on /api/projects/[id]/repos. - ReposFilter now receives projects + bindings and renders BindButton per row. Label shows the bound project name (1 project), the count (2+ projects), or "Bind to project" when none. - The settings page pre-loads the user's projects and all project_repos rows once, then slices per-installation when rendering. RLS keeps the data scoped to the owner. Same data primitives the /projects/[id]/repos tab uses — this just makes the binding action available from the GitHub-side surface too, so a user who arrives via "Install on GitHub" never gets stuck. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The repo list at `/settings/integrations/github` was read-only — users could see all 200+ repos but the only clickable thing was an external link to github.com. After a fresh install, that page was a dead end.
Now each row has a Bind to project ▾ dropdown. Pick a project → row updates to Bound to (or "Bound to N projects" if you bind to several). Same data as the per-project Repos tab, just exposed from the GitHub-side surface so users who arrive via the install flow can take the next step without hunting.
Pieces
Test plan
After deploy:
🤖 Generated with Claude Code