Repository navigation
fix(app): keep the @ menu open while it searches - #59424
kitlangton wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Verified with the new component test. On the base branch the file rows vanish while the next search is pending (the menu drops to just @review). With this change the previous rows stay until the new results replace them (5/5 runs). tsc -b passes. The rest of composer.spec.ts passes except "pins history search above the scrolling prompts", which you note also fails on the base branch.
Public API is unchanged: only the composer's internal state, a story and a test change.
One small edge case is noted inline: a failed file search now leaves the previous search's files in the menu.
| void Promise.resolve(input.searchContextFiles(query, controller.signal)).then( | ||
| (files) => !controller.signal.aborted && setFound({ query, files }), | ||
| (files) => !controller.signal.aborted && setFound("files", files), | ||
| () => undefined, |
There was a problem hiding this comment.
Now that results aren't tagged with their query, a rejected search leaves the previous search's files listed under the new query. Non-recent files skip the label filter, so they show unfiltered until the next keystroke. Before this change a failure meant no file rows. Clearing found.files here when !controller.signal.aborted would keep "No matching items" or an empty list on errors instead of showing stale files.
There was a problem hiding this comment.
The new commit works as described. Unit tests (test-browser/composer-file-search.test.ts, src/composer), the composer component tests and tsc -b pass; the one component failure is the same "pins history search…" test as before, which you note also fails on the base branch. Leftover files from the previous search can't be highlighted or picked any more, and Enter with no highlighted row does nothing rather than sending the prompt. The new rule that the highlight follows the first row until you pick one also applies to the slash menus, which looks consistent. The earlier point about a failed search leaving the previous search's files on screen is narrowed (they can't be picked now) but they still show, so that thread stays open. Public API is unchanged.


Closing: beta is gone, and dev already has this change as .