From aedcbeb321bc6c21d7600af51fee7a23d225cfe8 Mon Sep 17 00:00:00 2001
From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com>
Date: Tue, 26 May 2026 00:53:32 +0000
Subject: [PATCH] feat(web): org brain switcher in header + plan badges (#1006)
- Replace the top-left logo menu with an org switcher (Switch brain): lists organizations with avatar monograms, brand-blue active row, and the active org name (sans "Organization") shown above the supermemory wordmark.
- Switching an org persists the active org and reloads so all data re-scopes.
- Show each org's plan badge in the switcher, reusing the account settings badge (extracted OrgPlanBadge + resolveOrgPlan to a shared component).
- Match the profile dropdown to the same design (rows, hover/focus, border).
- Remove the 'Be part of the next supermemory app' research CTA card.
- Add hideCount prop to SpaceSelector; hide the space count in chat input.
---
apps/web/app/(app)/layout.tsx | 2 -
.../components/chat/home-chat-composer.tsx | 1 +
apps/web/components/chat/index.tsx | 2 +
apps/web/components/header.tsx | 116 ++++++++++++++----
apps/web/components/org-plan-badge.tsx | 35 ++++++
apps/web/components/settings/account.tsx | 33 +----
apps/web/components/space-selector.tsx | 15 ++-
apps/web/components/user-profile-menu.tsx | 22 ++--
packages/lib/auth-context.tsx | 7 +-
9 files changed, 155 insertions(+), 78 deletions(-)
create mode 100644 apps/web/components/org-plan-badge.tsx
diff --git a/apps/web/app/(app)/layout.tsx b/apps/web/app/(app)/layout.tsx
index b2a27e07..331f950c 100644
--- a/apps/web/app/(app)/layout.tsx
+++ b/apps/web/app/(app)/layout.tsx
@@ -1,14 +1,12 @@
"use client"
import { EnsureWorkspace } from "@/components/ensure-workspace"
-import { NextAppResearchCta } from "@/components/next-app-research-cta"
import { PWAInstallPrompt } from "@/components/pwa-install-prompt"
export default function AppLayout({ children }: { children: React.ReactNode }) {
return (
<>
+ Switch brain +
+{user.name}
{user.email}