perf(layout): mount the search modal client-only
- Dominant language
- Astro
- Stars
- 155
- Forks
- 177
- Avg merge
- 1d 20m
- Merged PRs (30d)
- 192
Description
Part of the Markdown for Agents Phase 1 epic (see #5652). kestra.io has Cloudflare Markdown for Agents enabled: `Accept: text/markdown` converts the SSR HTML at the edge, so defects in the HTML end up in what AI agents read. Cloudflare strips `nav`/`header`/`footer`/scripts/styles/inline SVG, ignores `aria-hidden` and empty `alt`, keeps `.visually-hidden` text and `display:none` content, and renders `
- ` as separate lines (all verified on production).
## Problem
`src/components/layout.astro` mounts `Search` with `client:load` before ``. The converter strips the header nav but keeps the modal (a plain div, `aria-hidden` is ignored), so every page starts with ~23 lines of search and chatbot controls before the H1.
## Scope
- Change the directive to `client:only="vue"` (existing pattern: `content/ApiDoc.astro`, `orchestrate/OrchPattern.astro`, `blueprints/[id].astro`). Same JS cost as today; only the SSR HTML disappears.
- Verify the unscoped `` in `Search.vue` is still in the CSS bundle, and that the header button, floating Ask AI button, docs sidebar triggers and the `a` shortcut still open the modals.
- Fallback if styles break: move `<Search>` after `</main>`.
## Done when
- First content heading within the first 15 lines of `/` Markdown.
- No functional change to search or Ask AI.
## Depends on
- Land after or rebase on #5632, which rewrites `Search.vue` to `<dialog>`.
Contributor guide
Research direction
Start in src/components/layout.astro and compare the Search usage with the client-only patterns in content/ApiDoc.astro, orchestrate/OrchPattern.astro, and blueprints/[id].astro. After #5632 is available, verify Search.vue styles and the listed search and Ask AI triggers, then check that the first content heading appears within the first 15 lines of / Markdown without functional changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100