Skip to content

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

fix(ui): remove the Account badge and version line from the account menu (#12818)

Devin Foleyc38b59484c66
diff --git a/ui/src/components/Layout.production.tsx b/ui/src/components/Layout.production.tsx
index 2903267e57..12621fca3b 100644
--- a/ui/src/components/Layout.production.tsx
+++ b/ui/src/components/Layout.production.tsx
@@ -604,8 +604,6 @@ export function Layout() {
</div>
<SidebarAccountMenu
deploymentMode={health?.deploymentMode}
- serverGit={health?.serverInfo?.git}
- version={health?.version}
/>
</div>
) : (
@@ -624,8 +622,6 @@ export function Layout() {
</div>
<SidebarAccountMenu
deploymentMode={health?.deploymentMode}
- serverGit={health?.serverInfo?.git}
- version={health?.version}
/>
</SidebarShell>
)}
diff --git a/ui/src/components/Layout.tsx b/ui/src/components/Layout.tsx
index b308eb394f..99b7fba771 100644
--- a/ui/src/components/Layout.tsx
+++ b/ui/src/components/Layout.tsx
@@ -659,8 +659,6 @@ export function Layout() {
</div>
<SidebarAccountMenu
deploymentMode={health?.deploymentMode}
- serverGit={health?.serverInfo?.git}
- version={health?.version}
forceExpanded={replacesPrimarySidebar}
/>
</div>
@@ -684,8 +682,6 @@ export function Layout() {
</div>
<SidebarAccountMenu
deploymentMode={health?.deploymentMode}
- serverGit={health?.serverInfo?.git}
- version={health?.version}
forceExpanded={replacesPrimarySidebar}
/>
</SidebarShell>
diff --git a/ui/src/components/SidebarAccountMenu.production.tsx b/ui/src/components/SidebarAccountMenu.production.tsx
index b592387638..c136d4ea2f 100644
--- a/ui/src/components/SidebarAccountMenu.production.tsx
+++ b/ui/src/components/SidebarAccountMenu.production.tsx
@@ -8,7 +8,7 @@ import {
UserRound,
UserRoundPen,
} from "lucide-react";
-import type { DeploymentMode, ServerGitInfo } from "@paperclipai/shared";
+import type { DeploymentMode } from "@paperclipai/shared";
import { Link } from "@/lib/router";
import { authApi } from "@/api/auth";
import { queryKeys } from "@/lib/queryKeys";
@@ -20,20 +20,15 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { cn, SIDEBAR_RAIL_HIDDEN_LABEL } from "../lib/utils";
import { ThemeToggle } from "./ThemeToggle";
import { SidebarServerInfo } from "./SidebarServerInfo";
-import { Badge } from "@/components/ui/badge";
const PROFILE_SETTINGS_PATH = "/company/settings/instance/profile";
const DOCS_URL = "https://docs.paperclip.ing/";
const FEEDBACK_URL = "https://paperclip.ing/feedback";
-const SOURCE_REPOSITORY_URL = "https://github.com/paperclipai/paperclip";
-const SOURCE_VERSION_RE = /\+\d+\.git\.([0-9a-f]{7,40})(?:\.dirty)?$/i;
interface SidebarAccountMenuProps {
deploymentMode?: DeploymentMode;
open?: boolean;
onOpenChange?: (open: boolean) => void;
- serverGit?: ServerGitInfo;
- version?: string | null;
}
interface MenuActionProps {
@@ -67,11 +62,6 @@ function deriveUserSlug(name: string | null | undefined, email: string | null |
return "me";
}
-function sourceVersionSha(version: string): string | null {
- const sourceVersion = version.match(SOURCE_VERSION_RE);
- return sourceVersion?.[1] ?? null;
-}
-
function MenuAction({ label, description, icon: Icon, onClick, href, external = false }: MenuActionProps) {
const className =
"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left transition-colors hover:bg-accent/60";
@@ -115,8 +105,6 @@ export function SidebarAccountMenu({
deploymentMode,
open: controlledOpen,
onOpenChange,
- serverGit,
- version,
}: SidebarAccountMenuProps) {
const [internalOpen, setInternalOpen] = useState(false);
const { isMobile, setSidebarOpen, collapsed, peeking } = useSidebar();
@@ -134,15 +122,8 @@ export function SidebarAccountMenu({
const displayName = session?.user.name?.trim() || "Board";
const secondaryLabel =
session?.user.email?.trim() || (deploymentMode === "authenticated" ? "Signed in" : "Local workspace board");
- const accountBadge = deploymentMode === "authenticated" ? "Account" : "Local";
const initials = deriveInitials(displayName);
const profileHref = `/u/${deriveUserSlug(session?.user.name, session?.user.email, session?.user.id)}`;
- const sourceSha = version ? sourceVersionSha(version) : null;
- const sourceFullSha =
- sourceSha && serverGit?.available && serverGit.fullSha.toLowerCase().startsWith(sourceSha.toLowerCase())
- ? serverGit.fullSha
- : sourceSha;
- const sourceBranch = sourceSha && serverGit?.available ? serverGit.branchName : null;
function closeNavigationChrome() {
setOpen(false);
@@ -189,40 +170,8 @@ export function SidebarAccountMenu({
</Avatar>
</div>
<div className="min-w-0 flex-1 pt-1">
- <div className="flex items-center gap-2">
- <h2 className="truncate text-base font-semibold text-foreground">{displayName}</h2>
- <Badge variant="ghost" className="bg-accent text-(length:--text-nano) font-semibold uppercase tracking-wide text-muted-foreground">
- {accountBadge}
- </Badge>
- </div>
+ <h2 className="truncate text-base font-semibold text-foreground">{displayName}</h2>
<p className="truncate text-sm text-muted-foreground">{secondaryLabel}</p>
- {sourceSha && sourceFullSha ? (
- <div className="mt-1 text-xs text-muted-foreground">
- {sourceBranch ? (
- <a
- href={`${SOURCE_REPOSITORY_URL}/tree/${encodeURIComponent(sourceBranch)}`}
- target="_blank"
- rel="noreferrer"
- className="block truncate transition-colors hover:text-foreground"
- >
- {sourceBranch}
- </a>
- ) : null}
- <p>
- Paperclip{" "}
- <a
- href={`${SOURCE_REPOSITORY_URL}/commit/${sourceFullSha}`}
- target="_blank"
- rel="noreferrer"
- className="transition-colors hover:text-foreground"
- >
- {sourceSha.slice(0, 7)}
- </a>
- </p>
- </div>
- ) : version ? (
- <p className="mt-1 text-xs text-muted-foreground">Paperclip v{version}</p>
- ) : null}
</div>
</div>
diff --git a/ui/src/components/SidebarAccountMenu.test.tsx b/ui/src/components/SidebarAccountMenu.test.tsx
index b883af6637..5c4ffe0c02 100644
--- a/ui/src/components/SidebarAccountMenu.test.tsx
+++ b/ui/src/components/SidebarAccountMenu.test.tsx
@@ -196,10 +196,7 @@ describe("SidebarAccountMenu", () => {
root.render(
<QueryClientProvider client={queryClient}>
<TooltipProvider>
- <SidebarAccountMenu
- deploymentMode="authenticated"
- version="1.2.3"
- />
+ <SidebarAccountMenu deploymentMode="authenticated" />
</TooltipProvider>
</QueryClientProvider>,
);
@@ -233,7 +230,9 @@ describe("SidebarAccountMenu", () => {
const themePos = menuText.indexOf("Switch to");
expect(docsPos).toBeLessThan(themePos);
- expect(document.body.textContent).toContain("Paperclip v1.2.3");
+ // The popover header stays down to name + email: no "Account" badge, no version line.
+ expect(popover?.textContent).not.toContain("Account");
+ expect(popover?.textContent).not.toContain("Paperclip v");
expect(document.body.textContent).toContain("[email protected]");
expect(document.body.querySelector('[data-slot="popover-content"]')?.className)
.toContain("w-(--sz-277px)");
@@ -331,53 +330,4 @@ describe("SidebarAccountMenu", () => {
});
});
- it("shows the short commit sha instead of a version for source builds", async () => {
- const root = createRoot(container);
- const queryClient = new QueryClient({
- defaultOptions: { queries: { retry: false } },
- });
-
- await act(async () => {
- root.render(
- <QueryClientProvider client={queryClient}>
- <TooltipProvider>
- <SidebarAccountMenu
- deploymentMode="authenticated"
- version="2026.626.0+58.git.518fc71ce"
- serverGit={{
- available: true,
- fullSha: "518fc71ce1234567890abcdef1234567890abcde",
- shortSha: "518fc71",
- branchName: "feature/source-build-label",
- subject: "Show source build label",
- committedAt: "2026-06-26T00:00:00.000Z",
- localChanges: {
- available: true,
- hasLocalChanges: false,
- stagedFileCount: 0,
- unstagedFileCount: 0,
- untrackedFileCount: 0,
- },
- }}
- open
- />
- </TooltipProvider>
- </QueryClientProvider>,
- );
- });
- await flushReact();
-
- expect(document.body.textContent).toContain("feature/source-build-labelPaperclip 518fc71");
- expect(document.body.textContent).not.toContain("2026.626.0+58.git.518fc71ce");
- expect(document.body.querySelector('a[href="https://github.com/paperclipai/paperclip/tree/feature%2Fsource-build-label"]')?.textContent).toBe(
- "feature/source-build-label",
- );
- expect(document.body.querySelector('a[href="https://github.com/paperclipai/paperclip/commit/518fc71ce1234567890abcdef1234567890abcde"]')?.textContent).toBe(
- "518fc71",
- );
-
- await act(async () => {
- root.unmount();
- });
- });
});
diff --git a/ui/src/components/SidebarAccountMenu.tsx b/ui/src/components/SidebarAccountMenu.tsx
index caec0bbd30..87c2897d51 100644
--- a/ui/src/components/SidebarAccountMenu.tsx
+++ b/ui/src/components/SidebarAccountMenu.tsx
@@ -9,7 +9,7 @@ import {
UserRound,
UserRoundPen,
} from "lucide-react";
-import type { DeploymentMode, ServerGitInfo } from "@paperclipai/shared";
+import type { DeploymentMode } from "@paperclipai/shared";
import { Link } from "@/lib/router";
import { authApi } from "@/api/auth";
import { queryKeys } from "@/lib/queryKeys";
@@ -21,20 +21,15 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { cn, SIDEBAR_RAIL_HIDDEN_LABEL } from "../lib/utils";
import { ThemeToggle } from "./ThemeToggle";
import { SidebarServerInfo } from "./SidebarServerInfo";
-import { Badge } from "@/components/ui/badge";
const PROFILE_SETTINGS_PATH = "/company/settings/instance/profile";
const DOCS_URL = "https://docs.paperclip.ing/";
const FEEDBACK_URL = "https://paperclip.ing/feedback";
-const SOURCE_REPOSITORY_URL = "https://github.com/paperclipai/paperclip";
-const SOURCE_VERSION_RE = /\+\d+\.git\.([0-9a-f]{7,40})(?:\.dirty)?$/i;
interface SidebarAccountMenuProps {
deploymentMode?: DeploymentMode;
open?: boolean;
onOpenChange?: (open: boolean) => void;
- serverGit?: ServerGitInfo;
- version?: string | null;
/** Contextual navigation occupies a full sidebar even if the saved global nav mode is collapsed. */
forceExpanded?: boolean;
}
@@ -70,11 +65,6 @@ function deriveUserSlug(name: string | null | undefined, email: string | null |
return "me";
}
-function sourceVersionSha(version: string): string | null {
- const sourceVersion = version.match(SOURCE_VERSION_RE);
- return sourceVersion?.[1] ?? null;
-}
-
function MenuAction({ label, description, icon: Icon, onClick, href, external = false }: MenuActionProps) {
const className =
"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left transition-colors hover:bg-accent/60";
@@ -118,8 +108,6 @@ export function SidebarAccountMenu({
deploymentMode,
open: controlledOpen,
onOpenChange,
- serverGit,
- version,
forceExpanded = false,
}: SidebarAccountMenuProps) {
const [internalOpen, setInternalOpen] = useState(false);
@@ -138,15 +126,8 @@ export function SidebarAccountMenu({
const displayName = session?.user.name?.trim() || "Board";
const secondaryLabel =
session?.user.email?.trim() || (deploymentMode === "authenticated" ? "Signed in" : "Local workspace board");
- const accountBadge = deploymentMode === "authenticated" ? "Account" : "Local";
const initials = deriveInitials(displayName);
const profileHref = `/u/${deriveUserSlug(session?.user.name, session?.user.email, session?.user.id)}`;
- const sourceSha = version ? sourceVersionSha(version) : null;
- const sourceFullSha =
- sourceSha && serverGit?.available && serverGit.fullSha.toLowerCase().startsWith(sourceSha.toLowerCase())
- ? serverGit.fullSha
- : sourceSha;
- const sourceBranch = sourceSha && serverGit?.available ? serverGit.branchName : null;
function closeNavigationChrome() {
setOpen(false);
@@ -193,40 +174,8 @@ export function SidebarAccountMenu({
</Avatar>
</div>
<div className="min-w-0 flex-1 pt-1">
- <div className="flex items-center gap-2">
- <h2 className="truncate text-base font-semibold text-foreground">{displayName}</h2>
- <Badge variant="ghost" className="bg-accent text-(length:--text-nano) font-semibold uppercase tracking-wide text-muted-foreground">
- {accountBadge}
- </Badge>
- </div>
+ <h2 className="truncate text-base font-semibold text-foreground">{displayName}</h2>
<p className="truncate text-sm text-muted-foreground">{secondaryLabel}</p>
- {sourceSha && sourceFullSha ? (
- <div className="mt-1 text-xs text-muted-foreground">
- {sourceBranch ? (
- <a
- href={`${SOURCE_REPOSITORY_URL}/tree/${encodeURIComponent(sourceBranch)}`}
- target="_blank"
- rel="noreferrer"
- className="block truncate transition-colors hover:text-foreground"
- >
- {sourceBranch}
- </a>
- ) : null}
- <p>
- Paperclip{" "}
- <a
- href={`${SOURCE_REPOSITORY_URL}/commit/${sourceFullSha}`}
- target="_blank"
- rel="noreferrer"
- className="transition-colors hover:text-foreground"
- >
- {sourceSha.slice(0, 7)}
- </a>
- </p>
- </div>
- ) : version ? (
- <p className="mt-1 text-xs text-muted-foreground">Paperclip v{version}</p>
- ) : null}
</div>
</div>
diff --git a/ui/storybook/stories/navigation-layout.stories.tsx b/ui/storybook/stories/navigation-layout.stories.tsx
index c78bdfb879..4eca73816f 100644
--- a/ui/storybook/stories/navigation-layout.stories.tsx
+++ b/ui/storybook/stories/navigation-layout.stories.tsx
@@ -256,7 +256,6 @@ function NavigationLayoutStories() {
deploymentMode="authenticated"
open
onOpenChange={() => undefined}
- version="0.3.1"
/>
</div>
</div>