Repository navigation
fix: keep search scope in sync across reloads and view changes - #3703
Conversation
JammingBen
left a comment
There was a problem hiding this comment.
There are some cases where the filter and the actual scope diverge now:
Let's say you have a vault test.vault. Now you search for this, scope the search to the current folder and open the vault from the search result page. Now the filter correctly switches to all files. But it seems to search for the current folder still, because it doesn't yield any search results.
Another case: scope the search to the current folder and reload -> it now correctly keeps this. Now you click on e.g. "Favorites" -> filter correctly switches to all files. When switching back some folder, the filter stays on all files, but the search is now scoped to the current folder.
|
@JammingBen Both cases are fixed; the filter and search scope now stay in sync across reloads, view changes, and vaults, with regression tests for previews and result searches. |
JammingBen
left a comment
There was a problem hiding this comment.
This introduced another bug, resulting in an endless loading spinner:
- Open a folder, type a term, set the scope to "Current folder" and press Enter.
- Throttle your network to simulate a slow network, e.g. "3G"
- Switch the filter chip to "All files".
da47ba6 to
eb4de39
Compare
|
@JammingBen Fixed in eb4de39: on the results page the chip change also queued a preview search, which cancelled the running result search on slow networks. Enter now also cancels a pending preview. Rebased onto main. |
Description
After reloading a folder-scoped search or changing views, the location chip and the actual search scope could diverge. The filter now synchronizes both route-driven and automatic selection changes with the search bar; only explicit user selections trigger navigation.
Related Issue
How Has This Been Tested?
pnpm check:typespassed; Prettier passed for all changed files; ESLint reported no errors (existingList.vuecomponent-name warning).main.Types of changes