From 26ce6da3fc467a3c6b25d36a5c96c09eed8085e7 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:07:47 +0000 Subject: [PATCH 1/3] Add Pagefind searchbar to apps/web header - Install vite-plugin-pagefind and pagefind dependencies - Configure pagefind plugin in vite.config.ts - Update build script to run pagefind after vite build - Create Search component using Pagefind UI - Add Search component to header - Import Pagefind UI CSS in styles.css Co-Authored-By: yujonglee --- apps/web/package.json | 4 +- apps/web/src/components/header.tsx | 2 + apps/web/src/components/search.tsx | 26 ++ apps/web/src/styles.css | 1 + apps/web/vite.config.ts | 5 + pnpm-lock.yaml | 429 +++++++++++++++++++++++++---- 6 files changed, 406 insertions(+), 61 deletions(-) create mode 100644 apps/web/src/components/search.tsx diff --git a/apps/web/package.json b/apps/web/package.json index 2861c7deed..bc4ce1e889 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "dev": "VITE_APP_URL=\"http://localhost:3000\" dotenvx run --ignore MISSING_ENV_FILE -f ../../.env.supabase -f ../../.env.restate -f .env -- vite dev --port 3000", - "build": "vite build", + "build": "vite build && pagefind --site dist/client", "serve": "vite preview", "test": "playwright test", "typecheck": "pnpm -F @hypr/web build && tsc --project tsconfig.json --noEmit", @@ -77,9 +77,11 @@ "@vitejs/plugin-react": "^5.1.1", "jsdom": "^27.2.0", "netlify": "^23.11.1", + "pagefind": "^1.4.0", "tanstack-router-sitemap": "^1.0.13", "typescript": "^5.9.3", "vite": "^7.2.4", + "vite-plugin-pagefind": "^1.0.7", "web-vitals": "^5.1.0" } } diff --git a/apps/web/src/components/header.tsx b/apps/web/src/components/header.tsx index 0ed6572494..9aac622257 100644 --- a/apps/web/src/components/header.tsx +++ b/apps/web/src/components/header.tsx @@ -8,6 +8,7 @@ import { } from "lucide-react"; import { useState } from "react"; +import { Search } from "@/components/search"; import { useDocsDrawer } from "@/hooks/use-docs-drawer"; import { getPlatformCTA, usePlatform } from "@/hooks/use-platform"; @@ -176,6 +177,7 @@ export function Header() {