Skip to content

feat(bluebird): mirror Code view's top nav in the Website space#3028

Closed
raquelmsmith wants to merge 3 commits into
mainfrom
posthog-code/website-nav-parity
Closed

feat(bluebird): mirror Code view's top nav in the Website space#3028
raquelmsmith wants to merge 3 commits into
mainfrom
posthog-code/website-nav-parity

Conversation

@raquelmsmith

Copy link
Copy Markdown
Member

Problem

The Code view of PostHog Code has a set of top items in the left nav that were missing from the Website (Bluebird / Channels) view, and the ones that did exist bounced the user back to the /code space. This brings the Website nav to parity and keeps every destination inside /website.

Why: the Website space should stand on its own — navigating to Inbox, Agents, etc. shouldn't kick you out of Channels and into the Code view.

Changes

The Website left nav now mirrors the Code view's top items, all staying in the /website space. New order: Home · Search · Inbox · Canvas · Agents · Customize.

  • Search — adds the shared SearchItem (opens the command menu, shows the ⌘K hint), identical to the Code view.
  • Inbox (/website/inbox) — the inbox subtree is forked under /website/inbox/* sharing the same view components. Navigation is made space-aware: a new inboxSpaceFromPath + per-space route maps in @posthog/core, a useInboxSpace()/useInboxRoutes() hook, and every tab, card, back-link and redirect resolves to the space you're in. Uses the real InboxItem (PR-review badge + Beta tag). Cmd+I and the "open associated report" action are space-aware too.
  • Agents (/website/agents) — the agents subtree is forked (scouts + the agent-applications platform). A space-keyed AGENTS_ROUTE map + a useAgentsRoutes() hook drive every link/navigate across the shared components (including the AI agent-builder's client tools).
  • Customize (/website/customize) — a new page with its own secondary left sidebar (Skills · MCP servers), each rendering the shared view. Replaces the old standalone /website/skills and /website/mcp-servers routes.

The route tree was regenerated and the useAppView active-state mapping updated so highlighting works across both spaces.

How did you test this?

  • @posthog/core typecheck: clean
  • @posthog/ui typecheck: clean
  • Biome check on changed files: clean
  • @posthog/core tests: 1797 passed
  • @posthog/ui tests: 1096 passed

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit e1a0b5f.

@greptile-apps

greptile-apps Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(bluebird): mirror Code view's top n..." | Re-trigger Greptile

Comment thread packages/ui/src/features/sidebar/components/SidebarNavSection.tsx Outdated
Comment thread packages/core/src/inbox/reportMembership.ts
@greptile-apps

greptile-apps Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/ui/src/features/sidebar/components/SidebarNavSection.tsx, line 43-49 (link)

    P2 The block comment was written before this PR added /website mirrors for Inbox and Agents, but now directly contradicts the goInbox / goAgents logic on the very next lines. A future reader following the comment might conclude those items still jump to /code and "fix" them, reverting the space-awareness added here.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (2): Last reviewed commit: "feat(bluebird): mirror Code view's top n..." | Re-trigger Greptile

Comment thread packages/ui/src/features/canvas/components/CustomizeLayout.tsx Outdated
@raquelmsmith raquelmsmith reopened this Jul 1, 2026
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (3): Last reviewed commit: "fix(bluebird): address review findings o..." | Re-trigger Greptile

Bring the Website (Bluebird / Channels) left nav to parity with the Code
view, keeping every destination inside the /website space instead of
bouncing back to /code. New order: Home · Search · Inbox · Canvas · Agents
· Customize.

- Search: adds the shared SearchItem (opens the command menu, ⌘K hint).
- Inbox: forks the whole inbox subtree under /website/inbox/* sharing the
  same view components. Navigation is space-aware via inboxSpaceFromPath +
  per-space route maps in @posthog/core and a useInboxSpace/useInboxRoutes
  hook, so every tab, card, back-link and redirect stays in the active
  space. Uses the real InboxItem (PR-review badge + Beta tag). Cmd+I and the
  "open associated report" action are space-aware too.
- Agents: forks the agents subtree under /website/agents/* (scouts +
  agent-applications platform). A space-keyed AGENTS_ROUTE map + a
  useAgentsRoutes hook drive every link/navigate across the shared
  components (incl. the agent-builder client tools).
- Customize: a new /website/customize page with its own secondary left
  sidebar (Skills · MCP servers), replacing the old standalone
  /website/skills and /website/mcp-servers routes.

useAppView active-state mapping and the route tree are updated for both
spaces.

Generated-By: PostHog Code
Task-Id: dd8d849b-2434-42fd-a147-701e8fd06232
The doc + inline comments still claimed Inbox and Agents have no /website
mirror and jump back to Code, contradicting the now space-aware goInbox /
goAgents handlers. Update them so a future reader doesn't "fix" the
mirroring away.

Generated-By: PostHog Code
Task-Id: dd8d849b-2434-42fd-a147-701e8fd06232
Greptile review findings:

- P1: in the Channels space, the Code-pane SidebarNavSection routed both
  Skills and MCP servers to /website/customize, which redirects to Skills —
  so MCP servers silently opened Skills. Add distinct
  navigateToWebsiteCustomizeSkills / navigateToWebsiteCustomizeMcpServers
  targets and point each item at its own sub-route.
- P2: hoist the constant RegExp in inboxTabFromPath to module scope so it's
  compiled once instead of per call.
- P2: CustomizeLayout derived isSkills as `!isMcp`; make it an explicit
  prefix check so a future third sub-route doesn't light up the Skills item.

Generated-By: PostHog Code
Task-Id: dd8d849b-2434-42fd-a147-701e8fd06232
@raquelmsmith raquelmsmith force-pushed the posthog-code/website-nav-parity branch from 35fd04a to e1a0b5f Compare July 1, 2026 15:30

Copy link
Copy Markdown
Member Author

🤖 Agent (PostHog Code) posting on @raquelmsmith's behalf at her request.

Rebased onto main and resolved the conflict in useAgentBuilderClientTools.ts — the useCallback dependency array now includes both setPendingMcpConnect (from main) and routes (from this branch).

All Greptile review findings are addressed on the branch:

  • P1 — MCP servers vs Skills now route to distinct /website/customize/* targets (replied inline).
  • P2inboxTabFromPath regex hoisted to module scope (replied inline).
  • P2CustomizeLayout isSkills is now an explicit prefix check (replied inline).
  • P2 (comment outside diff) — the SidebarNavSection block comment was updated to describe the space-aware goInbox/goAgents mirroring, so it no longer contradicts the code.

Verified after rebase: @posthog/core + @posthog/ui typecheck clean, Biome clean on changed files, core tests 1847 passed, ui tests 1120 passed, and the route tree regenerates with no diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant