-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Feature/code supernova #8188
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
Feature/code supernova #8188
Changes from 4 commits
c411271
e3a96ff
d34aad4
db84a07
d784c28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3035,5 +3035,10 @@ export const webviewMessageHandler = async ( | |
| }) | ||
| break | ||
| } | ||
| case "openSettings": { | ||
| // Execute the settings command to open the settings panel | ||
|
||
| await vscode.commands.executeCommand(getCommand("settingsButtonClicked")) | ||
| break | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,10 @@ export const CloudView = ({ userInfo, isAuthenticated, cloudApiUrl, onDone }: Cl | |
| vscode.postMessage({ type: "openExternal", url: cloudUrl }) | ||
| } | ||
|
|
||
| const handleStartFreeTrial = () => { | ||
| vscode.postMessage({ type: "openExternal", url: "https://app.roocode.com/billing" }) | ||
| } | ||
|
|
||
| const handleOpenCloudUrl = () => { | ||
| if (cloudApiUrl) { | ||
| vscode.postMessage({ type: "openExternal", url: cloudApiUrl }) | ||
|
|
@@ -272,9 +276,20 @@ export const CloudView = ({ userInfo, isAuthenticated, cloudApiUrl, onDone }: Cl | |
| <div className={cn(authInProgress && "opacity-50")}>{renderCloudBenefitsContent(t)}</div> | ||
|
|
||
| {!authInProgress && ( | ||
| <VSCodeButton appearance="primary" onClick={handleConnectClick} className="w-full"> | ||
| {t("cloud:connect")} | ||
| </VSCodeButton> | ||
| <> | ||
| <VSCodeButton | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This button logic is duplicated in ApiOptions.tsx (lines 666-679). Could we extract this into a shared component to avoid duplication and ensure consistency? |
||
| appearance="primary" | ||
| onClick={handleStartFreeTrial} | ||
| className="w-full"> | ||
| {t("cloud:startFreeTrial")} | ||
| </VSCodeButton> | ||
| <VSCodeButton | ||
| appearance="secondary" | ||
| onClick={handleConnectClick} | ||
| className="w-full"> | ||
| {t("cloud:connect")} | ||
| </VSCodeButton> | ||
| </> | ||
| )} | ||
|
|
||
| {/* Manual entry section */} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,7 @@ describe("HistoryPreview", () => { | |
| it("renders nothing when no tasks are available", () => { | ||
| mockUseTaskSearch.mockReturnValue({ | ||
| tasks: [], | ||
| recentTasks: [], | ||
| searchQuery: "", | ||
| setSearchQuery: vi.fn(), | ||
| sortOption: "newest", | ||
|
|
@@ -107,6 +108,7 @@ describe("HistoryPreview", () => { | |
| it("renders up to 3 tasks when tasks are available", () => { | ||
| mockUseTaskSearch.mockReturnValue({ | ||
| tasks: mockTasks, | ||
| recentTasks: mockTasks, | ||
| searchQuery: "", | ||
| setSearchQuery: vi.fn(), | ||
| sortOption: "newest", | ||
|
|
@@ -132,6 +134,7 @@ describe("HistoryPreview", () => { | |
| const threeTasks = mockTasks.slice(0, 3) | ||
| mockUseTaskSearch.mockReturnValue({ | ||
| tasks: threeTasks, | ||
| recentTasks: threeTasks, | ||
| searchQuery: "", | ||
| setSearchQuery: vi.fn(), | ||
| sortOption: "newest", | ||
|
|
@@ -156,6 +159,7 @@ describe("HistoryPreview", () => { | |
| const oneTask = mockTasks.slice(0, 1) | ||
| mockUseTaskSearch.mockReturnValue({ | ||
| tasks: oneTask, | ||
| recentTasks: oneTask, | ||
| searchQuery: "", | ||
| setSearchQuery: vi.fn(), | ||
| sortOption: "newest", | ||
|
|
@@ -175,6 +179,7 @@ describe("HistoryPreview", () => { | |
| it("passes correct props to TaskItem components", () => { | ||
| mockUseTaskSearch.mockReturnValue({ | ||
| tasks: mockTasks.slice(0, 3), | ||
| recentTasks: mockTasks.slice(0, 3), | ||
| searchQuery: "", | ||
| setSearchQuery: vi.fn(), | ||
| sortOption: "newest", | ||
|
|
@@ -228,4 +233,25 @@ describe("HistoryPreview", () => { | |
|
|
||
| expect(container.firstChild).toHaveClass("flex", "flex-col", "gap-3") | ||
| }) | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good addition of the fallback test case! Consider adding more edge cases:
|
||
| it("falls back to recent tasks when filtered tasks are empty", () => { | ||
| mockUseTaskSearch.mockReturnValue({ | ||
| tasks: [], | ||
| recentTasks: mockTasks, | ||
| searchQuery: "", | ||
| setSearchQuery: vi.fn(), | ||
| sortOption: "newest", | ||
| setSortOption: vi.fn(), | ||
| lastNonRelevantSort: null, | ||
| setLastNonRelevantSort: vi.fn(), | ||
| showAllWorkspaces: false, | ||
| setShowAllWorkspaces: vi.fn(), | ||
| }) | ||
|
|
||
| render(<HistoryPreview />) | ||
|
|
||
| expect(screen.getByTestId("task-item-task-1")).toBeInTheDocument() | ||
| expect(screen.getByTestId("task-item-task-2")).toBeInTheDocument() | ||
| expect(screen.getByTestId("task-item-task-3")).toBeInTheDocument() | ||
| }) | ||
| }) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -665,6 +665,14 @@ const ApiOptions = ({ | |
| <div className="flex flex-col gap-2"> | ||
| <VSCodeButton | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This duplicates the button logic from CloudView.tsx. Consider extracting into a shared component to maintain DRY principles and ensure consistent behavior across the app. |
||
| appearance="primary" | ||
| onClick={() => | ||
| vscode.postMessage({ type: "openExternal", url: "https://app.roocode.com/billing" }) | ||
| } | ||
| className="w-fit"> | ||
| {t("settings:providers.roo.startFreeTrialButton")} | ||
| </VSCodeButton> | ||
| <VSCodeButton | ||
| appearance="secondary" | ||
| onClick={() => vscode.postMessage({ type: "rooCloudSignIn" })} | ||
| className="w-fit"> | ||
| {t("settings:providers.roo.connectButton")} | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,10 @@ | |
| "logOut": "Log out", | ||
| "testApiAuthentication": "Test API Authentication", | ||
| "signIn": "Connect to Roo Code Cloud", | ||
| "connect": "Get started", | ||
| "connect": "Connect to Roo Code Cloud", | ||
| "startFreeTrial": "Start a Free Trial of Roo Code Pro", | ||
| "cloudBenefitsTitle": "Try Roo Code Cloud", | ||
| "cloudBenefitWalkaway": "Follow and control tasks from anywhere (including your phone)", | ||
| "cloudBenefitWalkaway": "Follow and control tasks from anywhere, including your phone (Pro only)", | ||
| "cloudBenefitSharing": "Share tasks with others", | ||
| "cloudBenefitHistory": "Access your task history from anywhere", | ||
| "cloudBenefitMetrics": "Get a holistic view of your token consumption", | ||
|
|
@@ -26,6 +27,6 @@ | |
| "upsell": { | ||
| "autoApprovePowerUser": "Giving Roo some independence? Control it from anywhere with Roo Code Cloud. <learnMoreLink>Learn more</learnMoreLink>.", | ||
| "longRunningTask": "This might take a while. Continue from anywhere with Cloud.", | ||
| "taskList": "Roo Code Cloud is here: follow and control your tasks from anywhere. <learnMoreLink>Learn more</learnMoreLink>." | ||
| "taskList": "π« CODE SUPERNOVA π<lineBreak/>Astronomical context β’ Long-running tasks β’ Mobile management via Roo Code Pro<lineBreak/>Try both free today by selecting <providersLink>provider Roo Code Cloud</providersLink>" | ||
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -392,7 +392,8 @@ | |
| }, | ||
| "roo": { | ||
| "authenticatedMessage": "Securely authenticated through your Roo Code Cloud account.", | ||
| "connectButton": "Connect to Roo Code Cloud" | ||
| "connectButton": "Connect to Roo Code Cloud", | ||
| "startFreeTrialButton": "Start Free Pro Trial" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "Start Free Pro Trial" button text should be properly internationalized. Currently it's hardcoded in English across all locale files. Consider using a translation key like "startFreeTrialButton" with appropriate translations for each locale. |
||
| }, | ||
| "openRouter": { | ||
| "providerRouting": { | ||
|
|
||
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.
The privacy policy now includes a section on marketing communications. Has this been reviewed by legal to ensure compliance with applicable data protection regulations (GDPR, CCPA, etc.)?