Skip to content

Let people paste in the auth redirect url#7805

Merged
mrubens merged 5 commits intomainfrom
cloud_connect_having_trouble
Sep 9, 2025
Merged

Let people paste in the auth redirect url#7805
mrubens merged 5 commits intomainfrom
cloud_connect_having_trouble

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Sep 9, 2025

Some people are having trouble connecting to cloud from a container. This allows them to paste in the redirect URL directly.
Screenshot 2025-09-09 at 1 48 27 AM
Screenshot 2025-09-09 at 1 48 48 AM


Important

Adds manual URL input for authentication in webviewMessageHandler.ts and CloudView.tsx, with i18n support for multiple languages.

  • Behavior:
    • Adds manual URL input for authentication in webviewMessageHandler.ts and CloudView.tsx.
    • Automatically triggers authentication if a valid URL is pasted or entered.
  • UI:
    • Adds a text field in CloudView.tsx for manual URL entry.
    • Displays a "Having trouble?" link to show the manual entry option.
  • i18n:
    • Adds new strings for manual URL entry and related messages in common.json files across multiple locales.

This description was created by Ellipsis for ab31a16. You can customize this summary. It will automatically update as commits are pushed.

@mrubens mrubens requested review from cte and jr as code owners September 9, 2025 06:00
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Sep 9, 2025
"errors": {
"cloud_auth_required": "आपके संगठन को Roo Code Cloud प्रमाणीकरण की आवश्यकता है। कृपया जारी रखने के लिए साइन इन करें।",
"organization_mismatch": "आपको अपने संगठन के Roo Code Cloud खाते से प्रमाणित होना होगा।",
"manual_url_empty": "कृपया एक वैध callback URL दर्ज करें",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typographical note: The new error messages (lines 196–200) do not end with a sentence-terminating punctuation (like the full stop '।') as other messages in the file do. Consider adding a terminating punctuation for consistency.

Suggested change
"manual_url_empty": "कृपया एक वैध callback URL दर्ज करें",
"manual_url_empty": "कृपया एक वैध callback URL दर्ज करें",

"errors": {
"cloud_auth_required": "आपके संगठन को Roo Code Cloud प्रमाणीकरण की आवश्यकता है। कृपया जारी रखने के लिए साइन इन करें।",
"organization_mismatch": "आपको अपने संगठन के Roo Code Cloud खाते से प्रमाणित होना होगा।",
"manual_url_empty": "कृपया एक वैध callback URL दर्ज करें",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lexical consistency: The error messages use two different terms for the URL. Lines 196–198 refer to it as "callback URL" whereas line 199 uses "मैनुअल URL". Consider using a consistent term across all messages.

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

value={manualUrl}
onChange={handleManualUrlChange}
onKeyDown={handleKeyDown}
placeholder="vscode://RooVeterinaryInc.roo-cline/auth/clerk/callback?state=..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placeholder URL contains 'RooVeterinaryInc.roo-cline', which looks inconsistent with the repository name 'Roo-Code' and owner 'RooCodeInc'. This might be a typo—please verify the correct URL.

Suggested change
placeholder="vscode://RooVeterinaryInc.roo-cline/auth/clerk/callback?state=..."
placeholder="vscode://RooCodeInc.roo-code/auth/clerk/callback?state=..."

This comment was generated because it violated a code review rule: irule_VrRKWqywZ2YV2SOE.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 9, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution! This PR adds a useful fallback mechanism for users experiencing issues with the automatic OAuth redirect flow when connecting to Roo Code Cloud from containers. The implementation is clean and follows existing patterns well.

Positive aspects:

  • ✅ Proper integration with existing CloudService authentication flow
  • ✅ Comprehensive internationalization support for all 18 languages
  • ✅ Good UX with auto-detection when a valid URL is pasted
  • ✅ Proper error handling with localized error messages
  • ✅ Clean state management and UI flow

I've left some suggestions inline that could improve security and user experience, but overall this is a solid implementation that addresses a real user need.


// Auto-trigger authentication when a complete URL is pasted (with slight delay to ensure full paste is processed)
setTimeout(() => {
if (url.trim() && url.includes("://") && url.includes("/auth/clerk/callback")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security consideration: The current validation accepts any URL with "://" and "/auth/clerk/callback". Could we add stricter validation to ensure the URL is from a trusted domain? For example:

Suggested change
if (url.trim() && url.includes("://") && url.includes("/auth/clerk/callback")) {
if (url.trim() && url.startsWith("vscode://") && url.includes("/auth/clerk/callback")) {

This would ensure only VSCode protocol URLs are accepted, reducing the risk of phishing attempts.

value={manualUrl}
onChange={handleManualUrlChange}
onKeyDown={handleKeyDown}
placeholder="vscode://RooVeterinaryInc.roo-cline/auth/clerk/callback?state=..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User guidance improvement: The placeholder shows a specific extension ID that might not match the user's actual installation. Consider making this more generic or dynamic:

Suggested change
placeholder="vscode://RooVeterinaryInc.roo-cline/auth/clerk/callback?state=..."
placeholder="vscode://[extension-id]/auth/clerk/callback?state=..."

Or better yet, detect and use the actual extension ID if possible.

<div className="text-xs text-vscode-descriptionForeground">
{t("cloud:pasteCallbackUrl")}
</div>
<VSCodeTextField
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX improvement: Consider adding visual feedback when authentication is in progress after manual URL submission. You could disable the input field or show a loading spinner:

Suggested change
<VSCodeTextField
<VSCodeTextField
value={manualUrl}
onChange={handleManualUrlChange}
onKeyDown={handleKeyDown}
placeholder="vscode://RooVeterinaryInc.roo-cline/auth/clerk/callback?state=..."
className="w-1/2"
disabled={authInProgress}
/>

setManualUrl(url)

// Auto-trigger authentication when a complete URL is pasted (with slight delay to ensure full paste is processed)
setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the 100ms delay necessary here? If it's for ensuring the full paste is processed, modern browsers should handle this synchronously. Consider removing the setTimeout unless there's a specific browser compatibility issue:

Suggested change
setTimeout(() => {
if (url.trim() && url.includes("://") && url.includes("/auth/clerk/callback")) {
vscode.postMessage({ type: "rooCloudManualUrl", text: url.trim() })
}

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 9, 2025
@mrubens mrubens merged commit 5780659 into main Sep 9, 2025
12 checks passed
@mrubens mrubens deleted the cloud_connect_having_trouble branch September 9, 2025 13:50
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 9, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants