Skip to content

The open-source app everyone uses to manage agents at work

feat(ui): add Feedback item to the account flyout menu (PAP-107) (#7854)

scotttonge3aada1df2d5
diff --git a/ui/src/components/SidebarAccountMenu.test.tsx b/ui/src/components/SidebarAccountMenu.test.tsx
index be119d5ba9..6de098f091 100644
--- a/ui/src/components/SidebarAccountMenu.test.tsx
+++ b/ui/src/components/SidebarAccountMenu.test.tsx
@@ -112,6 +112,21 @@ describe("SidebarAccountMenu", () => {
expect(document.body.textContent).toContain("Edit profile");
expect(document.body.textContent).not.toContain("Instance settings");
expect(document.body.textContent).toContain("Documentation");
+ expect(document.body.textContent).toContain("Feedback");
+
+ // Feedback link opens in a new tab pointing at the feedback URL
+ const feedbackAnchor = document.body.querySelector('a[href="https://paperclip.ing/feedback"]') as HTMLAnchorElement | null;
+ expect(feedbackAnchor).not.toBeNull();
+ expect(feedbackAnchor?.getAttribute("target")).toBe("_blank");
+
+ // Feedback appears after Documentation and before the theme toggle
+ const menuText = document.body.querySelector('[data-slot="popover-content"]')?.textContent ?? "";
+ const docsPos = menuText.indexOf("Documentation");
+ const feedbackPos = menuText.indexOf("Feedback");
+ const themePos = menuText.indexOf("Switch to");
+ expect(docsPos).toBeLessThan(feedbackPos);
+ expect(feedbackPos).toBeLessThan(themePos);
+
expect(document.body.textContent).toContain("Paperclip v1.2.3");
expect(document.body.textContent).toContain("[email protected]");
expect(document.body.querySelector('[data-slot="popover-content"]')?.className)
diff --git a/ui/src/components/SidebarAccountMenu.tsx b/ui/src/components/SidebarAccountMenu.tsx
index b127b3730d..593feecdc8 100644
--- a/ui/src/components/SidebarAccountMenu.tsx
+++ b/ui/src/components/SidebarAccountMenu.tsx
@@ -3,6 +3,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import {
BookOpen,
LogOut,
+ Megaphone,
type LucideIcon,
Moon,
UserRound,
@@ -21,6 +22,7 @@ import { cn, SIDEBAR_RAIL_HIDDEN_LABEL } from "../lib/utils";
const PROFILE_SETTINGS_PATH = "/company/settings/instance/profile";
const DOCS_URL = "https://docs.paperclip.ing/";
+const FEEDBACK_URL = "https://paperclip.ing/feedback";
interface SidebarAccountMenuProps {
deploymentMode?: DeploymentMode;
@@ -206,6 +208,14 @@ export function SidebarAccountMenu({
external
onClick={() => setOpen(false)}
/>
+ <MenuAction
+ label="Feedback"
+ description="Share feedback or report an issue."
+ icon={Megaphone}
+ href={FEEDBACK_URL}
+ external
+ onClick={() => setOpen(false)}
+ />
<MenuAction
label={theme === "dark" ? "Switch to light mode" : "Switch to dark mode"}
description="Toggle the app appearance."