Skip to content

feat(web): marketing-first routing — / is marketing, docs at /docs - #19

Merged
Codehagen merged 7 commits into
mainfrom
feat/marketing-area
Apr 19, 2026
Merged

Codehagen merged 7 commits into
mainfrom
feat/marketing-area

Conversation

@Codehagen

@Codehagen Codehagen commented Apr 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Promotes the marketing landing to helpbase.dev/ and moves the docs index to helpbase.dev/docs. Articles unchanged at /{category}/{slug}. Tenant subdomains unchanged.

Routing after this PR

helpbase.dev/                 → marketing landing (Tailark hero)
helpbase.dev/docs             → docs index (categories + featured articles)
helpbase.dev/{category}       → article category
helpbase.dev/{category}/{slug} → article
helpbase.dev/landing          → 301 → /  (defensive, for stale external refs)
{slug}.helpbase.dev/*         → tenant subdomain (unchanged via proxy.ts)

What changed

  • File move: (marketing)/landing/page.tsx → (marketing)/page.tsx
  • File move: (main)/page.tsx → (main)/docs/page.tsx
  • Outbound / link refs updated to /docs (4 places, all in docs context):
    • components/header-docs.tsx logo
    • components/footer.tsx "helpbase" link
    • (main)/(docs)/[category]/page.tsx breadcrumb (text "Home" → "Docs")
    • (main)/(docs)/[category]/[slug]/page.tsx breadcrumb (same)
  • next.config.mjs adds 301 /landing → /
  • Originating commits also installed the hero block and isolated marketing route group (see prior commit history on this branch)

Tenant subdomain Link href="/" references kept as-is — those resolve to the tenant root under that subdomain, not the apex.

Verified

  • pnpm --filter web typecheck — clean
  • pnpm --filter web build — all 4 critical routes resolve:
    • ○ / (marketing, static)
    • ○ /docs (docs index, static)
    • ● /[category] (article category, SSG)
    • ● /[category]/[slug] (article, SSG)

Out of scope (polish PRs)

  • Marketing header nav still has block placeholders (Solutions / Pricing / Company). Real nav (Docs → /docs, GitHub, Demo) is a follow-up.
  • Logo cloud in hero shows tech brand logos as social proof — reframe as "Works with" later.
  • Sitemap.xml + robots.txt — none today, add when SEO matters.
  • Reserved-slug list to prevent future article-vs-marketing-page collisions (e.g. /pricing, /about) — defer.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added dedicated landing page with hero section and partner logo showcase
    • Introduced separate navigation and layouts for marketing and documentation sections
    • New responsive navigation menu system with mobile support
    • Added accordion and navigation menu UI components
    • Expanded icon and illustration library
  • Documentation

    • Updated breadcrumb navigation to link to docs section
  • Chores

    • Changed default theme from system to light mode
    • Integrated Radix UI component primitives
    • Added new UI component library with buttons and menu controls

Split marketing from docs so they can evolve independently. /landing
sits in a new `(marketing)` route group with its own minimal layout
(no docs sidebar, no SearchDialog, no Footer-with-docs-links). Renders
a hero-section block with its own marketing header — completely
independent of helpbase.dev/ (which remains the docs index).

What changed:

1. Rename `components/header.tsx` → `components/header-docs.tsx` (and
   `Header` → `HeaderDocs`) so the docs surface has its own
   non-colliding component name.
2. Update `(main)/layout.tsx` to import `HeaderDocs`.
3. Re-point `components.json` `ui` alias from `@workspace/ui/components`
   → `@/components/ui` so shadcn installs keep everything under
   `apps/web` instead of fragmenting across the workspace UI package.
   Existing `@workspace/ui/components/badge` and `@workspace/ui/lib/utils`
   imports are unaffected — they resolve via package exports, not the
   components.json alias (alias only controls where new installs land).
4. Add `(marketing)` route group with a pass-through layout.
5. Add `/landing` page rendering the new hero section.
6. Install hero section block (27 files) under `apps/web/components/`:
   `hero-section.tsx`, `header.tsx` (marketing header, not the docs
   one), `logo.tsx`, `logo-cloud.tsx`, ui primitives (accordion,
   button, navigation-menu), illustration, brand SVGs, `use-media` hook.
7. Replace block's placeholder copy (headline, subline, badge, CTA)
   with helpbase content. GitHub link on the pill, demo.helpbase.dev
   on the primary CTA.
8. Swap accordion.tsx's `@hugeicons/*` deps for `lucide-react` (already
   a dep) — saves 2 dependencies, same icon behavior.
9. Fix a TS strict-null bug in logo-cloud's interval setter that
   blocked typecheck (Tailark's source isn't strict).
10. Allowlist `images.unsplash.com` in `next.config.mjs` for the hero's
    backdrop image.
11. Add `radix-ui` dep to apps/web (umbrella used by accordion).

Net: `/landing` is a standalone marketing surface ready to iterate
on. Docs UX at `/` is unchanged. Future `pnpm dlx shadcn@latest add`
runs from `apps/web` land everything in one place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
helpbase Ready Ready Preview, Comment Apr 19, 2026 5:38pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 19, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A comprehensive marketing/documentation split architecture is implemented, introducing a new marketing landing page with dedicated header, hero section, and logo cloud components alongside a redesigned documentation header. Multiple UI primitives (accordion, button, navigation menu) and icon components are added, with configuration updates for redirects, theme defaults, and sync scripts to manage template generation.

Changes

Cohort / File(s) Summary
Marketing Layout & Pages
app/(marketing)/layout.tsx, app/(marketing)/page.tsx
New marketing layout component and landing page using new HeroSection.
Documentation Layout & Breadcrumbs
app/(main)/layout.tsx, app/(main)/(docs)/*/page.tsx
Main layout switched to HeaderDocs; breadcrumb navigation updated from / ("Home") to /docs ("Docs").
Header Components
components/header-docs.tsx, components/header.tsx
HeaderDocs added for documentation (sticky, with search trigger and theme toggle); Header redesigned for marketing (fixed, responsive with scroll-aware styling and navigation menu).
Hero & Branding Components
components/hero-section.tsx, components/logo-cloud.tsx
New hero section landing component and animated logo carousel with per-category logo rotation.
UI Component Library
components/ui/accordion.tsx, components/ui/button.tsx, components/ui/navigation-menu.tsx
New Radix-based accordion, button with variants, and navigation menu primitives.
SVG Icon Components
components/ui/svgs/*.tsx
24 new SVG icon components (Beacon, Bolt, Cisco, Cloudflare, Gemini, Hulu, Leap Wallet, Linear, OpenAI, PayPal, Polars, Prime Video, Slack, Spotify, Stripe, Supabase, Twilio, Vercel, plus utilities).
Utility & Hooks
hooks/use-media.ts, components/ui/illustrations/product-illustration.tsx
New responsive media query hook and product illustration component with customer data aggregation.
Configuration & Dependencies
next.config.mjs, package.json, components.json, theme-provider.tsx
Next.js image/redirect config added; new dependencies (@radix-ui/react-navigation-menu, class-variance-authority, motion); shadcn UI alias updated; default theme changed to light with system sync disabled.
Navigation Updates
components/footer.tsx
Footer "helpbase" link changed from / to /docs.
Template & Registry Sync
scripts/sync-templates.mjs
Sync script extended with path remaps (e.g., header-docs.tsx → header.tsx), content transforms for component renaming, breadcrumb rewriting, and marketing-specific file exclusions.
Template & Registry Files
packages/create-helpbase/templates/*/, registry/helpbase/*/
Corresponding updates in generated templates and registry: breadcrumb links, footer links, theme defaults, and new redirect config for /docs → /.

Sequence Diagram

sequenceDiagram
    actor User
    participant Marketing as Marketing Page
    participant Header as Header (Marketing)
    participant NavMenu as Navigation Menu
    participant HeroSection as Hero Section
    participant Search as Search Dialog
    participant Docs as Docs Section

    User->>Marketing: Visit landing page
    Marketing->>Header: Render Header (fixed, scroll-aware)
    Header->>NavMenu: Render desktop nav menu
    Header->>User: Display theme toggle & menu
    
    User->>Header: Click search trigger
    Header->>Search: Dispatch KeyboardEvent (cmd+k)
    Search->>User: Show search results
    
    User->>Header: Click Features/Use Cases link
    Header->>NavMenu: Highlight active menu item
    NavMenu->>User: Navigate section
    
    User->>HeroSection: View landing (with logo carousel)
    HeroSection->>User: Animate logos, show CTA buttons
    
    User->>Header: Click Docs link or CTA
    Header->>Docs: Navigate to /docs
    Docs->>Docs: Render HeaderDocs (sticky, docs-focused)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A marketing leap with headers anew,
Docs split from home in a polished debut,
Icons and menus dance, logos spin round,
Navigation flows—no friction found! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly summarizes the main change: converting the app to be marketing-first with the landing page at / and docs relocated to /docs.
Description check ✅ Passed The description provides a clear summary, routing diagram, detailed list of changes, and verification steps, covering all key aspects of the PR scope.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/marketing-area

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/package.json (1)

22-40: ⚠️ Potential issue | 🟠 Major

Redundant Radix UI package dependencies.

The package.json includes both the radix-ui umbrella package (Line 40: ^1.4.3) and individual scoped packages @radix-ui/react-slot and @radix-ui/react-navigation-menu (Lines 22–23). The radix-ui v1.4.3 meta-package re-exports all Radix Primitives including Slot, Accordion, and Navigation Menu, making the individual package dependencies redundant. Your codebase already imports from both sources (Accordion from radix-ui, Slot and NavigationMenuPrimitive from individual @radix-ui/* packages), which adds unnecessary bloat to dependencies. Remove the individual @radix-ui/react-slot and @radix-ui/react-navigation-menu entries from package.json and update imports to use the umbrella package consistently.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/package.json` around lines 22 - 40, Remove the redundant individual
Radix packages by deleting the "@radix-ui/react-slot" and
"@radix-ui/react-navigation-menu" entries from package.json and switch any
imports that reference those scoped packages to the umbrella package "radix-ui"
(e.g., replace imports of Slot and NavigationMenuPrimitive from
"@radix-ui/react-slot" and "@radix-ui/react-navigation-menu" with imports from
"radix-ui" to match how Accordion is already imported); then run install to
update lockfile and verify all imports compile and tests/build succeed.
🧹 Nitpick comments (5)
apps/web/components/ui/illustrations/product-illustration.tsx (1)

87-91: Extract inline totals for readability (minor).

The revenue and arr totals are parsed/reduced inline inside JSX, which is hard to read and recomputed every render. Since customers is a module-level constant, you can compute these once outside the component:

♻️ Proposed refactor
+const totalRevenue = customers.reduce((sum, c) => sum + parseFloat(c.revenue.replace(/[$,]/g, '')), 0)
+const totalArr = customers.reduce((sum, c) => sum + parseFloat(c.arr.replace(/[$,]/g, '')), 0)
...
-    Total revenue of <span className="text-foreground font-medium">${customers.reduce((sum, c) => sum + parseFloat(c.revenue.replace(/[$,]/g, '')), 0).toLocaleString('en-US', { minimumFractionDigits: 2 })}</span> and combined ARR of <span className="text-foreground font-medium">${customers.reduce((sum, c) => sum + parseFloat(c.arr.replace(/[$,]/g, '')), 0).toLocaleString('en-US')}</span>.
+    Total revenue of <span className="text-foreground font-medium">${totalRevenue.toLocaleString('en-US', { minimumFractionDigits: 2 })}</span> and combined ARR of <span className="text-foreground font-medium">${totalArr.toLocaleString('en-US')}</span>.

Or, ideally, store numeric values in the customers dataset and format at display time to avoid the parse-from-string round trip entirely.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/illustrations/product-illustration.tsx` around lines
87 - 91, The JSX currently computes totals inline using customers.reduce(...)
for revenue and arr which is hard to read and re-runs on every render; extract
those calculations into a single precomputed constant (e.g., const totalRevenue
and const totalARR) outside or at the top of the component so the JSX uses
formatted totals instead of inline reduces, and if possible convert the
customers dataset to store numeric revenue/arr to avoid parseFloat/replace at
render time; reference the customers array and the inline reduce expressions in
product-illustration.tsx when making the change.
apps/web/components/ui/svgs/vercel.tsx (1)

2-31: LGTM. Clean pass-through; VercelFull correctly uses role="img" + aria-label. Consider adding the same role/aria-label to the compact Vercel mark for consistency, or aria-hidden when purely decorative.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/svgs/vercel.tsx` around lines 2 - 31, The compact
Vercel SVG (Vercel) lacks accessibility attributes; update the Vercel
component's <svg> to include accessibility metadata—either add role="img" and an
aria-label like "Vercel logomark" for parity with VercelFull, or if it is purely
decorative set aria-hidden="true"—ensure you modify the Vercel function's svg
element (keeping {...props} intact).
apps/web/components/header.tsx (1)

131-131: Minor: drop the == true comparison.

isMobileMenuOpen is already a boolean.

♻️ Proposed fix
-                                aria-label={isMobileMenuOpen == true ? 'Close Menu' : 'Open Menu'}
+                                aria-label={isMobileMenuOpen ? 'Close Menu' : 'Open Menu'}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/header.tsx` at line 131, Remove the redundant "== true"
boolean comparison in the JSX expression for the mobile menu aria-label; change
aria-label={isMobileMenuOpen == true ? 'Close Menu' : 'Open Menu'} to
aria-label={isMobileMenuOpen ? 'Close Menu' : 'Open Menu'} so the component uses
the boolean isMobileMenuOpen directly (look for the isMobileMenuOpen prop/state
in the Header component JSX).
apps/web/components/ui/button.tsx (1)

33-43: Optional: drop forwardRef now that you're on React 19.

With react@19.2.4 ref is a regular prop, so forwardRef wrappers and a separate displayName assignment are no longer necessary for new components. The current code is still correct, just a bit legacy.

♻️ Idiomatic React 19 version
-const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(({ className, variant, size, asChild = false, ...props }, ref) => {
-    const Comp = asChild ? Slot : 'button'
-    return (
-        <Comp
-            className={cn(buttonVariants({ variant, size, className }))}
-            ref={ref}
-            {...props}
-        />
-    )
-})
-Button.displayName = 'Button'
+function Button({ className, variant, size, asChild = false, ref, ...props }: ButtonProps & { ref?: React.Ref<HTMLButtonElement> }) {
+    const Comp = asChild ? Slot : 'button'
+    return (
+        <Comp
+            className={cn(buttonVariants({ variant, size, className }))}
+            ref={ref}
+            {...props}
+        />
+    )
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/button.tsx` around lines 33 - 43, The component uses
React.forwardRef unnecessarily on React 19 where ref is a normal prop; change
the declaration of Button to a plain functional component that accepts ref from
ButtonProps (e.g., const Button = ({ className, variant, size, asChild = false,
ref, ...props }: ButtonProps) => { ... }) use Slot or 'button' as before, pass
ref into the rendered Comp and keep className={cn(buttonVariants({ variant,
size, className }))} and {...props}, and remove the forwardRef wrapper and the
separate Button.displayName assignment; keep existing symbols Slot, cn, and
buttonVariants unchanged.
apps/web/components/hero-section.tsx (1)

58-64: Consider self-hosting the hero backdrop.

Pulling the hero background from images.unsplash.com at runtime adds a third‑party origin on a critical LCP asset, couples the marketing page to an external service's availability, and has licensing/attribution implications for a product landing page. Consider downloading the asset into public/ (or @/assets) and referencing it locally so Next can optimize it and you control the lifetime.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/hero-section.tsx` around lines 58 - 64, The hero Image
currently loads from an external Unsplash URL which adds a third‑party LCP
dependency; replace this by adding the image file to the repo (e.g., public/ or
src/assets/) and update the Image usage in hero-section.tsx to reference the
local asset (either via a static path like "/images/hero.jpg" or an imported
module) so Next/Image can optimize it and you control caching/attribution;
locate the Image element in hero-section.tsx (the Image component with alt="hero
background", width={1920}, height={1080}) and change its src to the local file
and remove the external URL.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/components/header.tsx`:
- Line 100: The hook useMedia currently initializes matches to true causing
isLarge to be true during SSR/first paint and a flash of desktop UI; update
useMedia to initialize matches lazily by checking typeof window !== 'undefined'
and using window.matchMedia(query).matches (or initialize to undefined and only
set a boolean in useEffect) so that isLarge reflects the real client viewport on
first render; then adjust header.tsx rendering around isLarge (used by
NavMenu/hamburger) to account for undefined (e.g., render neither branch or a
placeholder) until the hook has mounted.

In `@apps/web/components/hero-section.tsx`:
- Around line 14-16: Remove the redundant role attribute from the <main> element
in the HeroSection component: locate the main element in
apps/web/components/hero-section.tsx (inside the HeroSection JSX) and delete the
explicit role="main" attribute so the element relies on its implicit landmark
role and satisfies jsx-a11y/no-redundant-roles.

In `@apps/web/components/logo-cloud.tsx`:
- Around line 138-198: The logo rotation indices are misaligned: useEffect
advances logoIndices for logoGroups in order [aiLogos, hostingLogos,
paymentsLogos, streamingLogos, otherLogos, toolsLogos] but the JSX passes
incorrect positions to LogoWrapper causing groups to use the wrong counters. Fix
by aligning the JSX to use the matching index for each group (ai →
logoIndices[0], hosting → logoIndices[1], payments → logoIndices[2], streaming →
logoIndices[3], other → logoIndices[4], tools → logoIndices[5]) or, better,
refactor state to a record keyed by group name (e.g., use a logoGroups map and a
logoIndexByGroup object updated inside the useEffect) and have each LogoWrapper
read its index by group key so the association cannot drift.

In `@apps/web/components/logo.tsx`:
- Around line 20-34: The linearGradient id "paint_logo" is duplicated between
Logo and LogoIcon causing non-unique DOM ids; change both components (Logo and
LogoIcon) to generate a unique id with React.useId(), replace the literal
id="paint_logo" with that generated id, and update any fill attributes that
reference the gradient (e.g., fill="url(`#paint_logo`)") to use the generated id
(e.g., fill={`url(#${uniqueId})`}) so each instance has its own gradient id.

In `@apps/web/components/ui/accordion.tsx`:
- Line 32: The Tailwind variants in the Accordion component are using incorrect
Radix attribute selectors (e.g., "data-open" / "data-closed") so the
styles/animations never match; update the className string where
className={cn("not-last:border-b data-open:bg-muted/50", className)} and any
other occurrences inside the Accordion component to use Tailwind attribute
selector syntax for Radix's data-state (e.g., replace data-open:bg-muted/50 with
data-[state=open]:bg-muted/50 and replace any data-open:animate-accordion-down /
data-closed:animate-accordion-up with data-[state=open]:animate-accordion-down
and data-[state=closed]:animate-accordion-up) so the selectors match the DOM
emitted by Radix.

In `@apps/web/components/ui/svgs/gemini.tsx`:
- Around line 243-292: GeminiFull uses non-unique ids (mask id="a" and
linearGradient id="b") which can collide with other SVGs; update the component
(GeminiFull) to namespace those ids (e.g., change "a" -> "gemini_full__mask" and
"b" -> "gemini_full__grad") or generate unique ids with React.useId(), and
update the matching references (mask="url(#...)" and linearGradient id and any
clipPath/url references) accordingly so the mask and gradient are scoped to
GeminiFull.

In `@apps/web/components/ui/svgs/open-ai.tsx`:
- Around line 26-38: The clipPath id "a" in the OpenAIFull SVG is too generic
and collides with other SVGs using the same id; update the OpenAIFull component
to generate and use a unique id for the clipPath (e.g., prefix the id with
"openai__" or use React.useId()) and change the corresponding reference from
clipPath="url(`#a`)" to the new unique id (ensure the <clipPath id="..."> and the
<g clipPath="url(#...)"> both use the same generated identifier).

In `@apps/web/components/ui/svgs/paypal.tsx`:
- Around line 5-6: Remove the Illustrator export artifacts id="Layer_1" and
data-name="Layer 1" from the SVG in the Paypal icon component
(apps/web/components/ui/svgs/paypal.tsx); locate the SVG element inside the
Paypal (or default exported) component and delete those two attributes so the
icon can be rendered multiple times without duplicate IDs or extraneous data
attributes.

In `@apps/web/components/ui/svgs/polars.tsx`:
- Around line 22-51: The two identical <radialGradient> defs with ids "a" and
"b" in the Polars component cause redundancy and global id collisions; fix by
consolidating the duplicate gradient into a single definition and make its id
unique per-component (e.g., prefix like "polars__a" or generate a stable unique
id with React's useId()) and update all references in this file to that new id
so fills/uses point to the renamed gradient; ensure any other occurrences (the
second gradient currently id="b") are removed or referenced to the single unique
id.

In `@apps/web/components/ui/svgs/supabase.tsx`:
- Around line 8-48: The SVG uses static gradient IDs ("paint0_linear",
"paint1_linear") causing DOM ID collisions; update the Supabase SVG component
(e.g., the Supabase function/component) to generate unique IDs per component
(use React.useId() or a component-unique prefix) and replace the gradient id
attributes (id="paint0_linear", id="paint1_linear") and all url(...) references
in fill attributes (e.g., fill="url(`#paint0_linear`)" and
fill="url(`#paint1_linear`)") to interpolate the generated unique id (e.g.,
`${id}-paint0_linear`) so each instance and other icons no longer collide.
Ensure both the <linearGradient id="..."> and every fill="url(#...)" are updated
to the same generated identifier.

In `@apps/web/hooks/use-media.ts`:
- Around line 5-19: The hook useMedia should accept an optional defaultValue
parameter and use it to initialize state instead of hardcoding true; update the
signature to useMedia(query: string, defaultValue?: boolean) and call
useState(Boolean(defaultValue)) so callers (e.g., header.tsx) can pass false to
avoid mobile-to-desktop flash, keep the existing window.matchMedia logic inside
useEffect (guarding for window.matchMedia existence) and preserve
addEventListener/removeEventListener on the MediaQueryList; ensure the
dependency array still includes [query, defaultValue] if you want the initial
value to update when defaultValue changes.

---

Outside diff comments:
In `@apps/web/package.json`:
- Around line 22-40: Remove the redundant individual Radix packages by deleting
the "@radix-ui/react-slot" and "@radix-ui/react-navigation-menu" entries from
package.json and switch any imports that reference those scoped packages to the
umbrella package "radix-ui" (e.g., replace imports of Slot and
NavigationMenuPrimitive from "@radix-ui/react-slot" and
"@radix-ui/react-navigation-menu" with imports from "radix-ui" to match how
Accordion is already imported); then run install to update lockfile and verify
all imports compile and tests/build succeed.

---

Nitpick comments:
In `@apps/web/components/header.tsx`:
- Line 131: Remove the redundant "== true" boolean comparison in the JSX
expression for the mobile menu aria-label; change aria-label={isMobileMenuOpen
== true ? 'Close Menu' : 'Open Menu'} to aria-label={isMobileMenuOpen ? 'Close
Menu' : 'Open Menu'} so the component uses the boolean isMobileMenuOpen directly
(look for the isMobileMenuOpen prop/state in the Header component JSX).

In `@apps/web/components/hero-section.tsx`:
- Around line 58-64: The hero Image currently loads from an external Unsplash
URL which adds a third‑party LCP dependency; replace this by adding the image
file to the repo (e.g., public/ or src/assets/) and update the Image usage in
hero-section.tsx to reference the local asset (either via a static path like
"/images/hero.jpg" or an imported module) so Next/Image can optimize it and you
control caching/attribution; locate the Image element in hero-section.tsx (the
Image component with alt="hero background", width={1920}, height={1080}) and
change its src to the local file and remove the external URL.

In `@apps/web/components/ui/button.tsx`:
- Around line 33-43: The component uses React.forwardRef unnecessarily on React
19 where ref is a normal prop; change the declaration of Button to a plain
functional component that accepts ref from ButtonProps (e.g., const Button = ({
className, variant, size, asChild = false, ref, ...props }: ButtonProps) => {
... }) use Slot or 'button' as before, pass ref into the rendered Comp and keep
className={cn(buttonVariants({ variant, size, className }))} and {...props}, and
remove the forwardRef wrapper and the separate Button.displayName assignment;
keep existing symbols Slot, cn, and buttonVariants unchanged.

In `@apps/web/components/ui/illustrations/product-illustration.tsx`:
- Around line 87-91: The JSX currently computes totals inline using
customers.reduce(...) for revenue and arr which is hard to read and re-runs on
every render; extract those calculations into a single precomputed constant
(e.g., const totalRevenue and const totalARR) outside or at the top of the
component so the JSX uses formatted totals instead of inline reduces, and if
possible convert the customers dataset to store numeric revenue/arr to avoid
parseFloat/replace at render time; reference the customers array and the inline
reduce expressions in product-illustration.tsx when making the change.

In `@apps/web/components/ui/svgs/vercel.tsx`:
- Around line 2-31: The compact Vercel SVG (Vercel) lacks accessibility
attributes; update the Vercel component's <svg> to include accessibility
metadata—either add role="img" and an aria-label like "Vercel logomark" for
parity with VercelFull, or if it is purely decorative set
aria-hidden="true"—ensure you modify the Vercel function's svg element (keeping
{...props} intact).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92d0f9a6-6e8f-4911-ba62-924cdfc9c93c

📥 Commits

Reviewing files that changed from the base of the PR and between ae1d8b0 and 164951d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (34)
  • apps/web/app/(main)/layout.tsx
  • apps/web/app/(marketing)/landing/page.tsx
  • apps/web/app/(marketing)/layout.tsx
  • apps/web/components.json
  • apps/web/components/header-docs.tsx
  • apps/web/components/header.tsx
  • apps/web/components/hero-section.tsx
  • apps/web/components/logo-cloud.tsx
  • apps/web/components/logo.tsx
  • apps/web/components/ui/accordion.tsx
  • apps/web/components/ui/button.tsx
  • apps/web/components/ui/illustrations/product-illustration.tsx
  • apps/web/components/ui/navigation-menu.tsx
  • apps/web/components/ui/svgs/beacon.tsx
  • apps/web/components/ui/svgs/bolt.tsx
  • apps/web/components/ui/svgs/cisco.tsx
  • apps/web/components/ui/svgs/cloudflare.tsx
  • apps/web/components/ui/svgs/gemini.tsx
  • apps/web/components/ui/svgs/hulu.tsx
  • apps/web/components/ui/svgs/leap-wallet.tsx
  • apps/web/components/ui/svgs/linear.tsx
  • apps/web/components/ui/svgs/open-ai.tsx
  • apps/web/components/ui/svgs/paypal.tsx
  • apps/web/components/ui/svgs/polars.tsx
  • apps/web/components/ui/svgs/prime.tsx
  • apps/web/components/ui/svgs/slack.tsx
  • apps/web/components/ui/svgs/spotify.tsx
  • apps/web/components/ui/svgs/stripe.tsx
  • apps/web/components/ui/svgs/supabase.tsx
  • apps/web/components/ui/svgs/twilio.tsx
  • apps/web/components/ui/svgs/vercel.tsx
  • apps/web/hooks/use-media.ts
  • apps/web/next.config.mjs
  • apps/web/package.json

export function Header() {
const [isMobileMenuOpen, setIsMobileMenuOpen] = React.useState(false)
const [isScrolled, setIsScrolled] = React.useState(false)
const isLarge = useMedia('(min-width: 64rem)')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

useMedia default of true causes a desktop→mobile flash on narrow viewports.

hooks/use-media.ts initializes matches to true, so SSR and the first client render always take the isLarge === true branch and render <NavMenu /> / hide the mobile hamburger. On a phone, the desktop layout briefly paints before the post-hydration useEffect switches isLarge to false, producing a layout flash.

Consider initializing from window.matchMedia(query).matches in a lazy initializer (guarded for SSR) or returning undefined until mounted and rendering neither branch until then.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/header.tsx` at line 100, The hook useMedia currently
initializes matches to true causing isLarge to be true during SSR/first paint
and a flash of desktop UI; update useMedia to initialize matches lazily by
checking typeof window !== 'undefined' and using
window.matchMedia(query).matches (or initialize to undefined and only set a
boolean in useEffect) so that isLarge reflects the real client viewport on first
render; then adjust header.tsx rendering around isLarge (used by
NavMenu/hamburger) to account for undefined (e.g., render neither branch or a
placeholder) until the hook has mounted.

Comment on lines +14 to +16
<main
role="main"
className="bg-background overflow-hidden">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Redundant role="main" on <main>.

The <main> element already has an implicit role="main"; passing it explicitly is flagged by jsx-a11y/no-redundant-roles and is unnecessary noise.

♻️ Proposed fix
-            <main
-                role="main"
-                className="bg-background overflow-hidden">
+            <main className="bg-background overflow-hidden">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<main
role="main"
className="bg-background overflow-hidden">
<main className="bg-background overflow-hidden">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/hero-section.tsx` around lines 14 - 16, Remove the
redundant role attribute from the <main> element in the HeroSection component:
locate the main element in apps/web/components/hero-section.tsx (inside the
HeroSection JSX) and delete the explicit role="main" attribute so the element
relies on its implicit landmark role and satisfies jsx-a11y/no-redundant-roles.

Comment on lines +138 to +198
useEffect(() => {
let wrapperIndex = 0
const interval = setInterval(() => {
setLogoIndices((prev) => {
const groupLogos = logoGroups[wrapperIndex]
if (!groupLogos) return prev
const newIndices = [...prev]
newIndices[wrapperIndex] = ((newIndices[wrapperIndex] ?? 0) + 1) % groupLogos.length
return newIndices
})
wrapperIndex = (wrapperIndex + 1) % logoGroups.length
}, 2000)

return () => clearInterval(interval)
}, [])

return (
<section className="bg-background">
<div className="relative mx-auto max-w-6xl px-6 py-16">
<div
aria-hidden
className="*:corner-bevel absolute inset-0 grid grid-cols-3 gap-px *:border-x *:via-transparent *:first:border-l-0 *:last:rounded-r-[2rem] *:last:border-r-0 md:grid-cols-6">
<div />
<div className="max-md:hidden" />
<div className="max-md:hidden" />
<div className="max-md:hidden" />
<div />
<div />
</div>
<div className="grid grid-cols-3 gap-y-6 md:grid-cols-6">
<LogoWrapper
logos={aiLogos}
group="ai"
logoIndex={logoIndices[1]}
/>
<LogoWrapper
logos={hostingLogos}
group="hosting"
logoIndex={logoIndices[3]}
/>
<LogoWrapper
logos={paymentsLogos}
group="payments"
logoIndex={logoIndices[0]}
/>
<LogoWrapper
logos={streamingLogos}
group="streaming"
logoIndex={logoIndices[4]}
/>
<LogoWrapper
logos={otherLogos}
group="other"
logoIndex={logoIndices[2]}
/>
<LogoWrapper
logos={toolsLogos}
group="tools"
logoIndex={logoIndices[5]}
/>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Logo rotation is wired to the wrong counters for 5 of 6 groups.

useEffect advances logoIndices[i] for logoGroups[i] where logoGroups = [aiLogos, hostingLogos, paymentsLogos, streamingLogos, otherLogos, toolsLogos], so the intended mapping is ai→0, hosting→1, payments→2, streaming→3, other→4, tools→5. The JSX instead reads:

  • ai ← logoIndices[1] (hosting's counter)
  • hosting ← logoIndices[3] (streaming's counter)
  • payments ← logoIndices[0] (ai's counter)
  • streaming ← logoIndices[4] (other's counter)
  • other ← logoIndices[2] (payments's counter)
  • tools ← logoIndices[5] ✓

Because each group has 3 logos but the counters tick asymmetrically, each wrapper will advance out of phase with its own array — and more importantly this is just incorrect bookkeeping rather than an intentional shuffle. Recommend keying the state by group name so the association can't drift:

🐛 Proposed fix (straight index correction)
                     <LogoWrapper
                         logos={aiLogos}
                         group="ai"
-                        logoIndex={logoIndices[1]}
+                        logoIndex={logoIndices[0]}
                     />
                     <LogoWrapper
                         logos={hostingLogos}
                         group="hosting"
-                        logoIndex={logoIndices[3]}
+                        logoIndex={logoIndices[1]}
                     />
                     <LogoWrapper
                         logos={paymentsLogos}
                         group="payments"
-                        logoIndex={logoIndices[0]}
+                        logoIndex={logoIndices[2]}
                     />
                     <LogoWrapper
                         logos={streamingLogos}
                         group="streaming"
-                        logoIndex={logoIndices[4]}
+                        logoIndex={logoIndices[3]}
                     />
                     <LogoWrapper
                         logos={otherLogos}
                         group="other"
-                        logoIndex={logoIndices[2]}
+                        logoIndex={logoIndices[4]}
                     />
                     <LogoWrapper
                         logos={toolsLogos}
                         group="tools"
                         logoIndex={logoIndices[5]}
                     />

Or, to avoid this happening again, keep state as a record keyed by group name and render from a single logoGroups data structure.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
useEffect(() => {
let wrapperIndex = 0
const interval = setInterval(() => {
setLogoIndices((prev) => {
const groupLogos = logoGroups[wrapperIndex]
if (!groupLogos) return prev
const newIndices = [...prev]
newIndices[wrapperIndex] = ((newIndices[wrapperIndex] ?? 0) + 1) % groupLogos.length
return newIndices
})
wrapperIndex = (wrapperIndex + 1) % logoGroups.length
}, 2000)
return () => clearInterval(interval)
}, [])
return (
<section className="bg-background">
<div className="relative mx-auto max-w-6xl px-6 py-16">
<div
aria-hidden
className="*:corner-bevel absolute inset-0 grid grid-cols-3 gap-px *:border-x *:via-transparent *:first:border-l-0 *:last:rounded-r-[2rem] *:last:border-r-0 md:grid-cols-6">
<div />
<div className="max-md:hidden" />
<div className="max-md:hidden" />
<div className="max-md:hidden" />
<div />
<div />
</div>
<div className="grid grid-cols-3 gap-y-6 md:grid-cols-6">
<LogoWrapper
logos={aiLogos}
group="ai"
logoIndex={logoIndices[1]}
/>
<LogoWrapper
logos={hostingLogos}
group="hosting"
logoIndex={logoIndices[3]}
/>
<LogoWrapper
logos={paymentsLogos}
group="payments"
logoIndex={logoIndices[0]}
/>
<LogoWrapper
logos={streamingLogos}
group="streaming"
logoIndex={logoIndices[4]}
/>
<LogoWrapper
logos={otherLogos}
group="other"
logoIndex={logoIndices[2]}
/>
<LogoWrapper
logos={toolsLogos}
group="tools"
logoIndex={logoIndices[5]}
/>
</div>
useEffect(() => {
let wrapperIndex = 0
const interval = setInterval(() => {
setLogoIndices((prev) => {
const groupLogos = logoGroups[wrapperIndex]
if (!groupLogos) return prev
const newIndices = [...prev]
newIndices[wrapperIndex] = ((newIndices[wrapperIndex] ?? 0) + 1) % groupLogos.length
return newIndices
})
wrapperIndex = (wrapperIndex + 1) % logoGroups.length
}, 2000)
return () => clearInterval(interval)
}, [])
return (
<section className="bg-background">
<div className="relative mx-auto max-w-6xl px-6 py-16">
<div
aria-hidden
className="*:corner-bevel absolute inset-0 grid grid-cols-3 gap-px *:border-x *:via-transparent *:first:border-l-0 *:last:rounded-r-[2rem] *:last:border-r-0 md:grid-cols-6">
<div />
<div className="max-md:hidden" />
<div className="max-md:hidden" />
<div className="max-md:hidden" />
<div />
<div />
</div>
<div className="grid grid-cols-3 gap-y-6 md:grid-cols-6">
<LogoWrapper
logos={aiLogos}
group="ai"
logoIndex={logoIndices[0]}
/>
<LogoWrapper
logos={hostingLogos}
group="hosting"
logoIndex={logoIndices[1]}
/>
<LogoWrapper
logos={paymentsLogos}
group="payments"
logoIndex={logoIndices[2]}
/>
<LogoWrapper
logos={streamingLogos}
group="streaming"
logoIndex={logoIndices[3]}
/>
<LogoWrapper
logos={otherLogos}
group="other"
logoIndex={logoIndices[4]}
/>
<LogoWrapper
logos={toolsLogos}
group="tools"
logoIndex={logoIndices[5]}
/>
</div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/logo-cloud.tsx` around lines 138 - 198, The logo rotation
indices are misaligned: useEffect advances logoIndices for logoGroups in order
[aiLogos, hostingLogos, paymentsLogos, streamingLogos, otherLogos, toolsLogos]
but the JSX passes incorrect positions to LogoWrapper causing groups to use the
wrong counters. Fix by aligning the JSX to use the matching index for each group
(ai → logoIndices[0], hosting → logoIndices[1], payments → logoIndices[2],
streaming → logoIndices[3], other → logoIndices[4], tools → logoIndices[5]) or,
better, refactor state to a record keyed by group name (e.g., use a logoGroups
map and a logoIndexByGroup object updated inside the useEffect) and have each
LogoWrapper read its index by group key so the association cannot drift.

Comment thread apps/web/components/logo.tsx Outdated
Comment on lines +20 to +34
<defs>
<linearGradient
id="paint_logo"
x1="90"
y1="0"
x2="90"
y2="220"
gradientUnits="userSpaceOnUse">
<stop stopColor="#9B99FE" />
<stop
offset="1"
stopColor="#2BC8B7"
/>
</linearGradient>
</defs>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, locate the file and check its size
find . -name "logo.tsx" -type f | head -20

Repository: Codehagen/Helpbase

Length of output: 92


🏁 Script executed:

# Read the file to verify both components and their gradient definitions
cat -n apps/web/components/logo.tsx

Repository: Codehagen/Helpbase

Length of output: 7093


🏁 Script executed:

# Search for imports/usage of Logo and LogoIcon components
rg "from.*logo|import.*Logo" --type tsx --type ts

Repository: Codehagen/Helpbase

Length of output: 89


🏁 Script executed:

# Search for page layouts that might use both components
rg "Logo|LogoIcon" --type tsx --max-count=30 | head -50

Repository: Codehagen/Helpbase

Length of output: 89


🏁 Script executed:

# Search for imports and usage of Logo and LogoIcon components
rg "Logo|LogoIcon" --max-count=50

Repository: Codehagen/Helpbase

Length of output: 8578


🏁 Script executed:

# Check which file types are available
rg --type-list | head -20

Repository: Codehagen/Helpbase

Length of output: 621


🏁 Script executed:

# Search for LogoIcon usage specifically
rg "LogoIcon" --max-count=20

Repository: Codehagen/Helpbase

Length of output: 189


🏁 Script executed:

# Check the header.tsx file to see how Logo is used
cat -n apps/web/components/header.tsx

Repository: Codehagen/Helpbase

Length of output: 13881


🏁 Script executed:

# Search more broadly for any potential LogoIcon usage across all file types
rg "LogoIcon" --max-count=30

Repository: Codehagen/Helpbase

Length of output: 189


🏁 Script executed:

# Check if there are any footer or mobile-specific layouts that might use LogoIcon
find . -type f -name "*footer*" -o -name "*mobile*" -o -name "*layout*" | grep -E "\.(tsx?|jsx?)$" | head -20

Repository: Codehagen/Helpbase

Length of output: 859


🏁 Script executed:

# Check footer.tsx to see if it uses LogoIcon
cat -n apps/web/components/footer.tsx

Repository: Codehagen/Helpbase

Length of output: 1441


🏁 Script executed:

# Check mobile-sidebar.tsx to see if it uses LogoIcon
cat -n apps/web/components/mobile-sidebar.tsx

Repository: Codehagen/Helpbase

Length of output: 3163


🏁 Script executed:

# Double-check: search for any other potential duplicate SVG ids in the codebase
rg 'id="paint' --max-count=20

Repository: Codehagen/Helpbase

Length of output: 343


🏁 Script executed:

# Check if there are any other SVG ids that might be duplicated in other components
rg 'id="[a-zA-Z_]' apps/web/components/ | grep -v "logo.tsx"

Repository: Codehagen/Helpbase

Length of output: 1175


Use React.useId() to avoid duplicate id="paint_logo" across Logo and LogoIcon.

Both components define <linearGradient id="paint_logo">. Rendering both on the same page—or multiple instances of either—produces duplicate DOM ids; fill="url(#paint_logo)" resolves to the first match. Visually harmless today since gradients are identical, but violates HTML id-uniqueness standards and is fragile if gradients diverge or usage patterns change.

♻️ Suggested fix using React.useId()
-import { cn } from '@workspace/ui/lib/utils'
+import { useId } from 'react'
+import { cn } from '@workspace/ui/lib/utils'

 export const Logo = ({ className, uniColor }: { className?: string; uniColor?: boolean }) => {
+    const gradientId = useId()
     return (
         <svg ...>
             <path
                 ...
-                fill={uniColor ? 'currentColor' : 'url(`#paint_logo`)'}
+                fill={uniColor ? 'currentColor' : `url(#${gradientId})`}
             />
             ...
             <defs>
                 <linearGradient
-                    id="paint_logo"
+                    id={gradientId}
                     ...

Apply the same change to LogoIcon.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/logo.tsx` around lines 20 - 34, The linearGradient id
"paint_logo" is duplicated between Logo and LogoIcon causing non-unique DOM ids;
change both components (Logo and LogoIcon) to generate a unique id with
React.useId(), replace the literal id="paint_logo" with that generated id, and
update any fill attributes that reference the gradient (e.g.,
fill="url(`#paint_logo`)") to use the generated id (e.g.,
fill={`url(#${uniqueId})`}) so each instance has its own gradient id.

return (
<AccordionPrimitive.Item
data-slot="accordion-item"
className={cn("not-last:border-b data-open:bg-muted/50", className)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Look for custom variant definitions for data-open / data-closed
rg -nP '@custom-variant\s+data-(open|closed)\b' -C2
rg -nP 'data-\[state=(open|closed)\]' --type=ts --type=tsx --type=css -C1 | head -n 60
# Confirm no stray usages elsewhere expect differently
rg -nP '\bdata-(open|closed):' --type=ts --type=tsx -C1 | head -n 40

Repository: Codehagen/Helpbase

Length of output: 117


🏁 Script executed:

#!/bin/bash
# Re-run searches with correct rg syntax
echo "=== Searching for custom-variant definitions ==="
rg '@custom-variant\s+data-(open|closed)' -i

echo "=== Searching for data-[state=...] patterns ==="
rg 'data-\[state=' -i | head -n 30

echo "=== Searching for data-open: or data-closed: class usage ==="
rg '\bdata-(open|closed):' -i | head -n 30

echo "=== Looking for tailwind config files ==="
fd -e 'tailwind.config' -e 'tailwind.config.ts' -e 'tailwind.config.js'

Repository: Codehagen/Helpbase

Length of output: 5008


🏁 Script executed:

#!/bin/bash
# Check accordion.tsx file directly
echo "=== Content of accordion.tsx around lines 32 and 69 ==="
if [ -f apps/web/components/ui/accordion.tsx ]; then
  cat -n apps/web/components/ui/accordion.tsx | sed -n '25,40p'
  echo ""
  echo "--- Line 69 area ---"
  cat -n apps/web/components/ui/accordion.tsx | sed -n '62,76p'
else
  echo "File not found, searching for accordion files..."
  fd 'accordion' --type f
fi

Repository: Codehagen/Helpbase

Length of output: 1231


🏁 Script executed:

#!/bin/bash
# Inspect tailwind config for variant definitions
echo "=== Checking tailwind config ==="
for config in tailwind.config.ts tailwind.config.js; do
  if [ -f "$config" ]; then
    echo "Found: $config"
    cat -n "$config"
  fi
done

Repository: Codehagen/Helpbase

Length of output: 94


🏁 Script executed:

#!/bin/bash
# Search for animation definitions
echo "=== Searching for animation definitions ==="
rg 'animate-accordion-(down|up)' -i

echo "=== Searching for tailwind config in common locations ==="
find . -name 'tailwind*' -o -name '*theme*' -o -name 'config*' 2>/dev/null | grep -E '\.(ts|js|json|css)$' | head -20

echo "=== Searching for CSS files with custom variants ==="
fd -e css | head -20

Repository: Codehagen/Helpbase

Length of output: 639


🏁 Script executed:

#!/bin/bash
# Check for Tailwind theme/plugin extensions in package.json or tsconfig
echo "=== Checking package.json for tailwind plugins ==="
if [ -f package.json ]; then
  cat package.json | head -50
fi

echo ""
echo "=== Looking for globals.css or main CSS files ==="
fd 'globals\.(css|ts|js)' -o 'main\.(css|ts|js)' -o 'styles\.(css|ts|js)'

Repository: Codehagen/Helpbase

Length of output: 1575


🏁 Script executed:

#!/bin/bash
# Search in apps/web directory for config
echo "=== Files in apps/web root and config ==="
ls -la apps/web/ | grep -E '\.(ts|js|json|css)$'

echo ""
echo "=== Check for tailwind config specifically ==="
find apps/web -maxdepth 2 -name '*tailwind*' -o -name '*config*' 2>/dev/null | head -20

Repository: Codehagen/Helpbase

Length of output: 754


🏁 Script executed:

#!/bin/bash
# Read postcss config
echo "=== apps/web/postcss.config.mjs ==="
cat apps/web/postcss.config.mjs

echo ""
echo "=== packages/ui/src/styles/globals.css ==="
cat packages/ui/src/styles/globals.css

echo ""
echo "=== packages/create-helpbase/templates/app/globals.css ==="
cat packages/create-helpbase/templates/app/globals.css

Repository: Codehagen/Helpbase

Length of output: 24095


🏁 Script executed:

#!/bin/bash
# Search for all animation and variant definitions
rg '@layer\s+(components|utilities)' -A 10 | head -100
rg 'keyframes' -i | head -50

Repository: Codehagen/Helpbase

Length of output: 6616


🏁 Script executed:

#!/bin/bash
# Check apps/web package.json specifically
echo "=== apps/web/package.json ==="
cat apps/web/package.json

Repository: Codehagen/Helpbase

Length of output: 2354


🏁 Script executed:

#!/bin/bash
# Search for tw-animate-css
echo "=== Searching for tw-animate-css in package.json files ==="
rg 'tw-animate-css' -i

echo ""
echo "=== Check packages/ui/src directory structure ==="
ls -la packages/ui/src/ 2>/dev/null | head -20

Repository: Codehagen/Helpbase

Length of output: 1066


🏁 Script executed:

#!/bin/bash
# Check if tw-animate-css is a monorepo package or external
echo "=== Find all CSS imports and their sources ==="
find . -name 'tw-animate-css*' -o -name '*animate*' 2>/dev/null | grep -v node_modules | head -20

echo ""
echo "=== Check packages/ui directory ==="
ls -la packages/ui/ 2>/dev/null

Repository: Codehagen/Helpbase

Length of output: 702


🏁 Script executed:

#!/bin/bash
# Look for where data-open variant might be defined
echo "=== Search in packages/ui for variant definitions ==="
rg '@custom-variant|@layer|data-open|data-closed|animate-accordion' packages/ui/ -i

Repository: Codehagen/Helpbase

Length of output: 912


🌐 Web query:

tw-animate-css npm package v1.4.0 data-open data-closed variants

💡 Result:

tw-animate-css v1.4.0 is a Tailwind CSS v4.0-compatible CSS package providing animation utilities as a drop-in replacement for tailwindcss-animate. It uses a pure CSS approach with @import "tw-animate-css"; in your CSS file. Key features include enter/exit animations using base classes like animate-in/animate-out combined with transforms (fade-in, slide-in-from-top-8, zoom-in, etc.), parameters (duration-300, delay-150, ease-in), and ready-to-use animations like accordion-down, accordion-up, collapsible-down, caret-blink. For data-open/data-closed variants (common in Radix UI, shadcn/ui, Bits UI for accordions/collapsibles/dialogs), apply animations conditionally via Tailwind's data attribute selectors: data-[open]:animate-in data-[open]:fade-in data-[open]:slide-in-from-top-2 data-[open]:duration-300 data-[closed]:animate-out data-[closed]:fade-out data-[closed]:slide-out-to-top-2 data-[closed]:duration-300 Example for accordion/collapsible content:

Content
Or using state=open/closed:
Content
The package supports Radix/Bits/Reka UI variables like --radix-accordion-content-height for height animations. It's compatible with shadcn/ui patterns, keywords include shadcn, radix. Tree-shaking removes unused animations. v1.4.0 released Sep 24, 2025.

Citations:


🏁 Script executed:

#!/bin/bash
# Check if tw-animate-css provides the needed animations
echo "=== Check what tw-animate-css exports ==="
if [ -d "node_modules/tw-animate-css" ]; then
  echo "tw-animate-css found in node_modules"
  ls -la node_modules/tw-animate-css/
  if [ -f "node_modules/tw-animate-css/package.json" ]; then
    cat node_modules/tw-animate-css/package.json | head -30
  fi
  if [ -f "node_modules/tw-animate-css/index.css" ]; then
    echo "=== index.css content ==="
    cat node_modules/tw-animate-css/index.css | head -100
  fi
else
  echo "tw-animate-css not in node_modules (expected in sandbox)"
  # Look for it in pnpm-lock.yaml or documentation
  echo ""
  echo "=== Checking pnpm-lock.yaml for tw-animate-css details ==="
  rg -A 20 'tw-animate-css@1.4.0:' pnpm-lock.yaml
fi

Repository: Codehagen/Helpbase

Length of output: 1555


🏁 Script executed:

#!/bin/bash
# Verify where AccordionPrimitive comes from and what it emits
echo "=== Checking radix-ui meta-package for accordion ==="
if grep -q '"radix-ui"' packages/ui/package.json; then
  echo "✓ radix-ui v1.4.3 found in packages/ui/package.json"
  echo ""
  echo "Radix-ui meta-package (v1.4.3) exports accordion components"
  echo "Accordion emits: data-state='open'|'closed' attributes on DOM elements"
fi

echo ""
echo "=== Verify accordion.tsx import statement ==="
head -20 apps/web/components/ui/accordion.tsx

Repository: Codehagen/Helpbase

Length of output: 854


Use data-[state=open] and data-[state=closed] attribute selectors, not bare data-open / data-closed variants.

Radix UI emits data-state="open" and data-state="closed" attributes, not bare data-open / data-closed. The current selectors (data-open:bg-muted/50, data-open:animate-accordion-down, data-closed:animate-accordion-up) won't match the DOM and animations will silently fail. Use Tailwind v4's attribute selector syntax: data-[state=open]:bg-muted/50, data-[state=open]:animate-accordion-down, data-[state=closed]:animate-accordion-up. See apps/web/components/ui/navigation-menu.tsx for the correct pattern already in use elsewhere.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/accordion.tsx` at line 32, The Tailwind variants in
the Accordion component are using incorrect Radix attribute selectors (e.g.,
"data-open" / "data-closed") so the styles/animations never match; update the
className string where className={cn("not-last:border-b data-open:bg-muted/50",
className)} and any other occurrences inside the Accordion component to use
Tailwind attribute selector syntax for Radix's data-state (e.g., replace
data-open:bg-muted/50 with data-[state=open]:bg-muted/50 and replace any
data-open:animate-accordion-down / data-closed:animate-accordion-up with
data-[state=open]:animate-accordion-down and
data-[state=closed]:animate-accordion-up) so the selectors match the DOM emitted
by Radix.

Comment on lines +26 to +38
<g
fill="currentColor"
clipPath="url(#a)">
<path d="M367.44 153.84c0 52.32 33.6 88.8 80.16 88.8 46.56 0 80.16-36.48 80.16-88.8s-33.6-88.8-80.16-88.8c-46.56 0-80.16 36.48-80.16 88.8Zm129.6 0c0 37.44-20.4 61.68-49.44 61.68s-49.44-24.24-49.44-61.68 20.4-61.68 49.44-61.68 49.44 24.24 49.44 61.68ZM614.27 242.64c35.28 0 55.44-29.76 55.44-65.52 0-35.76-20.16-65.52-55.44-65.52-16.32 0-28.32 6.48-36.24 15.84V114h-28.8v169.2h28.8v-56.4c7.92 9.36 19.92 15.84 36.24 15.84Zm-36.96-69.12c0-23.76 13.44-36.72 31.2-36.72 20.88 0 32.16 16.32 32.16 40.32s-11.28 40.32-32.16 40.32c-17.76 0-31.2-13.2-31.2-36.48v-7.44ZM747.65 242.64c25.2 0 45.12-13.2 54-35.28L776.93 198c-3.84 12.96-15.12 20.16-29.28 20.16-18.48 0-31.44-13.2-33.6-34.8h88.32v-9.6c0-34.56-19.44-62.16-55.92-62.16-36.48 0-60 28.56-60 65.52 0 38.88 25.2 65.52 61.2 65.52Zm-1.44-106.8c18.24 0 26.88 12 27.12 25.92h-57.84c4.32-17.04 15.84-25.92 30.72-25.92ZM823.98 240h28.8v-73.92c0-18 13.2-27.6 26.16-27.6 15.84 0 22.08 11.28 22.08 26.88V240h28.8v-83.04c0-27.12-15.84-45.36-42.24-45.36-16.32 0-27.6 7.44-34.8 15.84V114h-28.8v126ZM1014.17 67.68 948.89 240h30.48l14.64-39.36h74.4l14.88 39.36h30.96l-65.28-172.32h-34.8Zm16.8 34.08 27.36 72h-54.24l26.88-72ZM1163.69 68.18h-30.72V240.5h30.72V68.18ZM297.06 130.97a79.712 79.712 0 0 0-6.85-65.48c-17.46-30.4-52.56-46.04-86.84-38.68A79.747 79.747 0 0 0 143.24 0C108.2-.08 77.11 22.48 66.33 55.82a79.754 79.754 0 0 0-53.31 38.67c-17.59 30.32-13.58 68.54 9.92 94.54a79.712 79.712 0 0 0 6.85 65.48c17.46 30.4 52.56 46.04 86.84 38.68a79.687 79.687 0 0 0 60.13 26.8c35.06.09 66.16-22.49 76.94-55.86a79.754 79.754 0 0 0 53.31-38.67c17.57-30.32 13.55-68.51-9.94-94.51l-.01.02ZM176.78 299.08a59.77 59.77 0 0 1-38.39-13.88c.49-.26 1.34-.73 1.89-1.07l63.72-36.8a10.36 10.36 0 0 0 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97ZM47.94 244.05a59.71 59.71 0 0 1-7.15-40.18c.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83L129.87 266c-28.69 16.52-65.33 6.7-81.92-21.95h-.01ZM31.17 104.96c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91L118.44 224c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89l.01-.01Zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94a59.94 59.94 0 0 1-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06h-.01Zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8a10.375 10.375 0 0 0-10.47 0l-77.79 44.92V92c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22a59.95 59.95 0 0 1 7.15 40.1h.02Zm-168.51 55.43-26.94-15.55a.943.943 0 0 1-.52-.74V80.86c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07L116 72.67a10.344 10.344 0 0 0-5.24 9.06l-.04 89.79v.02ZM125.35 140 160 119.99l34.65 20V180L160 200l-34.65-20v-40Z" />
</g>
<defs>
<clipPath id="a">
<path
fill="currentColor"
d="M0 0h1180v320H0z"
/>
</clipPath>
</defs>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

clipPath id="a" is too generic — risk of collision.

OpenAIFull renders a <clipPath id="a"> and references it via clipPath="url(#a)". Other SVG components in this PR (GeminiFull, Polars) also use id="a". When multiple of these render on the same page, the first-defined id wins and later SVGs may be clipped/masked incorrectly.

Prefix with a component-unique name (e.g., openai__a) or use React.useId().

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/svgs/open-ai.tsx` around lines 26 - 38, The clipPath
id "a" in the OpenAIFull SVG is too generic and collides with other SVGs using
the same id; update the OpenAIFull component to generate and use a unique id for
the clipPath (e.g., prefix the id with "openai__" or use React.useId()) and
change the corresponding reference from clipPath="url(`#a`)" to the new unique id
(ensure the <clipPath id="..."> and the <g clipPath="url(#...)"> both use the
same generated identifier).

Comment on lines +5 to +6
id="Layer_1"
data-name="Layer 1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Drop the hardcoded id/data-name attributes.

id="Layer_1" is an Illustrator export artifact. If this icon is rendered more than once on the page, the DOM will contain duplicate IDs (HTML validity violation, potential a11y/test-tool confusion). Nothing here references the id, so it's safe to remove.

Proposed fix
     <svg
-        id="Layer_1"
-        data-name="Layer 1"
         xmlns="http://www.w3.org/2000/svg"
         viewBox="0 0 404.65 98.18"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
id="Layer_1"
data-name="Layer 1"
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 404.65 98.18"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/svgs/paypal.tsx` around lines 5 - 6, Remove the
Illustrator export artifacts id="Layer_1" and data-name="Layer 1" from the SVG
in the Paypal icon component (apps/web/components/ui/svgs/paypal.tsx); locate
the SVG element inside the Paypal (or default exported) component and delete
those two attributes so the icon can be rendered multiple times without
duplicate IDs or extraneous data attributes.

Comment on lines +22 to +51
<defs>
<radialGradient
id="a"
cx={0}
cy={0}
r={1}
gradientTransform="matrix(-167.63677 71.00916 -144.91826 -342.11967 154.712 20.46)"
gradientUnits="userSpaceOnUse">
<stop stopColor="#0075FF" />
<stop
offset={1}
stopColor="#0075FF"
stopOpacity={0}
/>
</radialGradient>
<radialGradient
id="b"
cx={0}
cy={0}
r={1}
gradientTransform="matrix(-167.63677 71.00916 -144.91826 -342.11967 154.712 20.46)"
gradientUnits="userSpaceOnUse">
<stop stopColor="#0075FF" />
<stop
offset={1}
stopColor="#0075FF"
stopOpacity={0}
/>
</radialGradient>
</defs>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Generic id="a"/id="b" risk collisions; gradients are duplicates.

Both <radialGradient> elements are identical (same gradientTransform, stops, opacity), so one is redundant. More importantly, the generic ids a/b collide with other SVGs that use the same ids on the same page (e.g., OpenAIFull uses clipPath id="a", GeminiFull uses mask id="a"/linearGradient id="b"). Since SVG/HTML ids are document-scoped, the first definition wins and fills may render incorrectly when these components co-exist.

Recommend prefixing (e.g., polars__a) or generating per-instance ids via React's useId().

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/svgs/polars.tsx` around lines 22 - 51, The two
identical <radialGradient> defs with ids "a" and "b" in the Polars component
cause redundancy and global id collisions; fix by consolidating the duplicate
gradient into a single definition and make its id unique per-component (e.g.,
prefix like "polars__a" or generate a stable unique id with React's useId()) and
update all references in this file to that new id so fills/uses point to the
renamed gradient; ensure any other occurrences (the second gradient currently
id="b") are removed or referenced to the single unique id.

Comment on lines +8 to +48
<path
d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z"
fill="url(#paint0_linear)"
/>
<path
d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z"
fill="url(#paint1_linear)"
fillOpacity="0.2"
/>
<path
d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z"
fill="#3ECF8E"
/>
<defs>
<linearGradient
id="paint0_linear"
x1="53.9738"
y1="54.974"
x2="94.1635"
y2="71.8295"
gradientUnits="userSpaceOnUse">
<stop stopColor="#249361" />
<stop
offset="1"
stopColor="#3ECF8E"
/>
</linearGradient>
<linearGradient
id="paint1_linear"
x1="36.1558"
y1="30.578"
x2="54.4844"
y2="65.0806"
gradientUnits="userSpaceOnUse">
<stop />
<stop
offset="1"
stopOpacity="0"
/>
</linearGradient>
</defs>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Gradient IDs will collide across instances and with other Figma-exported SVGs.

paint0_linear and paint1_linear are the default IDs Figma emits for every SVG export. Two concrete problems:

  1. Rendering <Supabase /> more than once on a page produces duplicate DOM IDs, and all instances resolve url(#paint0_linear) to the first occurrence.
  2. Any other icon exported from Figma that also uses paint0_linear / paint1_linear will collide with this one, and whichever <defs> is mounted first wins — leading to subtle fill swaps that are hard to debug.

Either prefix the IDs with a component-unique namespace, or generate a per-instance ID with React.useId() and interpolate it into the id and url(#...) references.

Proposed fix using useId
-import type { SVGProps } from 'react'
+import { useId, type SVGProps } from 'react'

-const Supabase = (props: SVGProps<SVGSVGElement>) => (
+const Supabase = (props: SVGProps<SVGSVGElement>) => {
+    const uid = useId()
+    const g0 = `supabase-${uid}-0`
+    const g1 = `supabase-${uid}-1`
+    return (
     <svg {...props} viewBox="0 0 109 113" fill="none">
         <path
             d="..."
-            fill="url(`#paint0_linear`)"
+            fill={`url(#${g0})`}
         />
         <path
             d="..."
-            fill="url(`#paint1_linear`)"
+            fill={`url(#${g1})`}
             fillOpacity="0.2"
         />
         ...
         <defs>
-            <linearGradient id="paint0_linear" ...>
+            <linearGradient id={g0} ...>
             ...
-            <linearGradient id="paint1_linear" ...>
+            <linearGradient id={g1} ...>
             ...
         </defs>
     </svg>
+    )
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/components/ui/svgs/supabase.tsx` around lines 8 - 48, The SVG uses
static gradient IDs ("paint0_linear", "paint1_linear") causing DOM ID
collisions; update the Supabase SVG component (e.g., the Supabase
function/component) to generate unique IDs per component (use React.useId() or a
component-unique prefix) and replace the gradient id attributes
(id="paint0_linear", id="paint1_linear") and all url(...) references in fill
attributes (e.g., fill="url(`#paint0_linear`)" and fill="url(`#paint1_linear`)") to
interpolate the generated unique id (e.g., `${id}-paint0_linear`) so each
instance and other icons no longer collide. Ensure both the <linearGradient
id="..."> and every fill="url(#...)" are updated to the same generated
identifier.

Comment on lines +5 to +19
export function useMedia(query: string): boolean {
const [matches, setMatches] = useState(true)

useEffect(() => {
const matchMedia = window.matchMedia(query)
setMatches(matchMedia.matches)

const handleChange = () => setMatches(matchMedia.matches)

matchMedia.addEventListener("change", handleChange)

return () => {
matchMedia.removeEventListener("change", handleChange)
}
}, [query])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Confirm current responsive hook call sites and whether any need a custom defaultValue.
rg -n -C4 --type ts --type tsx '\buseMedia\s*\('

Repository: Codehagen/Helpbase

Length of output: 89


🏁 Script executed:

# Find all useMedia hook usages with corrected syntax
rg -n -C4 'useMedia\s*\('

Repository: Codehagen/Helpbase

Length of output: 1181


🏁 Script executed:

# Verify the hook file exists and its full contents
cat apps/web/hooks/use-media.ts

Repository: Codehagen/Helpbase

Length of output: 563


🏁 Script executed:

# Check the header component to see how useMedia is actually used
find . -name 'header.tsx' -o -name 'header.ts' | head -5

Repository: Codehagen/Helpbase

Length of output: 195


🏁 Script executed:

# Check the context of how isLarge is used in the header component
sed -n '100,130p' apps/web/components/header.tsx

Repository: Codehagen/Helpbase

Length of output: 1547


Add optional defaultValue parameter to avoid mobile layout flash.

The useState(true) initialization causes the desktop navigation menu to briefly render on mobile before the useEffect corrects the state. For the '(min-width: 64rem)' query in header.tsx line 100, mobile viewports will show the full header height and NavMenu on first paint, then flash to mobile layout after hydration.

Proposed fix: add an optional defaultValue parameter so callers can specify the expected initial state:

Suggested implementation
-export function useMedia(query: string): boolean {
-  const [matches, setMatches] = useState(true)
+export function useMedia(query: string, defaultValue = false): boolean {
+  const [matches, setMatches] = useState(defaultValue)

The header component is the only current caller; it can use the default false for correct mobile-first behavior, or explicitly pass true if desktop-first rendering is intended.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function useMedia(query: string): boolean {
const [matches, setMatches] = useState(true)
useEffect(() => {
const matchMedia = window.matchMedia(query)
setMatches(matchMedia.matches)
const handleChange = () => setMatches(matchMedia.matches)
matchMedia.addEventListener("change", handleChange)
return () => {
matchMedia.removeEventListener("change", handleChange)
}
}, [query])
export function useMedia(query: string, defaultValue = false): boolean {
const [matches, setMatches] = useState(defaultValue)
useEffect(() => {
const matchMedia = window.matchMedia(query)
setMatches(matchMedia.matches)
const handleChange = () => setMatches(matchMedia.matches)
matchMedia.addEventListener("change", handleChange)
return () => {
matchMedia.removeEventListener("change", handleChange)
}
}, [query])
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/hooks/use-media.ts` around lines 5 - 19, The hook useMedia should
accept an optional defaultValue parameter and use it to initialize state instead
of hardcoding true; update the signature to useMedia(query: string,
defaultValue?: boolean) and call useState(Boolean(defaultValue)) so callers
(e.g., header.tsx) can pass false to avoid mobile-to-desktop flash, keep the
existing window.matchMedia logic inside useEffect (guarding for
window.matchMedia existence) and preserve addEventListener/removeEventListener
on the MediaQueryList; ensure the dependency array still includes [query,
defaultValue] if you want the initial value to update when defaultValue changes.

Routing change to make helpbase.dev a marketing-first site:
- helpbase.dev/ now serves the marketing landing (was /landing)
- helpbase.dev/docs now serves the docs index (was /)
- Article routes /{category}, /{category}/{slug} unchanged
- Tenant subdomains unchanged (independent (tenant) route group)

File moves:
- (marketing)/landing/page.tsx → (marketing)/page.tsx
- (main)/page.tsx → (main)/docs/page.tsx

Outbound `/` link updates (4) — all in docs context, all repointed to
/docs:
- components/header-docs.tsx (logo)
- components/footer.tsx (helpbase link)
- (main)/(docs)/[category]/page.tsx (breadcrumb, also "Home" → "Docs")
- (main)/(docs)/[category]/[slug]/page.tsx (breadcrumb, same)

`/landing` 301-redirects to `/` via next.config.mjs so the previous
preview URL and any external refs from this PR cycle still resolve.

Tenant subdomain `Link href="/"` references kept as-is — those resolve
to the tenant root under that subdomain, not the apex.

Verified by `next build` — all 4 critical routes resolve:
  ○ /                  marketing
  ○ /docs              docs index
  ● /[category]        article category (SSG)
  ● /[category]/[slug] article (SSG)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Codehagen Codehagen changed the title feat(web): isolated marketing route group + /landing page feat(web): marketing-first routing — / is marketing, docs at /docs Apr 19, 2026
Two polish fixes after dogfooding the marketing landing locally:

1. Default theme is now `light` (was `system`). enableSystem disabled
   so dark-system users land on the light treatment first. The 'd'
   keyboard shortcut still toggles to dark — power users keep their
   override.

2. Marketing header logo is "helpbase" in typography (text-lg
   font-semibold tracking-tight), matching the docs header style.
   Replaces the placeholder triangle SVG that shipped with the hero
   block. Deletes the unused logo.tsx.

Verified locally on http://localhost:3000:
- / renders marketing hero with light theme + helpbase typography logo
- /docs renders docs index unchanged
- /getting-started/introduction renders article with "Docs" breadcrumb

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Console emitted 6 'Expected length, "auto"' errors on / from the
logo-cloud component. SVG width must be a length value or omitted —
'auto' is invalid. Removed the attribute (18 occurrences); SVGs with
viewBox keep their aspect ratio when only height is set.

Found by /qa on 2026-04-19.
Report: .gstack/qa-reports/qa-report-localhost-2026-04-19.md
Next.js LCP warning on / asked for loading=eager on the hero
backdrop. Added priority (sets eager + preload) and turned the
image into a decorative element (empty alt + aria-hidden) since
it's a background, not content.

Found by /qa on 2026-04-19.
Report: .gstack/qa-reports/qa-report-localhost-2026-04-19.md
Codehagen and others added 2 commits April 19, 2026 19:37
…apex

CI sync-drift gate failed because marketing artifacts from PR #19 were
flowing into create-helpbase templates and the shadcn registry. Scaffolded
user projects don't ship a marketing surface, and registry consumers
bring their own landing — the marketing route group + Tailark hero block
are helpbase.dev-only.

scripts/sync-templates.mjs:
- Add to HOSTED_TIER_EXCLUDES: app/(marketing)/, components/header.tsx
  (the marketing header), hero-section.tsx, logo-cloud.tsx, the Tailark
  ui primitives (accordion, button, navigation-menu), illustrations/,
  svgs/, hooks/use-media.ts.
- New PATH_REMAPS table:
    "app/(main)/docs/page.tsx" → "app/(main)/page.tsx"
  so the scaffold's apex / serves the docs index (apps/web has it at
  /docs because apex is marketing).
- New TEMPLATES_CONTENT_TRANSFORMS / REGISTRY_CONTENT_TRANSFORMS:
    - Rename HeaderDocs → Header in components/header.tsx (formerly
      apps/web's components/header-docs.tsx via PATH_REMAPS), and
      update its sole importer (main)/layout.tsx to match. Keeps the
      scaffold/registry API stable: downstream still writes
      `<Header />` from `@/components/header`.
    - Rewrite href="/docs" → href="/" and >Docs< → >Home< in scaffold
      breadcrumbs + footer (since the scaffold's docs root is /, not
      /docs). Avoids a runtime 308 hop on every breadcrumb click.
- generateTemplatesNextConfig: add a `/docs → /` 308 redirect as a
  safety net for any links the content transforms might have missed.

Result: templates and registry are now strictly docs-only. Marketing
surface stays in apps/web. 0 marketing leaks verified by grep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
/review surfaced a P1: the global /landing → / redirect ran BEFORE
proxy.ts middleware, so tenant.helpbase.dev/landing was 308'd to
tenant.helpbase.dev/ before proxy could rewrite to /t/{tenant}/landing.
A tenant publishing an article at slug `landing` would have it silently
unreachable.

Scope to specific apex/preview hosts via per-entry `has` matchers:
- helpbase.dev (apex)
- www.helpbase.dev
- helpbase-{branch}.vercel.app (shared previews — pattern excludes
  *---*.vercel.app which is the tenant preview convention)

Verified locally with curl Host headers (8 cases):
  helpbase.dev               → 308 → /
  www.helpbase.dev           → 308 → /
  acme.helpbase.dev          → 404 (tenant safe — was 308 before)
  helpbase-foo.vercel.app    → 308 → /
  acme---foo.vercel.app      → 404 (tenant preview safe — was 308)
  acme.localhost:3000        → 404 (dev tenant safe)
  evil.com                   → 404
  localhost:3000             → 404 (dev only, not externally shared)

Per-entry pattern instead of one regex with alternation: path-to-regexp
treats `:` as a parameter delimiter, which broke `localhost(?<port>:\d+)?`
in practice. One redirect per host is unambiguous.

Middleware-subdomain test still 12/12 — proxy.ts logic untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/sync-templates.mjs (1)

444-462: ⚠️ Potential issue | 🟡 Minor

Redirect scope overlaps with content-rewritten links — confirm this is the intended safety net.

The two permanent: true (308) redirects here cover any residual /docs[/...] URL in scaffolded projects, but the content transforms above already rewrite breadcrumb/footer/header links from /docs to / in the synced sources, so under normal navigation these redirects should never fire. That's fine as defense-in-depth, but one thing worth checking:

{ source: "/docs/:path*", destination: "/:path*" } will 308 /docs/getting-started → /getting-started, which assumes category slugs in scaffolded projects never collide with reserved app routes (e.g. a user category named api would conflict with any future app/api/*). Given the PR summary explicitly lists "reserved-slug list" as out of scope, this is worth a line in the comment here so a future contributor adding routes to the scaffold doesn't get a silent 308 shadowing them.

Note: Both the apex and scaffold configs use permanent: true, which emits HTTP 308; the comment on line 18 in the apex config incorrectly states "301" and should be corrected for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/sync-templates.mjs` around lines 444 - 462, Update the comment in
generateTemplatesNextConfig to explicitly call out that these permanent
redirects (in generateTemplatesNextConfig) are a defense-in-depth for rewritten
`/docs` links and warn that the catch‑all redirect `{ source: "/docs/:path*",
destination: "/:path*" }` can silently shadow scaffolded routes if a category
slug collides with reserved app routes (mention “reserved-slug” risk), and also
correct the mismatched comment in the apex config that currently says “301” to
state the actual emitted status code “308” for consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/public/r/help-center.json`:
- Line 31: The breadcrumb Link uses href="/docs" but the registry does not ship
a /docs page; either create a /docs route or update all references to point to
the root. Fix by changing Link href="/docs" to href="/" in the CategoryPage
component (the Link in function CategoryPage) and the corresponding Link in the
sibling app/(docs)/[category]/[slug]/page.tsx, and also update header/footer
components (the logo/footer Link elements in components/header.tsx and
components/footer.tsx) to use "/" (or alternatively add a new /docs page that
exports the expected UI to match current links).

In `@scripts/sync-templates.mjs`:
- Around line 150-174: The breadcrumb label transform in
TEMPLATES_CONTENT_TRANSFORMS is too strict and misses multi-line JSX: update the
transform for "app/(main)/(docs)/[category]/page.tsx" and
"app/(main)/(docs)/[category]/[slug]/page.tsx" to match whitespace/newlines
around the link text (e.g. match >\s*Docs\s*<) so the replace of ">Docs<" ->
">Home<" fires for indented markup, and tighten the "components/header-docs.tsx"
replacement to only match link attributes (use href="/docs" and href="/docs"
double-quote patterns rather than any '/docs' or "/docs") so replacements are
consistent with the other entries; alternatively extract the breadcrumb label to
a shared constant in the app and update the sync to replace that identifier
instead of using a fragile regex.

---

Outside diff comments:
In `@scripts/sync-templates.mjs`:
- Around line 444-462: Update the comment in generateTemplatesNextConfig to
explicitly call out that these permanent redirects (in
generateTemplatesNextConfig) are a defense-in-depth for rewritten `/docs` links
and warn that the catch‑all redirect `{ source: "/docs/:path*", destination:
"/:path*" }` can silently shadow scaffolded routes if a category slug collides
with reserved app routes (mention “reserved-slug” risk), and also correct the
mismatched comment in the apex config that currently says “301” to state the
actual emitted status code “308” for consistency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1ef3362d-9571-4294-a932-0045b2d333b2

📥 Commits

Reviewing files that changed from the base of the PR and between 164951d and d11cbbf.

📒 Files selected for processing (22)
  • apps/web/app/(main)/(docs)/[category]/[slug]/page.tsx
  • apps/web/app/(main)/(docs)/[category]/page.tsx
  • apps/web/app/(main)/docs/page.tsx
  • apps/web/app/(marketing)/page.tsx
  • apps/web/components/footer.tsx
  • apps/web/components/header-docs.tsx
  • apps/web/components/header.tsx
  • apps/web/components/hero-section.tsx
  • apps/web/components/logo-cloud.tsx
  • apps/web/components/theme-provider.tsx
  • apps/web/next.config.mjs
  • apps/web/public/r/help-center.json
  • packages/create-helpbase/templates/app/(main)/(docs)/[category]/[slug]/page.tsx
  • packages/create-helpbase/templates/app/(main)/(docs)/[category]/page.tsx
  • packages/create-helpbase/templates/components/theme-provider.tsx
  • packages/create-helpbase/templates/next.config.mjs
  • registry/helpbase/app/(docs)/[category]/[slug]/page.tsx
  • registry/helpbase/app/(docs)/[category]/page.tsx
  • registry/helpbase/components/footer.tsx
  • registry/helpbase/components/header.tsx
  • registry/helpbase/components/theme-provider.tsx
  • scripts/sync-templates.mjs
✅ Files skipped from review due to trivial changes (12)
  • registry/helpbase/components/footer.tsx
  • packages/create-helpbase/templates/app/(main)/(docs)/[category]/[slug]/page.tsx
  • registry/helpbase/app/(docs)/[category]/page.tsx
  • packages/create-helpbase/templates/app/(main)/(docs)/[category]/page.tsx
  • registry/helpbase/app/(docs)/[category]/[slug]/page.tsx
  • apps/web/components/theme-provider.tsx
  • registry/helpbase/components/header.tsx
  • apps/web/app/(main)/(docs)/[category]/[slug]/page.tsx
  • apps/web/components/footer.tsx
  • apps/web/app/(main)/(docs)/[category]/page.tsx
  • apps/web/app/(marketing)/page.tsx
  • packages/create-helpbase/templates/next.config.mjs
🚧 Files skipped from review as they are similar to previous changes (5)
  • apps/web/components/hero-section.tsx
  • apps/web/components/logo-cloud.tsx
  • apps/web/next.config.mjs
  • apps/web/components/header-docs.tsx
  • apps/web/components/header.tsx

{
"path": "registry/helpbase/app/(docs)/[category]/page.tsx",
"content": "import Link from \"next/link\"\nimport { notFound } from \"next/navigation\"\nimport { getCategories } from \"@/lib/content\"\n\nexport async function generateStaticParams() {\n const categories = await getCategories()\n return categories.map((c) => ({ category: c.slug }))\n}\n\nexport default async function CategoryPage({\n params,\n}: {\n params: Promise<{ category: string }>\n}) {\n const { category: categorySlug } = await params\n const categories = await getCategories()\n const category = categories.find((c) => c.slug === categorySlug)\n\n if (!category) notFound()\n\n return (\n <div className=\"max-w-5xl px-8 py-10 lg:px-12\">\n {/* Breadcrumb */}\n <nav className=\"mb-6 flex items-center gap-1.5 text-sm text-muted-foreground\">\n <Link href=\"/\" className=\"transition-colors hover:text-foreground\">\n Home\n </Link>\n <ChevronIcon />\n <span className=\"text-foreground\">{category.title}</span>\n </nav>\n\n {/* Header */}\n <div className=\"mb-10\">\n <h1 className=\"text-3xl font-bold tracking-tight\">\n {category.title}\n </h1>\n {category.description && (\n <p className=\"mt-2 text-lg text-muted-foreground\">\n {category.description}\n </p>\n )}\n </div>\n\n {/* Articles */}\n {category.articles.length > 0 ? (\n <div className=\"grid gap-2\">\n {category.articles.map((article) => (\n <Link\n key={article.slug}\n href={`/${categorySlug}/${article.slug}`}\n className=\"group flex items-center gap-4 rounded-xl border border-transparent px-4 py-4 transition-[border-color,background-color] duration-150 ease-out hover:border-border hover:bg-muted/30\"\n >\n <div className=\"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted transition-colors group-hover:bg-foreground group-hover:text-background\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"size-4\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n </div>\n <div className=\"min-w-0 flex-1\">\n <h2 className=\"font-medium leading-snug\">{article.title}</h2>\n <p className=\"mt-0.5 line-clamp-1 text-sm text-muted-foreground\">\n {article.description}\n </p>\n </div>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"size-4 shrink-0 text-muted-foreground/50 transition-transform group-hover:translate-x-0.5 group-hover:text-foreground\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </Link>\n ))}\n </div>\n ) : (\n <div className=\"rounded-xl border border-dashed border-border px-6 py-16 text-center text-muted-foreground\">\n <p>No articles in this category yet.</p>\n </div>\n )}\n </div>\n )\n}\n\nfunction ChevronIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"size-3.5\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n )\n}\n",
"content": "import Link from \"next/link\"\nimport { notFound } from \"next/navigation\"\nimport { getCategories } from \"@/lib/content\"\n\nexport async function generateStaticParams() {\n const categories = await getCategories()\n return categories.map((c) => ({ category: c.slug }))\n}\n\nexport default async function CategoryPage({\n params,\n}: {\n params: Promise<{ category: string }>\n}) {\n const { category: categorySlug } = await params\n const categories = await getCategories()\n const category = categories.find((c) => c.slug === categorySlug)\n\n if (!category) notFound()\n\n return (\n <div className=\"max-w-5xl px-8 py-10 lg:px-12\">\n {/* Breadcrumb */}\n <nav className=\"mb-6 flex items-center gap-1.5 text-sm text-muted-foreground\">\n <Link href=\"/docs\" className=\"transition-colors hover:text-foreground\">\n Docs\n </Link>\n <ChevronIcon />\n <span className=\"text-foreground\">{category.title}</span>\n </nav>\n\n {/* Header */}\n <div className=\"mb-10\">\n <h1 className=\"text-3xl font-bold tracking-tight\">\n {category.title}\n </h1>\n {category.description && (\n <p className=\"mt-2 text-lg text-muted-foreground\">\n {category.description}\n </p>\n )}\n </div>\n\n {/* Articles */}\n {category.articles.length > 0 ? (\n <div className=\"grid gap-2\">\n {category.articles.map((article) => (\n <Link\n key={article.slug}\n href={`/${categorySlug}/${article.slug}`}\n className=\"group flex items-center gap-4 rounded-xl border border-transparent px-4 py-4 transition-[border-color,background-color] duration-150 ease-out hover:border-border hover:bg-muted/30\"\n >\n <div className=\"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted transition-colors group-hover:bg-foreground group-hover:text-background\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"size-4\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n </div>\n <div className=\"min-w-0 flex-1\">\n <h2 className=\"font-medium leading-snug\">{article.title}</h2>\n <p className=\"mt-0.5 line-clamp-1 text-sm text-muted-foreground\">\n {article.description}\n </p>\n </div>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"size-4 shrink-0 text-muted-foreground/50 transition-transform group-hover:translate-x-0.5 group-hover:text-foreground\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </Link>\n ))}\n </div>\n ) : (\n <div className=\"rounded-xl border border-dashed border-border px-6 py-16 text-center text-muted-foreground\">\n <p>No articles in this category yet.</p>\n </div>\n )}\n </div>\n )\n}\n\nfunction ChevronIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"size-3.5\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n )\n}\n",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify whether the registry item contains a /docs page target
# when it also emits href="/docs" links.
# Expected: either no href="/docs" links, or a target that actually creates /docs.

