Skip to content

Commit b5eec19

Browse files
roomote[bot]roomotemrubens
authored andcommitted
feat: rename Account tab to Cloud tab (#7558)
Co-authored-by: Roo Code <[email protected]> Co-authored-by: Matt Rubens <[email protected]>
1 parent feb0cc1 commit b5eec19

File tree

7 files changed

+31
-52
lines changed

7 files changed

+31
-52
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ public async clearTask(): Promise<void> {
15061506
// Check MDM compliance and send user to account tab if not compliant
15071507
// Only redirect if there's an actual MDM policy requiring authentication
15081508
if (this.mdmService?.requiresCloudAuth() && !this.checkMdmCompliance()) {
1509-
await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
1509+
await this.postMessageToWebview({ type: "action", action: "cloudButtonClicked" })
15101510
}
15111511
}
15121512

src/core/webview/webviewMessageHandler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,9 +2034,9 @@ export const webviewMessageHandler = async (
20342034
await provider.postStateToWebview()
20352035
break
20362036
}
2037-
case "accountButtonClicked": {
2038-
// Navigate to the account tab.
2039-
provider.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
2037+
case "cloudButtonClicked": {
2038+
// Navigate to the cloud tab.
2039+
provider.postMessageToWebview({ type: "action", action: "cloudButtonClicked" })
20402040
break
20412041
}
20422042
case "rooCloudSignIn": {

src/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@
101101
"icon": "$(link-external)"
102102
},
103103
{
104-
"command": "roo-cline.accountButtonClicked",
105-
"title": "%command.account.title%",
106-
"icon": "$(account)"
104+
"command": "roo-cline.cloudButtonClicked",
105+
"title": "%command.cloud.title%",
106+
"icon": "$(cloud)"
107107
},
108108
{
109109
"command": "roo-cline.settingsButtonClicked",
@@ -234,7 +234,7 @@
234234
"when": "view == roo-cline.SidebarProvider"
235235
},
236236
{
237-
"command": "roo-cline.accountButtonClicked",
237+
"command": "roo-cline.cloudButtonClicked",
238238
"group": "navigation@4",
239239
"when": "view == roo-cline.SidebarProvider"
240240
},
@@ -276,7 +276,7 @@
276276
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
277277
},
278278
{
279-
"command": "roo-cline.accountButtonClicked",
279+
"command": "roo-cline.cloudButtonClicked",
280280
"group": "navigation@4",
281281
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
282282
},

src/shared/ExtensionMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export interface ExtensionMessage {
140140
| "historyButtonClicked"
141141
| "promptsButtonClicked"
142142
| "marketplaceButtonClicked"
143-
| "accountButtonClicked"
143+
| "cloudButtonClicked"
144144
| "didBecomeVisible"
145145
| "focusInput"
146146
| "switchTab"

src/shared/WebviewMessage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export interface WebviewMessage {
174174
| "toggleApiConfigPin"
175175
| "setHistoryPreviewCollapsed"
176176
| "hasOpenedModeSelector"
177-
| "accountButtonClicked"
177+
| "cloudButtonClicked"
178178
| "rooCloudSignIn"
179179
| "rooCloudSignOut"
180180
| "condenseTaskContextRequest"
@@ -223,7 +223,7 @@ export interface WebviewMessage {
223223
| "openRouterImageGenerationSelectedModel"
224224
text?: string
225225
editedMessageContent?: string
226-
tab?: "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "account"
226+
tab?: "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "cloud"
227227
disabled?: boolean
228228
context?: string
229229
dataUri?: string

webview-ui/src/components/cloud/CloudView.tsx

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ import { ToggleSwitch } from "@/components/ui/toggle-switch"
1111

1212
import { History, PiggyBank, SquareArrowOutUpRightIcon } from "lucide-react"
1313

14-
// Define the production URL constant locally to avoid importing from cloud package in tests
15-
const PRODUCTION_ROO_CODE_API_URL = "https://app.roocode.com"
16-
1714
type CloudViewProps = {
1815
userInfo: CloudUserInfo | null
1916
isAuthenticated: boolean
@@ -59,16 +56,10 @@ export const CloudView = ({ userInfo, isAuthenticated, cloudApiUrl, onDone }: Cl
5956
// Send telemetry for cloud website visit
6057
// NOTE: Using ACCOUNT_* telemetry events for backward compatibility with analytics
6158
telemetryClient.capture(TelemetryEventName.ACCOUNT_CONNECT_CLICKED)
62-
const cloudUrl = cloudApiUrl || PRODUCTION_ROO_CODE_API_URL
59+
const cloudUrl = cloudApiUrl || "https://app.roocode.com"
6360
vscode.postMessage({ type: "openExternal", url: cloudUrl })
6461
}
6562

66-
const handleOpenCloudUrl = () => {
67-
if (cloudApiUrl) {
68-
vscode.postMessage({ type: "openExternal", url: cloudApiUrl })
69-
}
70-
}
71-
7263
const handleRemoteControlToggle = () => {
7364
const newValue = !remoteControlEnabled
7465
setRemoteControlEnabled(newValue)
@@ -195,18 +186,6 @@ export const CloudView = ({ userInfo, isAuthenticated, cloudApiUrl, onDone }: Cl
195186
</div>
196187
</>
197188
)}
198-
{cloudApiUrl && cloudApiUrl !== PRODUCTION_ROO_CODE_API_URL && (
199-
<div className="mt-6 flex justify-center">
200-
<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">
201-
<span className="text-vscode-foreground/75">{t("cloud:cloudUrlPillLabel")}: </span>
202-
<button
203-
onClick={handleOpenCloudUrl}
204-
className="text-vscode-textLink-foreground hover:text-vscode-textLink-activeForeground underline cursor-pointer bg-transparent border-none p-0">
205-
{cloudApiUrl}
206-
</button>
207-
</div>
208-
</div>
209-
)}
210189
</div>
211190
)
212191
}

webview-ui/src/components/cloud/__tests__/CloudView.spec.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
import { render, screen } from "@/utils/test-utils"
22

3-
import { AccountView } from "../AccountView"
3+
import { CloudView } from "../CloudView"
44

55
// Mock the translation context
66
vi.mock("@src/i18n/TranslationContext", () => ({
77
useAppTranslation: () => ({
88
t: (key: string) => {
99
const translations: Record<string, string> = {
10-
"account:title": "Account",
10+
"cloud:title": "Cloud",
1111
"settings:common.done": "Done",
12-
"account:signIn": "Connect to Roo Code Cloud",
13-
"account:cloudBenefitsTitle": "Connect to Roo Code Cloud",
14-
"account:cloudBenefitSharing": "Share tasks with others",
15-
"account:cloudBenefitHistory": "Access your task history",
16-
"account:cloudBenefitMetrics": "Get a holistic view of your token consumption",
17-
"account:logOut": "Log out",
18-
"account:connect": "Connect Now",
19-
"account:visitCloudWebsite": "Visit Roo Code Cloud",
20-
"account:remoteControl": "Roomote Control",
21-
"account:remoteControlDescription":
12+
"cloud:signIn": "Connect to Roo Code Cloud",
13+
"cloud:cloudBenefitsTitle": "Connect to Roo Code Cloud",
14+
"cloud:cloudBenefitSharing": "Share tasks with others",
15+
"cloud:cloudBenefitHistory": "Access your task history",
16+
"cloud:cloudBenefitMetrics": "Get a holistic view of your token consumption",
17+
"cloud:logOut": "Log out",
18+
"cloud:connect": "Connect Now",
19+
"cloud:visitCloudWebsite": "Visit Roo Code Cloud",
20+
"cloud:remoteControl": "Roomote Control",
21+
"cloud:remoteControlDescription":
2222
"Enable following and interacting with tasks in this workspace with Roo Code Cloud",
23-
"account:profilePicture": "Profile picture",
23+
"cloud:profilePicture": "Profile picture",
2424
}
2525
return translations[key] || key
2626
},
@@ -55,10 +55,10 @@ Object.defineProperty(window, "IMAGES_BASE_URI", {
5555
writable: true,
5656
})
5757

58-
describe("AccountView", () => {
58+
describe("CloudView", () => {
5959
it("should display benefits when user is not authenticated", () => {
6060
render(
61-
<AccountView
61+
<CloudView
6262
userInfo={null}
6363
isAuthenticated={false}
6464
cloudApiUrl="https://app.roocode.com"
@@ -83,7 +83,7 @@ describe("AccountView", () => {
8383
}
8484

8585
render(
86-
<AccountView
86+
<CloudView
8787
userInfo={mockUserInfo}
8888
isAuthenticated={true}
8989
cloudApiUrl="https://app.roocode.com"
@@ -112,7 +112,7 @@ describe("AccountView", () => {
112112
}
113113

114114
render(
115-
<AccountView
115+
<CloudView
116116
userInfo={mockUserInfo}
117117
isAuthenticated={true}
118118
cloudApiUrl="https://app.roocode.com"
@@ -136,7 +136,7 @@ describe("AccountView", () => {
136136
}
137137

138138
render(
139-
<AccountView
139+
<CloudView
140140
userInfo={mockUserInfo}
141141
isAuthenticated={true}
142142
cloudApiUrl="https://app.roocode.com"

0 commit comments

Comments
 (0)