feat: inline GitHub connect modal + local-dev OAuth config#335
Merged
Conversation
Connecting to GitHub previously detoured through Settings and, on a dev build, only revealed "GitHub sign-in is not configured" after several clicks. Two fixes: - Config: build.rs now loads the repo-root .env at build time and forwards the OAuth client keys into the compile (real env still wins, so CI is unaffected); .env.example documents the keys. The missing piece was that QUORUM_GITHUB_CLIENT_ID was never listed, so no dev .env ever set it. - UX: a reusable GithubConnectModal, mounted at the app root and driven by store state, auto-starts the OAuth device flow on open and surfaces the code / any error in place. The Git-panel "Connect GitHub" action now opens it directly instead of routing to Settings, so a single click starts connecting. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Contributor
Greptile SummaryThis PR adds inline GitHub connection support and local OAuth config for dev builds. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Reviews (3): Last reviewed commit: "refactor: gate GitHub connect auto-start..." | Re-trigger Greptile |
Emit cargo::rerun-if-changed for ../.env even when it is absent, so creating the file later reruns the build script. Otherwise a direct cargo/rust-analyzer build keeps the old empty option_env! values and still shows GitHub sign-in as not configured until an unrelated input changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
The auto-start effect depended on [open, connect]. connect's identity changes on every busy transition, so the effect re-ran mid-flow; it stayed correct only because the started guard is never reset while open. Depend on open alone and read connect via a ref, so the effect fires exactly once per open and the connect-identity re-run can't occur at all. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.
Problem
Connecting to GitHub to push/open PRs was broken in two ways:
QUORUM_GITHUB_CLIENT_ID, baked in at compile time viaoption_env!(oauth.rs). It was only ever supplied by CI secrets and was never documented, so any local/dev build compiled it empty and reported "GitHub sign-in is not configured".Changes
Config plumbing
src-tauri/build.rsloads the repo-root.envat build time and forwardsQUORUM_GITHUB_CLIENT_ID/QUORUM_GOOGLE_CLIENT_*into the compile. A value already in the environment always wins, so CI (which supplies them as process env) is unaffected, and this also covers directcargo/ rust-analyzer builds..env.examplenow documents the OAuth keys (GitHub OAuth App with Device Flow enabled; client ID is not secret, no client secret needed).Inline connect (UX)
GithubConnectModal(src/components/GithubConnect/), mounted once at the app root and driven by store state (githubConnectOpen+openGithubConnect/closeGithubConnectin the ui slice). It auto-starts the OAuth device flow on open, shows the user code + verification URL (browser opens automatically), surfaces any config/sign-in error in place, and closes on success.connect-githubaction (useGitActions.ts) now callsopenGithubConnect()instead ofopenSettingsScreen("account")— one click begins connecting.Existing Settings and New-Project connect surfaces are unchanged (they already run the flow inline); adopting this modal there to remove the small device-code-UI duplication is a possible follow-up.
Setup
Add the client ID to a gitignored repo-root
.env:Testing
.envparser inbuild.rsverified standalone against quoted /export/ comment / empty / malformed lines.tsc/biomenot run in this worktree (nonode_modules); prop shapes were checked manually. Recommendbun run check && bun run lintbefore merge.🤖 Generated with Claude Code