From 81c9bd229eb84b287f8297cd19af4d3567bb1810 Mon Sep 17 00:00:00 2001 From: Furkan Akbulutlar Date: Thu, 18 Jun 2026 01:59:31 +0200 Subject: [PATCH 1/3] feat: add docs link to top bar and get-started modal --- components/home/GetStartedModal.tsx | 42 ++++++++++++++--------------- components/layout/TopBar.tsx | 16 +++++++++++ tests/ui/get-started-modal.test.ts | 20 +++++++------- 3 files changed, 46 insertions(+), 32 deletions(-) diff --git a/components/home/GetStartedModal.tsx b/components/home/GetStartedModal.tsx index ae73f5f1..5d899098 100644 --- a/components/home/GetStartedModal.tsx +++ b/components/home/GetStartedModal.tsx @@ -78,10 +78,8 @@ const SELF_HOST_CLI_INSTALLS: readonly CliInstall[] = [ }, ]; -const HOSTED_README_SETUP_URL = - "https://github.com/FrkAk/piyaz#use-the-hosted-version-no-clone"; -const SELF_HOST_README_SETUP_URL = - "https://github.com/FrkAk/piyaz#self-host-contribute"; +const HOSTED_DOCS_SETUP_URL = "https://docs.piyaz.ai/docs/get-started/install"; +const SELF_HOST_DOCS_SETUP_URL = "https://docs.piyaz.ai/docs/guides/self-host"; const SECTION_LABEL_CLASS = "font-mono text-[10px] font-semibold uppercase tracking-wider text-text-muted"; @@ -92,13 +90,13 @@ const MULTI_TEAM_HINT = interface FirstTimeBodyProps { /** Target-specific install snippets to render. */ cliInstalls: readonly CliInstall[]; - /** Target-specific README setup anchor. */ - readmeSetupUrl: string; + /** Target-specific docs setup URL. */ + docsSetupUrl: string; } interface ReturningBodyProps { - /** Target-specific README setup anchor. */ - readmeSetupUrl: string; + /** Target-specific docs setup URL. */ + docsSetupUrl: string; } /** @@ -115,16 +113,16 @@ export function getCliInstalls( } /** - * Select the setup guide anchor for the active deploy target. + * Select the docs setup URL for the active deploy target. * @param deployTarget - Build-time deploy target exposed to client bundles. - * @returns Hosted or self-host README setup URL. + * @returns Hosted or self-host docs setup URL. */ -export function getReadmeSetupUrl( +export function getDocsSetupUrl( deployTarget = process.env.NEXT_PUBLIC_DEPLOY_TARGET ?? "", ): string { return deployTarget === HOSTED_DEPLOY_TARGET - ? HOSTED_README_SETUP_URL - : SELF_HOST_README_SETUP_URL; + ? HOSTED_DOCS_SETUP_URL + : SELF_HOST_DOCS_SETUP_URL; } /** @@ -133,7 +131,7 @@ export function getReadmeSetupUrl( * @param props - Target-specific install copy. * @returns First-time install instructions. */ -function FirstTimeBody({ cliInstalls, readmeSetupUrl }: FirstTimeBodyProps) { +function FirstTimeBody({ cliInstalls, docsSetupUrl }: FirstTimeBodyProps) { return ( <>

@@ -172,12 +170,12 @@ function FirstTimeBody({ cliInstalls, readmeSetupUrl }: FirstTimeBodyProps) {

Full setup details (auth, updates, self-hosting) in the{" "} - project README + documentation .

@@ -191,7 +189,7 @@ function FirstTimeBody({ cliInstalls, readmeSetupUrl }: FirstTimeBodyProps) { * @param props - Target-specific setup link. * @returns Returning-user "go talk to your agent" hint. */ -function ReturningBody({ readmeSetupUrl }: ReturningBodyProps) { +function ReturningBody({ docsSetupUrl }: ReturningBodyProps) { return ( <>

@@ -214,12 +212,12 @@ function ReturningBody({ readmeSetupUrl }: ReturningBodyProps) { Setting up another tool, or starting from a fresh machine? Install commands live in the{" "} - project README + documentation .

@@ -240,7 +238,7 @@ export function GetStartedModal({ hasProjects = false, }: GetStartedModalProps) { const cliInstalls = getCliInstalls(); - const readmeSetupUrl = getReadmeSetupUrl(); + const docsSetupUrl = getDocsSetupUrl(); return (
{hasProjects ? ( - + ) : ( )}
diff --git a/components/layout/TopBar.tsx b/components/layout/TopBar.tsx index 121d87cc..6a7fc0e4 100644 --- a/components/layout/TopBar.tsx +++ b/components/layout/TopBar.tsx @@ -7,6 +7,7 @@ import { useCommandPalette } from "@/components/layout/CommandPaletteProvider"; import { useMobileNav } from "@/components/layout/MobileNav"; import { Kbd } from "@/components/shared/Kbd"; import { + IconDoc, IconMenu, IconMoon, IconSearch, @@ -116,6 +117,21 @@ export function TopBar({ aria-hidden="true" className="mx-1 hidden h-4 w-px bg-border md:inline-block" /> + + + Docs + +