From 10ff1adbaf895c5f7a4a58dd244e46b1b756ea9b Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 25 Nov 2025 11:50:06 +0000 Subject: [PATCH 1/4] feat: add contact links to About settings page --- webview-ui/src/components/settings/About.tsx | 39 ++++++- .../settings/__tests__/About.spec.tsx | 106 ++++++++++++++++++ webview-ui/src/i18n/locales/en/settings.json | 17 +++ 3 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 webview-ui/src/components/settings/__tests__/About.spec.tsx diff --git a/webview-ui/src/components/settings/About.tsx b/webview-ui/src/components/settings/About.tsx index 9afee12d72e..c3c35c1ff7a 100644 --- a/webview-ui/src/components/settings/About.tsx +++ b/webview-ui/src/components/settings/About.tsx @@ -1,7 +1,7 @@ import { HTMLAttributes } from "react" import { useAppTranslation } from "@/i18n/TranslationContext" import { Trans } from "react-i18next" -import { Info, Download, Upload, TriangleAlert } from "lucide-react" +import { Info, Download, Upload, TriangleAlert, Bug, Lightbulb, Shield, MessageCircle } from "lucide-react" import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import type { TelemetrySetting } from "@roo-code/types" @@ -38,6 +38,43 @@ export const About = ({ telemetrySetting, setTelemetrySetting, className, ...pro
+
+
+ + + {t("settings:about.bugReport.label")}{" "} + + {t("settings:about.bugReport.link")} + + +
+
+ + + {t("settings:about.featureRequest.label")}{" "} + + {t("settings:about.featureRequest.link")} + + +
+
+ + + {t("settings:about.securityIssue.label")}{" "} + + {t("settings:about.securityIssue.link")} + + +
+
+ + + {t("settings:about.contact.label")}{" "} + security@roocode.com + +
+
+
({ + vscode: { postMessage: vi.fn() }, +})) + +vi.mock("@/i18n/TranslationContext", () => { + const actual = vi.importActual("@/i18n/TranslationContext") + return { + ...actual, + useAppTranslation: () => ({ + t: (key: string) => key, + }), + } +}) + +vi.mock("@roo/package", () => ({ + Package: { + version: "1.0.0", + sha: "abc12345", + }, +})) + +describe("About", () => { + const defaultProps = { + telemetrySetting: "enabled" as const, + setTelemetrySetting: vi.fn(), + } + + beforeEach(() => { + vi.clearAllMocks() + }) + + it("renders the About section header", () => { + render( + + + , + ) + expect(screen.getByText("settings:sections.about")).toBeInTheDocument() + }) + + it("displays version information", () => { + render( + + + , + ) + expect(screen.getByText(/Version: 1\.0\.0/)).toBeInTheDocument() + }) + + it("renders the bug report section with label and link text", () => { + render( + + + , + ) + expect(screen.getByText("settings:about.bugReport.label")).toBeInTheDocument() + expect(screen.getByText("settings:about.bugReport.link")).toBeInTheDocument() + }) + + it("renders the feature request section with label and link text", () => { + render( + + + , + ) + expect(screen.getByText("settings:about.featureRequest.label")).toBeInTheDocument() + expect(screen.getByText("settings:about.featureRequest.link")).toBeInTheDocument() + }) + + it("renders the security issue section with label and link text", () => { + render( + + + , + ) + expect(screen.getByText("settings:about.securityIssue.label")).toBeInTheDocument() + expect(screen.getByText("settings:about.securityIssue.link")).toBeInTheDocument() + }) + + it("renders the contact section with label and email", () => { + render( + + + , + ) + expect(screen.getByText("settings:about.contact.label")).toBeInTheDocument() + expect(screen.getByText("security@roocode.com")).toBeInTheDocument() + }) + + it("renders export, import, and reset buttons", () => { + render( + + + , + ) + expect(screen.getByText("settings:footer.settings.export")).toBeInTheDocument() + expect(screen.getByText("settings:footer.settings.import")).toBeInTheDocument() + expect(screen.getByText("settings:footer.settings.reset")).toBeInTheDocument() + }) +}) diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 82b2df3f686..e26e862863a 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -35,6 +35,23 @@ "language": "Language", "about": "About Roo Code" }, + "about": { + "bugReport": { + "label": "Found a bug?", + "link": "File on GitHub" + }, + "featureRequest": { + "label": "Have an idea?", + "link": "Share it with us" + }, + "securityIssue": { + "label": "Discovered a security issue?", + "link": "Follow our disclosure process" + }, + "contact": { + "label": "Need to talk to us? Write" + } + }, "slashCommands": { "description": "Manage your slash commands to quickly execute custom workflows and actions. Learn more" }, From da21e0b740729229733382b0dd1a1f053b09e220 Mon Sep 17 00:00:00 2001 From: Bruno Bergher Date: Tue, 25 Nov 2025 12:06:43 +0000 Subject: [PATCH 2/4] Tweaks --- webview-ui/src/components/settings/About.tsx | 101 ++++++++++-------- .../src/components/settings/Section.tsx | 2 +- webview-ui/src/i18n/locales/en/settings.json | 8 +- 3 files changed, 64 insertions(+), 47 deletions(-) diff --git a/webview-ui/src/components/settings/About.tsx b/webview-ui/src/components/settings/About.tsx index c3c35c1ff7a..2271155969d 100644 --- a/webview-ui/src/components/settings/About.tsx +++ b/webview-ui/src/components/settings/About.tsx @@ -1,7 +1,17 @@ import { HTMLAttributes } from "react" import { useAppTranslation } from "@/i18n/TranslationContext" import { Trans } from "react-i18next" -import { Info, Download, Upload, TriangleAlert, Bug, Lightbulb, Shield, MessageCircle } from "lucide-react" +import { + Info, + Download, + Upload, + TriangleAlert, + Bug, + Lightbulb, + Shield, + MessageCircle, + MessagesSquare, +} from "lucide-react" import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import type { TelemetrySetting } from "@roo-code/types" @@ -38,9 +48,31 @@ export const About = ({ telemetrySetting, setTelemetrySetting, className, ...pro
-
-
- +
+ { + const checked = e.target.checked === true + setTelemetrySetting(checked ? "enabled" : "disabled") + }}> + {t("settings:footer.telemetry.label")} + +

+ , + }} + /> +

+
+
+ +
+

Contact & Community

+
+
+ {t("settings:about.bugReport.label")}{" "} @@ -48,8 +80,8 @@ export const About = ({ telemetrySetting, setTelemetrySetting, className, ...pro
-
- +
+ {t("settings:about.featureRequest.label")}{" "} @@ -57,8 +89,8 @@ export const About = ({ telemetrySetting, setTelemetrySetting, className, ...pro
-
- +
+ {t("settings:about.securityIssue.label")}{" "} @@ -66,46 +98,31 @@ export const About = ({ telemetrySetting, setTelemetrySetting, className, ...pro
-
- +
+ {t("settings:about.contact.label")}{" "} - security@roocode.com + support@roocode.com + +
+
+ + + , + discordLink: , + }} + />
+
-
- { - const checked = e.target.checked === true - setTelemetrySetting(checked ? "enabled" : "disabled") - }}> - {t("settings:footer.telemetry.label")} - -

- , - }} - /> -

-
- -
- , - redditLink: , - discordLink: , - }} - /> -
- -
+
+

Settings

+
-

Contact & Community

+

{t("settings:about.contactAndCommunity")}

@@ -121,7 +121,7 @@ export const About = ({ telemetrySetting, setTelemetrySetting, className, ...pro
-

Settings

+

{t("settings:about.manageSettings")}