Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Nov 21, 2025

Important

Introduces a provider-oriented welcome screen with support for Roo Code Cloud provider and updates authentication flows and localization.

  • Behavior:
    • Adds useProviderSignup parameter to login() and handleCallback() in CloudService.ts and WebAuthService.ts to support provider-specific authentication flows.
    • Introduces WelcomeViewProvider component in WelcomeViewProvider.tsx for provider-oriented welcome screen.
    • Updates App.tsx to conditionally render WelcomeViewProvider based on feature flag.
  • Tests:
    • Updates tests in CloudService.test.ts and WebAuthService.spec.ts to cover new authentication parameters and flows.
  • Localization:
    • Updates localization files in webview-ui/src/i18n/locales/ to include new text for provider selection and descriptions.
  • Misc:
    • Adds useProviderSignup to WebviewMessage in WebviewMessage.ts for message handling.

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

@mrubens mrubens requested review from cte and jr as code owners November 21, 2025 22:02
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused labels Nov 21, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 21, 2025

Rooviewer Clock   See task on Roo Cloud

Latest commit is a formatting fix with no functional changes. Previous issues remain:

  • Race condition in provider model application (extension.ts:173-189)
  • Hardcoded feature flag bypasses PostHog control (App.tsx:86)
  • Missing validation for provider model parameter (WebAuthService.ts:336)
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines +173 to +189
if (data.state === "active-session") {
try {
const storedModel = context.globalState.get<string>("roo-provider-model")
if (storedModel) {
cloudLogger(`[authStateChangedHandler] Applying stored provider model: ${storedModel}`)
// Get the current API configuration name
const currentConfigName =
provider.contextProxy.getGlobalState("currentApiConfigName") || "default"
// Update it with the stored model using upsertProviderProfile
await provider.upsertProviderProfile(currentConfigName, {
apiProvider: "roo",
apiModelId: storedModel,
})
// Clear the stored model after applying
await context.globalState.update("roo-provider-model", undefined)
cloudLogger(`[authStateChangedHandler] Applied and cleared stored provider model`)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Race condition: The stored provider model is applied asynchronously during auth state change, but there's no guarantee it completes before the user dismisses the welcome screen or makes other configuration changes. If authentication completes quickly, the model could be applied after the user has already selected a different model, overwriting their choice. Consider using a promise or flag to ensure the model application completes before allowing further configuration changes.

Fix it with Roo Code or mention @roomote and request a fix.

Comment on lines +334 to +338
// Store the provider model if provided
if (providerModel) {
await this.context.globalState.update("roo-provider-model", providerModel)
this.log(`[auth] Stored provider model: ${providerModel}`)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing error cleanup: If authentication fails after storing the provider model but before credential storage completes, the stored model persists in global state. On the next successful login, this orphaned model could be unexpectedly applied. The stored model should be cleaned up in the catch block to prevent this scenario.

Fix it with Roo Code or mention @roomote and request a fix.


// Store the provider model if provided
if (providerModel) {
await this.context.globalState.update("roo-provider-model", providerModel)
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing validation: The providerModel parameter is stored without validation. If an invalid model ID is passed (malformed format, non-existent model, or incompatible with the Roo provider), it will be stored and later applied in extension.ts without checks, potentially breaking the API configuration. Consider validating the model ID format and/or existence before storing.

Fix it with Roo Code or mention @roomote and request a fix.

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 21, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 21, 2025

Fixaroo Clock   Follow along on Roo Cloud

Working on the following issues:

  • Race condition in provider model application (extension.ts:173-189)
  • Hardcoded feature flag bypasses PostHog control (App.tsx:86)
  • Missing validation for provider model parameter (WebAuthService.ts:336)

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 21, 2025
@mrubens mrubens merged commit 7edc86b into main Nov 21, 2025
9 checks passed
@mrubens mrubens deleted the primary_rcc_provider branch November 21, 2025 22:37
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 21, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Nov 21, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 22, 2025