Severity
P1 — Performance
Context
`src/app/[lang]/(marketing)/layout.tsx` was `"use client"` because it held a `useRef` for the chatbot's imperative `openChat()` method. Investigation showed the `onChatClick` prop was drilled through 4 layers (`layout → SiteHeader → SiteHeaderClient → RightActions`) but never actually invoked — `RightActions` accepts the prop and ignores it. `MobileHeader` doesn't even receive it. So the entire prop chain was dead plumbing keeping the layout client-side for nothing.
Fix
- Drop dead `onChatClick` plumbing across 4 files
- Convert `(marketing)/layout.tsx` from client to server component
- Lazy-load `ChatbotContent` via `next/dynamic` (`ssr: false`) inside a tiny `` client island
Impact
- All marketing pages (`/`, `/pricing`, `/service`) become RSC by default again — chatbot bundle no longer in the marketing critical path
- Chatbot widget is fetched only when needed; reduces initial JS payload and TTI
- Honors `PERFORMANCE.md`'s claim of "lazy loading of chat window" which was actually unimplemented
Acceptance criteria
Reference
Plan: PR-13.
Severity
P1 — Performance
Context
`src/app/[lang]/(marketing)/layout.tsx` was `"use client"` because it held a `useRef` for the chatbot's imperative `openChat()` method. Investigation showed the `onChatClick` prop was drilled through 4 layers (`layout → SiteHeader → SiteHeaderClient → RightActions`) but never actually invoked — `RightActions` accepts the prop and ignores it. `MobileHeader` doesn't even receive it. So the entire prop chain was dead plumbing keeping the layout client-side for nothing.
Fix
Impact
Acceptance criteria
Reference
Plan: PR-13.