The masthead search (components/NavSearch.tsx) is deliberately a plain method="get" form: no state, no router, no client bundle, works before hydration and with scripting off. This app ships exactly two client components (app/error.tsx and app/preflight/PreflightForm.tsx) and treats that as a feature. A "/" keyboard shortcut that focuses the search box is a genuinely useful affordance readers expect from directory-style sites, but it cannot exist without a little client JavaScript, so this issue is as much about where the line is as about the listener.
The line: progressive enhancement only. The form itself stays a server-rendered plain form; the shortcut is an additive layer whose absence changes nothing. The input already has a stable target, id="nav-q".
Where to look
components/NavSearch.tsx — the form, its "Why it is a plain form" doc comment (which must stay true, or be updated honestly), and id="nav-q"
app/error.tsx, app/preflight/PreflightForm.tsx — the two existing client components, for the prevailing style if a third is added
- The layout that mounts the masthead, if the listener lives in a tiny separate client component rather than inside NavSearch
Done when
The masthead search (
components/NavSearch.tsx) is deliberately a plainmethod="get"form: no state, no router, no client bundle, works before hydration and with scripting off. This app ships exactly two client components (app/error.tsxandapp/preflight/PreflightForm.tsx) and treats that as a feature. A "/" keyboard shortcut that focuses the search box is a genuinely useful affordance readers expect from directory-style sites, but it cannot exist without a little client JavaScript, so this issue is as much about where the line is as about the listener.The line: progressive enhancement only. The form itself stays a server-rendered plain form; the shortcut is an additive layer whose absence changes nothing. The input already has a stable target,
id="nav-q".Where to look
components/NavSearch.tsx— the form, its "Why it is a plain form" doc comment (which must stay true, or be updated honestly), andid="nav-q"app/error.tsx,app/preflight/PreflightForm.tsx— the two existing client components, for the prevailing style if a third is addedDone when
/directory?q=…exactly as todayNavSearch.tsxremains a server component, with the shortcut in a minimal separate client affordance — or, if that proves worse, the doc comment and the "two client components" claim are updated to match reality