You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-07-07] [$250] ComposeBox - When you click on the mention again, extra characters appear #60804
Version Number: 9.1.32-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/5995329 Email or phone of affected tester (no customers):sustinov@applausemail.com Issue reported by: Applause Internal Team Device used: Macbook/13.7.5/Chrome, OnePlus 9 PRO/Android 14/Chrome, iPhone 12 PRO/iOS 18.4.1 App Component: Chat Report View
🚨 Edited by proposal-police: This proposal was edited at 2025-04-29 20:36:16 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user clicks on a mention suggestion (e.g., @abcd@gmail.com) after partially typing it (e.g., @abcd), the mention is inserted correctly, but extra characters from the original input (like gmail.com) remain after the inserted mention. This results in duplicated or malformed mentions like @abcd@gmail.com gmail.com.
What is the root cause of that problem?
The issue stems from how the commentAfterMention is computed when inserting the selected mention.
Currently, the logic slices the comment based on a fixed offset after the @ symbol — it doesn't account for the full original mention text (like @abcd@gmail.com). As a result, the remaining part of the original input (e.g., gmail.com) gets preserved and appended after the newly inserted mention.
What changes do you think we should make in order to solve the problem?
Instead of slicing a fixed number of characters after the @, dynamically determine the length of the original mention string (e.g., @abcd@gmail.com) by matching the text from atSignIndex.
Then, slice the value only after that full match to get the accurate commentAfterMention.
We will use MENTION_BREAKER to get the remaining part of the metion.
changed the title [-]ComposeBox - When you click on the mention again, extra characters appear[/-][+][$250] ComposeBox - When you click on the mention again, extra characters appear[/+]on Apr 24, 2025
Hey @hoangzinh I'm going to be OOO starting Friday through Tuesday, so to make sure that payment happens on time, can you please fill out the BZ checklist asap? I'll tag another Concierge to have eyes on it on 7/7
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Thanks @hoangzinh - apparently I'm not able to round-robin-reassign BZ issues, so I will just be issuing the payment when I'm back on 7/9 - thanks for your understanding!
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon Apr 24, 2025
Triggered auto assignment to @lydiabarclay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.Krishna2323 commentedon Apr 24, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-29 20:36:16 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
commentAfterMentionis computed when inserting the selected mention.App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Lines 196 to 218 in d629de0
What changes do you think we should make in order to solve the problem?
Instead of slicing a fixed number of characters after the @, dynamically determine the length of the original mention string (e.g., @abcd@gmail.com) by matching the text from atSignIndex.
Then, slice the value only after that full match to get the accurate commentAfterMention.
We will use
MENTION_BREAKERto get the remaining part of the metion.App/src/CONST.ts
Lines 3494 to 3498 in 3885a40
This ensures we don’t re-append any part of the original partial mention.
Code diff
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
insertSelectedMentionto test different scenarios.What alternative solutions did you explore? (Optional)
N/A
Result
[-]ComposeBox - When you click on the mention again, extra characters appear[/-][+][$250] ComposeBox - When you click on the mention again, extra characters appear[/+]melvin-bot commentedon Apr 24, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021915530953266836404
melvin-bot commentedon Apr 24, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)hoangzinh commentedon Apr 27, 2025
@Krishna2323 can you check if we have any existing regrex for this
const mentionMatch = rest.match(/^[@\w.\-+]+/);?Krishna2323 commentedon Apr 28, 2025
@hoangzinh, I think we can use
MENTION_BREAKER. It works well.App/src/CONST.ts
Lines 3494 to 3498 in 3885a40
Monosnap.screencast.2025-04-28.15-15-20.mp4
hoangzinh commentedon Apr 28, 2025
Cool. Can you add it to your proposal? Also, you can put code diff into
detailsexpand block to help your proposal look cleaner/70 remaining items
lydiabarclay commentedon Jul 2, 2025
Hey @hoangzinh I'm going to be OOO starting Friday through Tuesday, so to make sure that payment happens on time, can you please fill out the BZ checklist asap? I'll tag another Concierge to have eyes on it on 7/7
hoangzinh commentedon Jul 3, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/30930/files#r2181388683
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/523283
Regression Test Proposal
Test:
Do we agree 👍 or 👎
lydiabarclay commentedon Jul 3, 2025
Thanks @hoangzinh - apparently I'm not able to round-robin-reassign BZ issues, so I will just be issuing the payment when I'm back on 7/9 - thanks for your understanding!
hoangzinh commentedon Jul 3, 2025
No worry, I'm fine with that plan. @lydiabarclay
melvin-bot commentedon Jul 7, 2025
This issue has not been updated in over 15 days. @dangrous, @hoangzinh, @Krishna2323, @lydiabarclay eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
dangrous commentedon Jul 7, 2025
Keeping as weekly to handle payment when @lydiabarclay is back!
lydiabarclay commentedon Jul 9, 2025
Payment Summary
Contributor: @Krishna2323 paid $250 via Upwork
Contributor+: @hoangzinh due $250 via NewDot
✅ Regression test filed
hoangzinh commentedon Jul 10, 2025
Thanks @lydiabarclay. I requested in ND
garrettmknight commentedon Jul 21, 2025
$250 approved for @hoangzinh