-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Shows a pill with the base Roo Code Cloud URL when not pointing to pr… #7555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| {cloudApiUrl && cloudApiUrl !== "https://app.roocode.com" && ( | ||
| <div className="mt-6 flex justify-center"> | ||
| <div className="inline-flex items-center px-3 py-1 gap-1 rounded-full bg-vscode-badge-background/50 text-vscode-badge-foreground text-xs"> | ||
| <span className="text-vscode-foreground/75">Roo Code Cloud URL: </span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of hardcoding the pill label, please use the translation function (e.g. t('account:cloudUrlPillLabel')) for 'Roo Code Cloud URL:' so it's translatable instead of a hardcoded string.
| <span className="text-vscode-foreground/75">Roo Code Cloud URL: </span> | |
| <span className="text-vscode-foreground/75">{t('account:cloudUrlPillLabel')}</span> |
This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.
| <div className="mt-6 flex justify-center"> | ||
| <div className="inline-flex items-center px-3 py-1 gap-1 rounded-full bg-vscode-badge-background/50 text-vscode-badge-foreground text-xs"> | ||
| <span className="text-vscode-foreground/75">Roo Code Cloud URL: </span> | ||
| <a href="{cloudApiUrl}">{cloudApiUrl}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical issue: The href attribute is written as href="{cloudApiUrl}", which treats the curly braces as literal text. In JSX, you should use interpolation without quotes, e.g., , to correctly embed the variable.
| <a href="{cloudApiUrl}">{cloudApiUrl}</a> | |
| <a href={cloudApiUrl}>{cloudApiUrl}</a> |
| </div> | ||
| </> | ||
| )} | ||
| {cloudApiUrl && cloudApiUrl !== "https://app.roocode.com" && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be a good idea to make the URL a constant so it's easier to change if necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've reviewed the changes and found an issue that needs attention. The feature is well-implemented with good test coverage, but there's a critical syntax error in the href attribute that prevents the link from working correctly.
| <div className="mt-6 flex justify-center"> | ||
| <div className="inline-flex items-center px-3 py-1 gap-1 rounded-full bg-vscode-badge-background/50 text-vscode-badge-foreground text-xs"> | ||
| <span className="text-vscode-foreground/75">Roo Code Cloud URL: </span> | ||
| <a href="{cloudApiUrl}">{cloudApiUrl}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a syntax error here - the href attribute has quotes around the curly braces which will render literally as "{cloudApiUrl}" instead of the actual URL value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still an issue
| <div className="mt-6 flex justify-center"> | ||
| <div className="inline-flex items-center px-3 py-1 gap-1 rounded-full bg-vscode-badge-background/50 text-vscode-badge-foreground text-xs"> | ||
| <span className="text-vscode-foreground/75">Roo Code Cloud URL: </span> | ||
| <a href="{cloudApiUrl}">{cloudApiUrl}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this link intended to be clickable? If so, you might want to consider using the vscode.postMessage with openExternal type (similar to handleVisitCloudWebsite on line 55) to properly open the URL. Otherwise, if it's just for display, you could remove the anchor tag entirely.
|
@roomote-agent incorporate all of the PR feedback you see here |
|
Hi @brunobergher! I see the PR feedback and will incorporate all the suggested changes:
Working on these changes now! |
|
Hi @brunobergher! ✅ All PR feedback has been successfully incorporated: Changes Made:
Test Results:
The integration test failure appears to be unrelated to these changes. All the critical checks related to the PR feedback are now passing! |
Adds environment URL indicator pill to AccountView component to help engineers identify non-production environments.
📝 Description
This PR introduces a visual indicator in the Account view that displays the current Roo Code Cloud API URL when it differs from the production URL. This enhancement helps developers and engineers quickly identify when they're working with staging, development, or local environments.
Behavior
https://app.roocode.com): No pill displayedhttps://staging.roocode.com): Pill displayed with URLhttp://localhost:3000): Pill displayed with URL🧪 Testing
Added 4 new test cases to ensure proper functionality:
All tests passing: ✅ 8/8 tests in
AccountView.spec.tsx✅ Checklist
🚀 Impact
Important
Adds a URL indicator pill in
CloudViewto display non-productioncloudApiUrl, with tests and i18n updates.CloudViewto show non-productioncloudApiUrl.https://app.roocode.com) and whencloudApiUrlis undefined.CloudView.spec.tsxto verify pill visibility for differentcloudApiUrlvalues and authentication states.cloudUrlPillLabelfor multiple languages.This description was created by
for 947a72e. You can customize this summary. It will automatically update as commits are pushed.