fix(web): return to Cloud Agent setup from integration detail - #5388
Merged
eshurakov merged 1 commit intoAug 20, 2026
Merged
Conversation
When Cloud Agent onboarding showed the 'Connect a repository provider' panel, picking GitHub/GitLab/Bitbucket dropped the user on the integration detail page with a hard-coded 'Back to Integrations' link to /integrations, losing the original context. Pass a returnTo path through the onboarding panel so the user variant of the integration detail page (UserIntegrationDetailPage) can mirror the existing organization variant: validate the returnTo and render 'Return to setup' when present, falling back to '/integrations'.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryUser integration detail now validates Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 363K · Output: 25K · Cached: 446.1K Review guidance: REVIEW.md from base branch |
eshurakov
self-requested a review
August 20, 2026 11:59
eshurakov
approved these changes
Aug 20, 2026
Contributor
Author
|
All checks pass |
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
When Cloud Agent onboarding shows the "Connect a repository provider" panel (e.g. after a user lands on /cloud without a connected repo), picking GitHub/GitLab/Bitbucket drops the user on the integration detail page whose Back link is hard-coded to /integrations. The user lands somewhere they did not intend instead of returning to the Cloud Agent setup flow.
Two pieces conspired:
RepositoryProviderOnboardingPanelbuilt provider links as plain/integrations/<platform>with noreturnToquery param.UserIntegrationDetailPageinIntegrationDetailPage.tsxignoredreturnToentirely; only the organization variant of the same page already honored it.This change passes a
returnTopath through the onboarding panel (/cloudfor personal,/organizations/<id>/cloudfor org) and updates the user variant of the integration detail page to validate and use it, mirroring the organization variant. The validatedreturnTois also threaded into the rendered detail component's search params so downstream branches (e.g.GitHubIntegrationDetails'appReturnPath) keep working for the OAuth round-trip.Files touched:
apps/web/src/components/cloud-agent-next/RepositoryProviderOnboardingPanel.tsxapps/web/src/components/cloud-agent-next/NewSessionPanel.tsxapps/web/src/components/integrations/IntegrationDetailPage.tsxVerification
/organizations/<id>/cloud.Local checks run:
oxlinton the three changed files: 0 warnings, 0 errors.tsgo --noEmit(apps/web): clean.Visual Changes
Reviewer Notes
withReturnTois a small inline helper to appendreturnTowithout breaking callers that already had query strings; today only the generated integration hrefs use it, but the helper is defensive.validateReturnPathalready rejects non-/paths, unsafe characters, and double-slash tricks, so the Back href is constrained the same way as the organization variant.GitHubIntegrationDetailsappReturnPathplumbing was alreadyreturnTo-aware but the page never set it; that gap is closed here.