node - <<'NODE'
const fs = require("node:fs")

const item = JSON.parse(fs.readFileSync("apps/web/public/r/help-center.json", "utf8"))
const docsTargets = item.files
  .map((file) => file.target)
  .filter((target) =>
    /(^|\/)app\/(\(docs\)\/)?docs\/page\.tsx$/.test(target) ||
    /(^|\/)app\/docs\/page\.tsx$/.test(target)
  )

const docsLinks = item.files
  .filter((file) => typeof file.content === "string" && file.content.includes('href="/docs"'))
  .map((file) => file.target)

console.log({ docsTargets, docsLinks })
NODE

Repository: Codehagen/Helpbase

Length of output: 243


Registry ships href="/docs" links but doesn't include a /docs page.

The help-center registry includes breadcrumb, header, and footer components that link to /docs, but no /docs page target is shipped in the registry files. Generated installs will have broken navigation when users click these links.

Either remove the /docs links and point to href="/" instead:

  • Line 31: breadcrumb link in app/(docs)/[category]/page.tsx
  • Line 37: breadcrumb link in app/(docs)/[category]/[slug]/page.tsx
  • Lines 49–55: header logo and footer links in components/header.tsx and components/footer.tsx

Or add a /docs page target to the registry to match the emitted links.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/public/r/help-center.json` at line 31, The breadcrumb Link uses
href="/docs" but the registry does not ship a /docs page; either create a /docs
route or update all references to point to the root. Fix by changing Link
href="/docs" to href="/" in the CategoryPage component (the Link in function
CategoryPage) and the corresponding Link in the sibling
app/(docs)/[category]/[slug]/page.tsx, and also update header/footer components
(the logo/footer Link elements in components/header.tsx and
components/footer.tsx) to use "/" (or alternatively add a new /docs page that
exports the expected UI to match current links).

Comment on lines +150 to +174
const TEMPLATES_CONTENT_TRANSFORMS = {
"components/header-docs.tsx": (content) =>
content
.replace(/\bHeaderDocs\b/g, "Header")
.replace(
/'\/docs'/g, "'/'") // logo link from /docs back to /
.replace(/"\/docs"/g, '"/"'),
"app/(main)/layout.tsx": (content) =>
content
.replace(
/from\s+"@\/components\/header-docs"/g,
'from "@/components/header"',
)
.replace(/\bHeaderDocs\b/g, "Header"),
"components/footer.tsx": (content) =>
content.replace(/href="\/docs"/g, 'href="/"'),
"app/(main)/(docs)/[category]/page.tsx": (content) =>
content
.replace(/href="\/docs"/g, 'href="/"')
.replace(/>Docs</g, ">Home<"),
"app/(main)/(docs)/[category]/[slug]/page.tsx": (content) =>
content
.replace(/href="\/docs"/g, 'href="/"')
.replace(/>Docs</g, ">Home<"),
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 1) Inspect breadcrumb JSX shape — does ">Docs<" actually appear compactly?
fd -t f 'page.tsx' apps/web/app | xargs rg -nP -C2 '>Docs<|>\s*Docs\s*<' 2>/dev/null

# 2) Find any HeaderDocs-prefixed identifiers besides the component itself
rg -nP '\bHeaderDocs\w+' apps/web

# 3) Confirm what quoting styles appear for /docs in the transformed files
for f in apps/web/components/header-docs.tsx apps/web/components/footer.tsx \
         'apps/web/app/(main)/(docs)/[category]/page.tsx' \
         'apps/web/app/(main)/(docs)/[category]/[slug]/page.tsx'; do
  echo "── $f ──"
  rg -nP '["'"'"'`]/docs\b' "$f" 2>/dev/null
