fix(app): search every known project in the open project dialog - #40202
Open
NumerousJLs wants to merge 2 commits into
Open
fix(app): search every known project in the open project dialog#40202NumerousJLs wants to merge 2 commits into
NumerousJLs wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #39142
Type of change
What does this PR do?
Searching the Open Project dialog now includes projects beyond the five most recent, while the empty dialog still shows only five.
Before this change,
recentProjects()applied.slice(0, 5)before its rows reachedList. BecauseuseFilteredListonly filters the array returned byitems(), projects outside that slice were excluded from fuzzy search. Entering an absolute path still worked because directory search handles that separately.This follows the reporter's proposed fix by moving the cap to
items(), where the query is available. With no query, it returns five recent projects. When you type, it passes every known project to the existing filter. Sorting, grouping, directory results, and deduplication are unchanged.How did you verify your code works?
e2e/regression/project-picker-recent-search.spec.tsregisters six projects and verifies that the sixth can be found by name while the idle list still shows five. With the old slice temporarily restored, the search test fails and the idle-cap test continues to pass.bun typecheckandbun typecheck:e2einpackages/app, both exit 0bun test src/components/directory-picker-domain.test.ts, 20 pass, 0 failbun test src/components/directory-picker.test.ts, 1 pass, 0 failbunx playwright test e2e/regression/project-picker-recent-search.spec.ts --project=chromium, 2 pass, 0 failprettier --checkon both changed files andgit diff --check, cleanScreenshots / recordings
Six projects registered, with
foxtrot-docssixth and outside the five-item cap.Before, searching
foxtrotfinds nothing:After, searching
foxtrotfinds it:With no query, the dialog still shows five recents:
Checklist