Skip to content

Commit effdff0

Browse files
committed
Home page CTA
1 parent 6413a27 commit effdff0

File tree

6 files changed

+43
-35
lines changed

6 files changed

+43
-35
lines changed

webview-ui/src/components/chat/AutoApproveMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
189189
onClick={() => openUpsell()}
190190
dismissOnClick={false}
191191
variant="banner">
192-
{t("chat:cloud.upsell.autoApprovePowerUser")}
192+
{t("cloud:upsell.autoApprovePowerUser")}
193193
</DismissibleUpsell>
194194
</>
195195
)}

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { useDeepCompareEffect, useEvent, useMount } from "react-use"
33
import debounce from "debounce"
44
import { Virtuoso, type VirtuosoHandle } from "react-virtuoso"
55
import removeMd from "remove-markdown"
6-
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
6+
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
77
import useSound from "use-sound"
88
import { LRUCache } from "lru-cache"
9-
import { useTranslation } from "react-i18next"
9+
import { Trans, useTranslation } from "react-i18next"
1010

1111
import { useDebounceEffect } from "@src/utils/useDebounceEffect"
1212
import { appendImages } from "@src/utils/imageUtils"
@@ -37,10 +37,10 @@ import { useExtensionState } from "@src/context/ExtensionStateContext"
3737
import { useSelectedModel } from "@src/components/ui/hooks/useSelectedModel"
3838
import RooHero from "@src/components/welcome/RooHero"
3939
import RooTips from "@src/components/welcome/RooTips"
40-
import RooCloudCTA from "@src/components/welcome/RooCloudCTA"
4140
import { StandardTooltip } from "@src/components/ui"
4241
import { useAutoApprovalState } from "@src/hooks/useAutoApprovalState"
4342
import { useAutoApprovalToggles } from "@src/hooks/useAutoApprovalToggles"
43+
import { CloudUpsellDialog } from "@src/components/cloud/CloudUpsellDialog"
4444

4545
import TelemetryBanner from "../common/TelemetryBanner"
4646
import VersionIndicator from "../common/VersionIndicator"
@@ -56,6 +56,9 @@ import SystemPromptWarning from "./SystemPromptWarning"
5656
import ProfileViolationWarning from "./ProfileViolationWarning"
5757
import { CheckpointWarning } from "./CheckpointWarning"
5858
import { QueuedMessages } from "./QueuedMessages"
59+
import DismissibleUpsell from "../common/DismissibleUpsell"
60+
import { useCloudUpsell } from "@src/hooks/useCloudUpsell"
61+
import { Cloud } from "lucide-react"
5962

6063
export interface ChatViewProps {
6164
isHidden: boolean
@@ -208,6 +211,15 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
208211
clineAskRef.current = clineAsk
209212
}, [clineAsk])
210213

214+
const {
215+
isOpen: isUpsellOpen,
216+
openUpsell,
217+
closeUpsell,
218+
handleConnect,
219+
} = useCloudUpsell({
220+
autoOpenOnAuth: false,
221+
})
222+
211223
// Keep inputValueRef in sync with inputValue state
212224
useEffect(() => {
213225
inputValueRef.current = inputValue
@@ -1831,7 +1843,25 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
18311843
{telemetrySetting === "unset" && <TelemetryBanner />}
18321844

18331845
<div className="mb-2.5">
1834-
{cloudIsAuthenticated || taskHistory.length < 4 ? <RooTips /> : <RooCloudCTA />}
1846+
{cloudIsAuthenticated || taskHistory.length < 4 ? (
1847+
<RooTips />
1848+
) : (
1849+
<>
1850+
<DismissibleUpsell
1851+
upsellId="taskList"
1852+
icon={<Cloud className="size-4 mt-0.5 shrink-0" />}
1853+
onClick={() => openUpsell()}
1854+
dismissOnClick={false}
1855+
className="bg-vscode-editor-background p-4 !text-base">
1856+
<Trans
1857+
i18nKey="cloud:upsell.taskList"
1858+
components={{
1859+
learnMoreLink: <VSCodeLink href="#" />,
1860+
}}
1861+
/>
1862+
</DismissibleUpsell>
1863+
</>
1864+
)}
18351865
</div>
18361866
{/* Show the task history preview if expanded and tasks exist */}
18371867
{taskHistory.length > 0 && isExpanded && <HistoryPreview />}
@@ -2013,6 +2043,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
20132043
)}
20142044

20152045
<div id="roo-portal" />
2046+
<CloudUpsellDialog open={isUpsellOpen} onOpenChange={closeUpsell} onConnect={handleConnect} />
20162047
</div>
20172048
)
20182049
}

webview-ui/src/components/common/DismissibleUpsell.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ interface DismissibleUpsellProps {
77
upsellId: string
88
/** Optional CSS class name for styling */
99
className?: string
10+
/** Optional Icon component */
11+
icon?: ReactNode
1012
/** Content to display inside the upsell */
1113
children: ReactNode
1214
/** Visual variant of the upsell */
@@ -34,6 +36,7 @@ const DismissibleUpsell = memo(
3436
({
3537
upsellId,
3638
className,
39+
icon,
3740
children,
3841
variant = "default",
3942
onDismiss,
@@ -105,7 +108,7 @@ const DismissibleUpsell = memo(
105108
}
106109
// Build container classes based on variant and presence of click handler
107110
const containerClasses = [
108-
"relative flex items-start justify-between gap-1",
111+
"relative flex items-start justify-between gap-2",
109112
"text-sm",
110113
variants[variant].container,
111114
onClick && "cursor-pointer hover:opacity-90 transition-opacity duration-200",
@@ -137,6 +140,7 @@ const DismissibleUpsell = memo(
137140
handleDismiss()
138141
}
139142
}}>
143+
{icon && icon}
140144
<div>{children}</div>
141145
<button
142146
className={buttonClasses}

webview-ui/src/components/welcome/RooCloudCTA.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,6 @@
354354
"versionIndicator": {
355355
"ariaLabel": "Version {{version}} - Click to view release notes"
356356
},
357-
"rooCloudCTA": {
358-
"title": "Roo Code Cloud is evolving!",
359-
"description": "Run Roomote agents in the cloud, access your tasks from anywhere, collaborate with others, and more.",
360-
"joinWaitlist": "Sign up to get the latest updates."
361-
},
362357
"command": {
363358
"triggerDescription": "Trigger the {{name}} command"
364359
},

webview-ui/src/i18n/locales/en/cloud.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"startOver": "Start over",
2121
"upsell": {
2222
"autoApprovePowerUser": "Giving Roo some independence? Control it from anywhere with Roo Code Cloud. Click to learn more.",
23-
"longRunningTask": "This might take a while. Continue from anywhere with Cloud."
23+
"longRunningTask": "This might take a while. Continue from anywhere with Cloud.",
24+
"taskList": "Roo Code Cloud is here: follow and control your tasks from anywhere. <learnMoreLink>Learn more</learnMoreLink>."
2425
}
2526
}

0 commit comments

Comments
 (0)