From cf279e76a4300e9170af81e74e775b086d218e4a Mon Sep 17 00:00:00 2001 From: msukkari Date: Mon, 13 Jul 2026 19:07:03 -0700 Subject: [PATCH 1/2] feat(web): add Book a Call button to sidebar and docs navbar Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/docs.json | 4 +-- .../components/bookACallSidebarButton.tsx | 32 +++++++++++++++++++ .../components/defaultSidebar/index.tsx | 2 ++ .../components/settingsSidebar/index.tsx | 2 ++ .../(app)/@sidebar/components/sidebarBase.tsx | 5 ++- 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 packages/web/src/app/(app)/@sidebar/components/bookACallSidebarButton.tsx diff --git a/docs/docs.json b/docs/docs.json index 71f20c2c5..b83a923d7 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -231,8 +231,8 @@ "navbar": { "primary": { "type": "button", - "label": "GitHub", - "href": "https://github.com/sourcebot-dev/sourcebot" + "label": "Book a Call", + "href": "https://calendly.com/michael-sourcebot/sourcebot-demo?utm_source=docs" } }, "footer": { diff --git a/packages/web/src/app/(app)/@sidebar/components/bookACallSidebarButton.tsx b/packages/web/src/app/(app)/@sidebar/components/bookACallSidebarButton.tsx new file mode 100644 index 000000000..6a208c347 --- /dev/null +++ b/packages/web/src/app/(app)/@sidebar/components/bookACallSidebarButton.tsx @@ -0,0 +1,32 @@ +import { + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, +} from "@/components/ui/sidebar" +import { Phone } from "lucide-react" + +const BOOK_A_CALL_BASE_URL = "https://calendly.com/michael-sourcebot/sourcebot-demo" + +interface BookACallSidebarButtonProps { + // When the deployment is the public "ask GitHub" app, attribute bookings + // to `public-app` so they can be told apart from self-hosted instances. + isAskGhEnabled: boolean +} + +export function BookACallSidebarButton({ isAskGhEnabled }: BookACallSidebarButtonProps) { + const utmSource = isAskGhEnabled ? "public-app" : "app" + const href = `${BOOK_A_CALL_BASE_URL}?utm_source=${utmSource}` + + return ( + + + + + + Book a Call + + + + + ) +} diff --git a/packages/web/src/app/(app)/@sidebar/components/defaultSidebar/index.tsx b/packages/web/src/app/(app)/@sidebar/components/defaultSidebar/index.tsx index 04ff3caf6..a0ccd6269 100644 --- a/packages/web/src/app/(app)/@sidebar/components/defaultSidebar/index.tsx +++ b/packages/web/src/app/(app)/@sidebar/components/defaultSidebar/index.tsx @@ -14,6 +14,7 @@ import { RepoVisitHistory } from "./repoVisitHistory"; import { getAuthContext, withAuth } from "@/middleware/withAuth"; import { sew } from "@/middleware/sew"; import { hasEntitlement, isValidLicenseActive } from "@/lib/entitlements"; +import { env } from "@sourcebot/shared"; const SIDEBAR_CHAT_LIMIT = 30; export const SIDEBAR_REPO_VISITS_LIMIT = 10; @@ -57,6 +58,7 @@ export async function DefaultSidebar() { session={session} collapsible="icon" isValidLicenseActive={licenseActive} + isAskGhEnabled={env.EXPERIMENT_ASK_GH_ENABLED === 'true'} headerContent={