fix: stabilize search modal height to prevent layout jolt (#1301)
The Cmd+K search modal jolted visibly when the user started typing:
hints (~100px) disappeared immediately, nothing rendered during the
150ms debounce window (loading was still false), "no results for X"
briefly flashed, then collapsed again while the fetch was in flight,
then popped open to result height.
two fixes:
1. set `loading=true` synchronously inside `setQuery()` when query>=2
(and semanticLoading when query>=3) so the "no results" branch never
matches during the debounce window before the fetch fires.
2. wrap the body states in `.search-body` with a 104px min-height
(matching the hints' rendered height) and `interpolate-size:
allow-keywords` + `transition: height`. the body no longer collapses
between states, and the growth to result height animates smoothly on
browsers that support interpolate-size (chrome/safari/edge 2024+).
older browsers fall back to instant resize — no regression.
an explicit `.search-progress` placeholder covers the in-between state
when the user has typed 1 char or is waiting on the first response.
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
authored by