mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-11-05 06:43:48 -05:00
The search input's debounce returned a cleanup closure from an onChange handler that nothing ever invoked, so typing a six-letter word fired five separate searches 300ms apart, and each dispatch re-entered search mode with the default scope, silently reverting a Library or Location selection to This Folder on the next keystroke. An effect owns the timer now: each keystroke cancels the previous one, one search fires per settled query, and entering search mode carries the scope already picked. Dropping below the minimum length exits search deterministically, including the backspace to one character that previously left stale two-character results on screen. The minimum query length lives in one exported constant instead of three synchronized literals, and Cmd+F finally does something: the already-defined focusSearchBar keybind expands and focuses the search bar through a handle on ExpandableSearchButton. Per-tab search state and search as a navigation target remain with the search refinement plan's Phase 2; they touch the shell layout another session is actively changing.