Files
archived-orca/src
Jinjing 46423cede7 fix(quick-open): don't clear Cmd+P input on unrelated store updates (#941)
* fix(quick-open): don't clear Cmd+P input on unrelated store updates

The file-load effect depended on excludePaths, a new array reference
produced on any worktreesByRepo update. Each such update re-ran the
effect and called setQuery(''), wiping input the user was typing.
Split the open-reset into its own effect keyed on `visible`.

* fix(quick-open): remove manual scroll-to-top that fought user scroll

The rAF scrollTo(0,0) ran on every query/visible change, which meant
scrolling down and then typing (or any re-render that touched the
effect) snapped the list back up. The clipping issue it was papering
over is already solved by CommandList's p-2 padding, and cmdk's own
scrollIntoView handles keeping the selected item visible.

* fix(quick-open): stop refetching on unrelated worktreesByRepo updates

The excludePaths memo returned a new array reference on every
worktreesByRepo mutation, even when neither the active worktree's
path nor its siblings changed. That re-ran the file-load effect,
cleared files, and blinked the list on focus/scroll. Memoize on a
stable joined-string key instead.
2026-04-22 10:11:20 -07:00
..