Keep unified mention results fresh - #35365
Conversation
## What changed - Restart file search whenever a unified mention popup opens so restored or repeated queries receive results instead of inheriting stale search state. - Cache the popup's filtered rows and refresh them when the query, file matches, search mode, skills, or plugins change. ## Testing - Add regression tests for bare, reopened, and restored unified mention searches. GitOrigin-RevId: 9d38438fade01a0552e03cb05e023ee64af60a4c
8884c96 to
322d5b9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8884c96a64
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| composer.draft.textarea.set_cursor("@foo @foo".len()); | ||
| composer.sync_popups(); | ||
| assert!(matches!(composer.popups.active, ActivePopup::MentionV2(_))); |
There was a problem hiding this comment.
Add snapshot coverage for refreshed mention results
When an identical mention popup is reopened, this test only verifies the popup variant and queued search events; it never delivers a fresh nonempty result or renders the resulting rows. The user-visible refresh behavior could therefore regress to stale or empty output while these tests continue passing. Add an insta snapshot that reopens or restores the popup, supplies refreshed matches, and verifies the rendered rows.
AGENTS.md reference: AGENTS.md:L180-L187
Useful? React with 👍 / 👎.
Keep unified mention results fresh
What changed
Testing