Skip to content

fix(app): search every known project in the open project dialog - #40202

Open
NumerousJLs wants to merge 2 commits into
anomalyco:devfrom
NumerousJLs:project-picker-search
Open

fix(app): search every known project in the open project dialog#40202
NumerousJLs wants to merge 2 commits into
anomalyco:devfrom
NumerousJLs:project-picker-search

Conversation

@NumerousJLs

Copy link
Copy Markdown

Issue for this PR

Closes #39142

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 reached List. Because useFilteredList only filters the array returned by items(), 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.ts registers 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 typecheck and bun typecheck:e2e in packages/app, both exit 0
  • bun test src/components/directory-picker-domain.test.ts, 20 pass, 0 fail
  • bun test src/components/directory-picker.test.ts, 1 pass, 0 fail
  • bunx playwright test e2e/regression/project-picker-recent-search.spec.ts --project=chromium, 2 pass, 0 fail
  • prettier --check on both changed files and git diff --check, clean

Screenshots / recordings

Six projects registered, with foxtrot-docs sixth and outside the five-item cap.

Before, searching foxtrot finds nothing:

before

After, searching foxtrot finds it:

after

With no query, the dialog still shows five recents:

idle

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Open Project search excludes known projects outside five most recent

1 participant