Skip to content

[$250] [Due for payment 2025-12-03] Debounce Mention Suggestion Calculation #74937

Description

@mountiny

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 OwnerCurrent 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

Metadata

Metadata

Labels

AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.ReviewingHas a PR in review

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions