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 (
<>
{children}
-
>
)
diff --git a/apps/web/components/chat/home-chat-composer.tsx b/apps/web/components/chat/home-chat-composer.tsx
index 9e50fe33..8f4188a8 100644
--- a/apps/web/components/chat/home-chat-composer.tsx
+++ b/apps/web/components/chat/home-chat-composer.tsx
@@ -59,6 +59,7 @@ export function HomeChatComposer({
onValueChange={setChatSpaceProjects}
variant="insideOut"
includeAuto
+ hideCount
triggerClassName="h-auto min-h-0 max-w-[min(160px,35vw)] rounded-full border border-[#161F2C] bg-[#000000] px-3 py-1.5 shadow-none hover:bg-[#05080D]"
/>
>
diff --git a/apps/web/components/chat/index.tsx b/apps/web/components/chat/index.tsx
index 98dc46d7..db4be786 100644
--- a/apps/web/components/chat/index.tsx
+++ b/apps/web/components/chat/index.tsx
@@ -980,6 +980,7 @@ export function ChatSidebar({
onValueChange={setChatSpaceProjects}
variant="insideOut"
includeAuto
+ hideCount
triggerClassName="h-10 min-h-10 max-w-[min(192px,42vw)] border border-[#73737333] bg-[#0D121A] shadow-[1.5px_1.5px_4.5px_0_rgba(0,0,0,0.70)_inset]"
/>
>
@@ -1176,6 +1177,7 @@ export function ChatSidebar({
onValueChange={setChatSpaceProjects}
variant="insideOut"
includeAuto
+ hideCount
triggerClassName="h-auto min-h-0 max-w-[min(160px,35vw)] rounded-full border border-[#161F2C] bg-[#000000] px-3 py-1.5 shadow-none hover:bg-[#05080D]"
/>
>
diff --git a/apps/web/components/header.tsx b/apps/web/components/header.tsx
index 9d840b70..6847e5cd 100644
--- a/apps/web/components/header.tsx
+++ b/apps/web/components/header.tsx
@@ -39,14 +39,39 @@ import { FeedbackModal } from "./feedback-modal"
import { useViewMode } from "@/lib/view-mode-context"
import { useQueryState } from "nuqs"
import { feedbackParam } from "@/lib/search-params"
+import { useCustomer } from "autumn-js/react"
+import { useTokenUsage } from "@/hooks/use-token-usage"
+import { useOrgSummaries } from "@/hooks/use-org-summaries"
+import { OrgPlanBadge, resolveOrgPlan } from "@/components/org-plan-badge"
interface HeaderProps {
onAddMemory?: () => void
onOpenSearch?: () => void
}
+const brainItemClass = (active: boolean) =>
+ cn(
+ "gap-2.5 rounded-lg px-2 py-1.5 text-sm font-medium cursor-pointer transition-colors",
+ "hover:bg-white/[0.06] focus:bg-white/[0.06] focus:text-white",
+ active ? "bg-white/[0.06] text-white" : "text-white/85",
+ )
+
+const brainTileClass = (active: boolean) =>
+ cn(
+ "flex size-7 shrink-0 items-center justify-center rounded-lg border text-[11px] font-semibold",
+ active
+ ? "border-[#2261CA66] bg-[#0B2A57] text-[#7EB0FF]"
+ : "border-white/[0.08] bg-white/[0.04] text-white/70",
+ )
+
export function Header({ onAddMemory, onOpenSearch }: HeaderProps) {
- const { user, isRestoring } = useAuth()
+ const { user, isRestoring, org, organizations, setActiveOrg } = useAuth()
+ const autumn = useCustomer()
+ const { currentPlan } = useTokenUsage(autumn)
+ const { data: orgSummaries } = useOrgSummaries()
+ const planByOrgId = new Map(
+ (orgSummaries ?? []).map((s) => [s.orgId, s.plan] as const),
+ )
const { selectedProjects, setSelectedProjects } = useProject()
const router = useRouter()
const isMobile = useIsMobile()
@@ -66,6 +91,14 @@ export function Header({ onAddMemory, onOpenSearch }: HeaderProps) {
user?.email?.split("@")[0] ||
""
const userName = displayName ? `${displayName.split(" ")[0]}'s` : "My"
+ const orgLabel = org?.name.replace(/\s*organizations?\s*$/i, "").trim()
+ const topLabel = orgLabel || userName
+ const hasOrgs = (organizations?.length ?? 0) > 0
+
+ const selectOrg = (slug: string, isActive: boolean) => {
+ if (isActive) return
+ void setActiveOrg(slug).then(() => window.location.reload())
+ }
return (