Coming from the proposal
Background
The mention suggestion feature allows users to tag colleagues by typing “@” followed by a name in the chat composer. As users type, the system calculates which users to suggest based on the current input, displaying a dropdown menu with matching names. This calculation involves parsing the text, identifying the mention trigger, extracting the query string, filtering the user list against that query, and updating the UI with results. The calculation runs through calculateMentionSuggestion, which is fires on every typing (one per keystroke), the calculation executes continuously during active typing sessions.
Problem
When a user types in the chat composer with mention suggestions active, if the calculation executes on every keystroke, then the UI thread becomes blocked by repeated expensive operations, causing noticeable typing lag that degrades the chat experience.
Solution
Debounce the mention suggestion calculation with a 100ms delay so it only executes after the user pauses typing, rather than on every keystroke.
Performance impact:
- Suggestion menu display: ~93% faster (566ms → 39ms)
- Typing responsiveness: ~93% faster (570ms → 41ms)
Draft PR: #74916
Issue Owner
Current Issue Owner: @
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021996713218360843665
- Upwork Job ID: 1996713218360843665
- Last Price Increase: 2025-12-04
Coming from the proposal
Background
The mention suggestion feature allows users to tag colleagues by typing “@” followed by a name in the chat composer. As users type, the system calculates which users to suggest based on the current input, displaying a dropdown menu with matching names. This calculation involves parsing the text, identifying the mention trigger, extracting the query string, filtering the user list against that query, and updating the UI with results. The calculation runs through calculateMentionSuggestion, which is fires on every typing (one per keystroke), the calculation executes continuously during active typing sessions.
Problem
When a user types in the chat composer with mention suggestions active, if the calculation executes on every keystroke, then the UI thread becomes blocked by repeated expensive operations, causing noticeable typing lag that degrades the chat experience.
Solution
Debounce the mention suggestion calculation with a 100ms delay so it only executes after the user pauses typing, rather than on every keystroke.
Performance impact:
Draft PR: #74916
Issue Owner
Current Issue Owner: @Upwork Automation - Do Not Edit