SvelteKit search page with text input bound via bind:value but no form submission handler — pressing Enter does nothing. The input is not wrapped in a <form> and has no on:keydown handler. Additionally, the +page.server.ts load function reads q from url.searchParams but never passes it to the API call, and calls a list/browse endpoint (/api/posts) instead of the actual search endpoint (/api/search). The query parameter is entirely cosmetic — it appears in the page title but never filters results. Three compounding bugs: (1) no input submission wiring, (2) query param read but never forwarded, (3) wrong API endpoint that doesn't even accept a query parameter.
Three fixes needed:
Wire the input: Wrap the <input> in <form on:submit|preventDefault={handleSearch}> so Enter triggers native form submission. The handler builds the URL with ?q={query} and calls goto().
Forward q to the API: In the server load, branch on whether q is present. With q, call the search endpoint (searchApiSearchGet). Without q, keep the existing browse/list endpoint.
Use the correct endpoint: The search endpoint returns a flat array of SearchResultSummaryOvo[] (each wrapping a .post), not a paginated PagePostOvo. Map the results with .map(r => r.post) and disable pagination when in search mode.
The compounding nature is key: fixing only bug 1 (adding Enter handler) would still produce zero search results because bugs 2 and 3 silently discard the query.