Open-source SEO, GEO, and marketing skills for AI agents.
feat(notfair-cmo): land on Chat by default when opening an agent
Yuting Zhong4fea342cc536
diff --git a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/page.tsx b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/page.tsxindex db507500..86279ac7 100644--- a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/page.tsx+++ b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/page.tsx@@ -7,5 +7,5 @@ export default async function AgentIndexPage({params: Promise<{ agent: string; project: string }>;}) {const { agent, project } = await params;- redirect(projectHref(project, `/agents/${agent}/tasks`));+ redirect(projectHref(project, `/agents/${agent}/chat`));}diff --git a/notfair-cmo/src/components/agent-nav.test.tsx b/notfair-cmo/src/components/agent-nav.test.tsxindex 266c2aab..176869c3 100644--- a/notfair-cmo/src/components/agent-nav.test.tsx+++ b/notfair-cmo/src/components/agent-nav.test.tsx@@ -58,21 +58,21 @@ afterEach(() => {});describe("AgentNav", () => {- it("renders one entry per agent linking to the tasks tab", () => {+ it("renders one entry per agent linking to the chat tab", () => {render(<AgentNav projectSlug="proj" agents={agents} />);// The link's accessible name includes the personal name + role pill// text, so /Greg|CMO/i / /Ana|Google Ads/i both match.expect(screen.getByRole("link", { name: /Greg/i })).toHaveAttribute("href",- "/proj/agents/cmo-greg/tasks",+ "/proj/agents/cmo-greg/chat",);expect(screen.getByRole("link", { name: /Ana/i })).toHaveAttribute("href",- "/proj/agents/google-ads-ana/tasks",+ "/proj/agents/google-ads-ana/chat",);expect(screen.getByRole("link", { name: /Custom Bot/i })).toHaveAttribute("href",- "/proj/agents/custom/tasks",+ "/proj/agents/custom/chat",);});diff --git a/notfair-cmo/src/components/agent-nav.tsx b/notfair-cmo/src/components/agent-nav.tsxindex 74c2e783..feb41396 100644--- a/notfair-cmo/src/components/agent-nav.tsx+++ b/notfair-cmo/src/components/agent-nav.tsx@@ -49,9 +49,10 @@ export function AgentNav({ projectSlug, agents, inFlightCounts = {} }: Props) {return (<SidebarMenu>{agents.map((a) => {- // Every agent lands on Tasks (its workspace) by default. Chat tab- // is one click away.- const href = projectHref(projectSlug, `/agents/${a.slug}/tasks`);+ // Every agent lands on Chat by default — users start by talking to+ // the agent. Tasks tab (the audit/history view of filed work) is one+ // click away.+ const href = projectHref(projectSlug, `/agents/${a.slug}/chat`);const agentBase = `/${projectSlug}/agents/${a.slug}`;const isActive =pathname === agentBase || pathname?.startsWith(`${agentBase}/`);diff --git a/notfair-cmo/src/components/agent-tabs.tsx b/notfair-cmo/src/components/agent-tabs.tsxindex 94a2ed6b..e0abd8ea 100644--- a/notfair-cmo/src/components/agent-tabs.tsx+++ b/notfair-cmo/src/components/agent-tabs.tsx@@ -18,10 +18,12 @@ type Tab = {icon: React.ComponentType<{ className?: string }>;};-// Tasks leads — it's the agent's workspace where the live transcript sits.+// Chat leads — users start by talking to the agent; tasks materialize from+// that conversation. The Tasks tab is the audit/history view of work the+// agent (or its orchestrator) has filed, not a place to create work.const TABS: Tab[] = [- { key: "tasks", label: "Tasks", icon: ListChecks },{ key: "chat", label: "Chat", icon: MessageSquare },+ { key: "tasks", label: "Tasks", icon: ListChecks },{ key: "files", label: "Files", icon: FileText },{ key: "skills", label: "Skills", icon: Sparkles },{ key: "cron", label: "Cron", icon: Clock },