Skip to content

Commit 4f4062c

Browse files
committed
fix(shell-docs): rename BIA to "CopilotKit" in sidebar selector, drop from picker
Two small UX nudges so the soft-default reads naturally to a fresh visitor: 1. Sidebar selector — closed pill and dropdown row both display "CopilotKit" instead of "Built-in Agent" when BIA is the effective framework. Topbar variant and other surfaces keep the registry name. The framing in the sidebar is "you're reading CopilotKit's docs" rather than "you've picked the Built-in Agent backend"; in the docs landing's "Continue with X" / "Browse X docs" affordances, the registry name is still the right framing. 2. Sidebar selector — BIA pinned at the top of the dropdown, outside the Popular category bucket. It's the default, so it reads more naturally as the always-there starting point than as one of several Popular options. 3. "Switch backend" picker on the docs landing filters BIA out. Showing "switch to Built-in Agent" inside a "Switch backend" affordance is a no-op tile when BIA is already the soft-default.
1 parent 4e75380 commit 4f4062c

2 files changed

Lines changed: 55 additions & 5 deletions

File tree

showcase/shell-docs/src/components/docs-landing-next.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ function FrameworkPicker({
3333
heading: string;
3434
description: string;
3535
}) {
36+
// Drop Built-in Agent: it's the soft-default the page is already
37+
// rendering as, so showing it under "Switch backend" would just be a
38+
// no-op tile.
3639
const integrations = getIntegrations()
37-
.slice()
40+
.filter((i) => i.slug !== "built-in-agent")
3841
.sort((a, b) => (a.sort_order ?? 999) - (b.sort_order ?? 999));
3942

4043
// Bucket integrations by category, honoring the canonical ordering.

showcase/shell-docs/src/components/framework-selector.tsx

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,17 @@ export function FrameworkSelector({
117117
// (Built-in Agent). The selector should never read "Pick a backend"
118118
// when the docs are actually rendering BIA code — that's misleading.
119119
const current = options.find((o) => o.slug === effectiveFramework);
120-
const label = current?.name ?? "Pick an agentic backend";
120+
121+
// BIA is the soft-default and the framing on the sidebar is "you're
122+
// reading CopilotKit's docs" rather than "you've picked the Built-in
123+
// Agent backend." Show "CopilotKit" in the sidebar selector chrome
124+
// (closed pill + dropdown row) but keep the registry name elsewhere
125+
// so DocsLandingNext, IntegrationGrid, etc. still call it Built-in
126+
// Agent where the framing is about choosing a backend.
127+
const isSidebar = variant === "sidebar";
128+
const displayNameFor = (opt: FrameworkOption) =>
129+
isSidebar && opt.slug === "built-in-agent" ? "CopilotKit" : opt.name;
130+
const label = current ? displayNameFor(current) : "Pick an agentic backend";
121131

122132
// Compute the target href for a given framework option given the current
123133
// path. Preserves feature slug when possible.
@@ -158,11 +168,19 @@ export function FrameworkSelector({
158168
for (const cat of categoryOrder) grouped.set(cat.id, []);
159169
grouped.set("other", []);
160170
for (const opt of options) {
171+
// Sidebar variant lifts BIA out of its category bucket and renders
172+
// it at the top of the dropdown — see render path below. Skip it
173+
// here so it doesn't also appear under Popular.
174+
if (isSidebar && opt.slug === "built-in-agent") continue;
161175
const bucket = grouped.has(opt.category) ? opt.category : "other";
162176
grouped.get(bucket)!.push(opt);
163177
}
164178

165-
const isSidebar = variant === "sidebar";
179+
// BIA pinned at the top of the sidebar dropdown — only the sidebar
180+
// variant (the topbar selector keeps the standard category layout).
181+
const pinnedBIA = isSidebar
182+
? (options.find((o) => o.slug === "built-in-agent") ?? null)
183+
: null;
166184

167185
// Sidebar variant: full-width pill with integration logo on the left,
168186
// framework name centered, chevron right. Violet accent border when a
@@ -202,7 +220,7 @@ export function FrameworkSelector({
202220
)}
203221
<span className="flex-1 min-w-0 text-left">
204222
{current ? (
205-
<span className="block truncate">{current.name}</span>
223+
<span className="block truncate">{label}</span>
206224
) : (
207225
<span className="block truncate text-[var(--text-muted)]">
208226
Pick a backend
@@ -292,6 +310,35 @@ export function FrameworkSelector({
292310
</button>
293311
)}
294312

313+
{pinnedBIA && (
314+
<div className="mb-2">
315+
<button
316+
key={pinnedBIA.slug}
317+
type="button"
318+
onClick={() => selectFramework(pinnedBIA.slug)}
319+
className={`w-full flex items-center gap-2 px-2 py-1.5 rounded text-[13px] transition-colors cursor-pointer ${
320+
pinnedBIA.slug === effectiveFramework
321+
? "bg-[var(--accent-light)] text-[var(--accent)]"
322+
: "text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:text-[var(--text)]"
323+
}`}
324+
>
325+
{pinnedBIA.logo ? (
326+
// eslint-disable-next-line @next/next/no-img-element
327+
<img
328+
src={pinnedBIA.logo}
329+
alt=""
330+
className="w-4 h-4 shrink-0"
331+
/>
332+
) : (
333+
<span className="w-4 h-4 shrink-0" />
334+
)}
335+
<span className="flex-1 text-left truncate">
336+
{displayNameFor(pinnedBIA)}
337+
</span>
338+
</button>
339+
</div>
340+
)}
341+
295342
{[...grouped.entries()].map(([catId, opts]) => {
296343
if (opts.length === 0) return null;
297344
const catLabel =
@@ -326,7 +373,7 @@ export function FrameworkSelector({
326373
<span className="w-4 h-4 shrink-0" />
327374
)}
328375
<span className="flex-1 text-left truncate">
329-
{opt.name}
376+
{displayNameFor(opt)}
330377
</span>
331378
</button>
332379
);

0 commit comments

Comments
 (0)