The mention textarea can show stale user suggestions if an older /api/users/search request resolves after the user has already typed a newer mention query or left mention mode.\n\nRepro path:\n1. Type a mention query such as @A so the debounced search starts.\n2. Before that request resolves, continue typing a different query such as @ad, or leave the mention context.\n3. If the older response resolves later, it can still update the dropdown because the response is not tied to the active mention query.\n\nExpected behavior: only the latest active mention query should be allowed to update the suggestion dropdown, and leaving mention mode should cancel/invalidate any pending search.\n\nI have a focused fix and regression coverage ready on branch fix/mention-stale-suggestions.
The mention textarea can show stale user suggestions if an older /api/users/search request resolves after the user has already typed a newer mention query or left mention mode.\n\nRepro path:\n1. Type a mention query such as @A so the debounced search starts.\n2. Before that request resolves, continue typing a different query such as @ad, or leave the mention context.\n3. If the older response resolves later, it can still update the dropdown because the response is not tied to the active mention query.\n\nExpected behavior: only the latest active mention query should be allowed to update the suggestion dropdown, and leaving mention mode should cancel/invalidate any pending search.\n\nI have a focused fix and regression coverage ready on branch fix/mention-stale-suggestions.