diff --git a/doc/connections/GITHUB.md b/doc/connections/GITHUB.md index f79febf07f..eb894ce016 100644 --- a/doc/connections/GITHUB.md +++ b/doc/connections/GITHUB.md @@ -7,6 +7,10 @@ only in its existing encrypted secret system. ## Self-hosted setup +The Access step uses **Continue** to open the local setup screen. +**Continue to GitHub** on that screen starts the provider handoff. The first +button does not imply that the browser is leaving Paperclip yet. + A self-hosted instance needs one Paperclip Cloud approval before its first managed connection. After approval, setup returns to step 2 and continues to GitHub without another instance approval or a service restart. diff --git a/ui/src/features/connections/ConnectionSetupFlow.tsx b/ui/src/features/connections/ConnectionSetupFlow.tsx index 266dd58039..1886358b70 100644 --- a/ui/src/features/connections/ConnectionSetupFlow.tsx +++ b/ui/src/features/connections/ConnectionSetupFlow.tsx @@ -1868,14 +1868,12 @@ export function ConnectionSetupFlow({ : linkAuthMode === "oauth" ? "oauth" : "api_key"; - // The primary label names the next effect, so an OAuth handoff never arrives - // unannounced. - const accessMethodIsKnown = !entry - || Boolean(connectionMethodKey) - || credentialSourceMethods.length === 1; - const accessSubmitLabel = accessStepAuthKind === "oauth" && accessMethodIsKnown + // Name the actual next effect: multi-method apps and enrollment still have + // a local setup screen, even when OAuth is already the selected method. + const accessContinuesToProvider = Boolean(directOAuthEntry); + const accessSubmitLabel = accessContinuesToProvider ? `Continue to ${entry?.name ?? "sign-in"}` - : "Save and continue"; + : accessStepAuthKind === "oauth" ? "Continue" : "Save and continue"; const stepIndex = (zapierSource || entry) && step !== "gallery" && step !== "success" ? SELECTED_APP_STEP_INDEX[step] @@ -2132,6 +2130,7 @@ export function ConnectionSetupFlow({ capabilities={galleryQuery.data?.capabilities} githubIdentity={entry?.slug === "github"} submitLabel={accessSubmitLabel} + continuesToProvider={accessContinuesToProvider} identityLoading={Boolean(automaticOAuthEntry) && directOAuthLookupPending} preserveAgentAccess={Boolean(automaticOAuthEntry && (resumableOAuthConnection || reconnectConnection))} pending={connectMutation.isPending || oauthStartMutation.isPending} @@ -3581,6 +3580,7 @@ export function AccessStep({ capabilities, githubIdentity = false, submitLabel, + continuesToProvider = false, identityLoading = false, preserveAgentAccess = false, pending = false, @@ -3605,6 +3605,8 @@ export function AccessStep({ } | null; githubIdentity?: boolean; submitLabel: string; + /** Only show an external-handoff cue when this action starts provider OAuth. */ + continuesToProvider?: boolean; /** Wait for a durable OAuth connection before showing a reconnect identity. */ identityLoading?: boolean; /** Reconnect changes credentials only; existing install reach stays intact. */ @@ -3842,7 +3844,7 @@ export function AccessStep({ > {pending ?