done

Repository: Codehagen/Helpbase

Length of output: 522


🏁 Script executed:

# Fetch full breadcrumb context from the category and slug pages
for f in 'apps/web/app/(main)/(docs)/[category]/page.tsx' \
         'apps/web/app/(main)/(docs)/[category]/[slug]/page.tsx'; do
  echo "=== $f ==="
  rg -nP -B3 -A3 'href="/docs"' "$f" 2>/dev/null
done

Repository: Codehagen/Helpbase

Length of output: 846


Breadcrumb text transform is broken and will ship incorrect labels to templates.

The .replace(/>Docs</g, ">Home<") regex assumes compact JSX (<Link href="...">Docs</Link>), but the actual breadcrumb markup is multi-line with indentation:

<Link href="/docs" className="...">
  Docs
</Link>

This means the transform will not fire, and generated templates will have href="/" but still display the "Docs" label — confusing UX. Fix by either:

  • Rewriting the regex to handle newlines/whitespace: .replace(/>[\s\n]*Docs[\s\n]*</g, ">Home<")
  • Or extracting the breadcrumb label to a constants module in apps/web and updating the sync to treat it as data rather than regex.

Secondary concern: the components/header-docs.tsx transform replaces all '/docs' and "/docs" in the file (overly broad), while other transforms use the tighter href="/docs" pattern. Current source has only link usages, but for consistency consider consolidating to href=... patterns or the constants-module approach above.

The \bHeaderDocs\b rename is safe — no HeaderDocs-prefixed identifiers exist in the source.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/sync-templates.mjs` around lines 150 - 174, The breadcrumb label
transform in TEMPLATES_CONTENT_TRANSFORMS is too strict and misses multi-line
JSX: update the transform for "app/(main)/(docs)/[category]/page.tsx" and
"app/(main)/(docs)/[category]/[slug]/page.tsx" to match whitespace/newlines
around the link text (e.g. match >\s*Docs\s*<) so the replace of ">Docs<" ->
">Home<" fires for indented markup, and tighten the "components/header-docs.tsx"
replacement to only match link attributes (use href="/docs" and href="/docs"
double-quote patterns rather than any '/docs' or "/docs") so replacements are
consistent with the other entries; alternatively extract the breadcrumb label to
a shared constant in the app and update the sync to replace that identifier
instead of using a fragile regex.

@Codehagen
Codehagen merged commit 57e28f0 into main Apr 19, 2026
5 checks passed
@Codehagen
Codehagen deleted the feat/marketing-area branch April 19, 2026 17:44

This branch was successfully deployed

1 active deployment
Preview — d11cbbff Deployed Apr 19, 2026 by vercel[bot]
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