feat(ui): add Feedback item to SidebarAccountMenu

Adds a Megaphone-icon Feedback menu item between Documentation and the
theme toggle in the bottom-left account flyout. Opens paperclip.ing/feedback
in a new tab. Closes PAP-109 Part A.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
scotttongandClaude Sonnet 4.6 committed 2026-06-09 15:27:18 -07:00
1 parent a0f7d3daba
commit b454a12d5d
2 files changed
+25

No files matched your search

@@ -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("jane@example.com");
expect(document.body.querySelector('[data-slot="popover-content"]')?.className)
+10
View File
@@ -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."