Skip to content

Commit 22d9076

Browse files
adamleithpclaude
andcommitted
feat(ui): scope the breadcrumb row to task detail
The in-pane breadcrumb/header row now renders only on the task-detail view. Every other page drops it (the title bar search carries wayfinding instead); the /website Channels space keeps its own header via WebsiteLayout and is unaffected. Also stop the Skills and MCP servers pages from pushing header content, so their mirrored appearance in the Channels space loses the row too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K18PGBxVQy1fnC9ADbst3y
1 parent b092f19 commit 22d9076

3 files changed

Lines changed: 12 additions & 42 deletions

File tree

packages/ui/src/features/mcp-servers/components/McpServersView.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Plugs } from "@phosphor-icons/react";
21
import type {
32
McpRecommendedServer,
43
McpServerInstallation,
@@ -8,7 +7,6 @@ import { AddCustomServerForm } from "@posthog/ui/features/mcp-server-manager/Add
87
import { MarketplaceView } from "@posthog/ui/features/mcp-servers/components/parts/MarketplaceView";
98
import { McpInstalledRail } from "@posthog/ui/features/mcp-servers/components/parts/McpInstalledRail";
109
import { useMcpServers } from "@posthog/ui/features/mcp-servers/hooks/useMcpServers";
11-
import { useSetHeaderContent } from "@posthog/ui/hooks/useSetHeaderContent";
1210
import {
1311
AlertDialog,
1412
Box,
@@ -46,22 +44,6 @@ export function McpServersView() {
4644
null,
4745
);
4846

49-
const headerContent = useMemo(
50-
() => (
51-
<Flex align="center" gap="2" className="w-full min-w-0">
52-
<Plugs size={12} className="shrink-0 text-gray-10" />
53-
<Text
54-
className="truncate whitespace-nowrap font-medium text-[13px]"
55-
title="MCP servers"
56-
>
57-
MCP servers
58-
</Text>
59-
</Flex>
60-
),
61-
[],
62-
);
63-
useSetHeaderContent(headerContent);
64-
6547
const {
6648
installations,
6749
installationsLoading,

packages/ui/src/features/skills/SkillsView.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
TextField,
1212
} from "@radix-ui/themes";
1313
import { useCallback, useEffect, useMemo, useState } from "react";
14-
import { useSetHeaderContent } from "../../hooks/useSetHeaderContent";
1514
import { ResizableSidebar } from "../../primitives/ResizableSidebar";
1615
import { MarketplaceBrowse } from "./MarketplaceBrowse";
1716
import { NewSkillDialog } from "./NewSkillDialog";
@@ -115,23 +114,6 @@ export function SkillsView() {
115114
return map;
116115
}, [skills, searchQuery]);
117116

118-
const headerContent = useMemo(
119-
() => (
120-
<Flex align="center" gap="2" className="w-full min-w-0">
121-
<Lightbulb size={12} className="shrink-0 text-gray-10" />
122-
<Text
123-
className="truncate whitespace-nowrap font-medium text-[13px]"
124-
title="Skills"
125-
>
126-
Skills
127-
</Text>
128-
</Flex>
129-
),
130-
[],
131-
);
132-
133-
useSetHeaderContent(headerContent);
134-
135117
return (
136118
<Flex direction="column" height="100%" className="overflow-hidden">
137119
<Box px="4" className="shrink-0 border-b border-b-(--gray-5)">

packages/ui/src/shell/ContentHeader.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ import { useHeaderStore } from "@posthog/ui/shell/headerStore";
55
import { Flex } from "@radix-ui/themes";
66

77
// The in-pane content header for the unified Bluebird chrome. Shows the active
8-
// view's title (pushed into the header store by each view) on the left and, on
9-
// a task detail, that task's action row (TaskHeaderActions) on the right — the
10-
// branch selector, review-panel toggle, cloud/local handoff, skill buttons and
11-
// task actions that used to live in the Code header bar. Renders nothing when
12-
// neither is present. The /website space keeps its own header (WebsiteLayout),
13-
// so this is mounted only outside it.
8+
// view's title (pushed into the header store by each view) on the left and that
9+
// task's action row (TaskHeaderActions) on the right — the branch selector,
10+
// review-panel toggle, cloud/local handoff, skill buttons and task actions that
11+
// used to live in the Code header bar.
12+
//
13+
// This breadcrumb row is now scoped to the task-detail view only: every other
14+
// page drops it (the title bar search carries wayfinding instead). The /website
15+
// (Channels) space keeps its own header (WebsiteLayout), so it's unaffected —
16+
// this is mounted only outside it.
1417
export function ContentHeader() {
1518
const content = useHeaderStore((state) => state.content);
1619
const view = useAppView();
@@ -22,6 +25,9 @@ export function ContentHeader() {
2225
: undefined;
2326
const showTaskSection = view.type === "task-detail" && Boolean(activeTask);
2427

28+
// Only the task-detail view keeps the breadcrumb row.
29+
if (view.type !== "task-detail") return null;
30+
2531
if (!content && !showTaskSection) return null;
2632

2733
return (

0 commit comments

Comments
 (0)