Skip to content

[HOLD for payment 2023-10-25] [$500] Chat - App closes mention suggestions when cursor is between double @ #28754

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Action Performed:

  1. Open the app
  2. Open any report
  3. Write @, it will trigger mention suggestions
  4. Write any letter, number or symbol after it
  5. Take it cursor back to position after the @ and observe that app again displays mention suggestions
  6. Clear everything and write double @@
  7. Take cursor back to position after the first @ and observe that app does not display mention suggestions

Expected Result:

App should display mention suggestions according to cursor position and text before it

Actual Result:

App does not display mention suggestions even though @ is present before cursor if @ is also present after cursor

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.77.2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

android.native.double.@.mention.issue.mp4
android.chrome.double.@.mention.issue.mp4
windows.chrome.double.@.mention.issue.mp4
ios.native.safari.double.@.mention.issue.mov
mac.chrome.double.@.mention.issue.mov
mac.desktop.double.@.mention.issue.mov
Recording.4843.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696338120628179

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017e08f14329a2fd98
  • Upwork Job ID: 1709321185861791744
  • Last Price Increase: 2023-10-10
  • Automatic offers:
    • paultsimura | Contributor | 27123369
    • dhanashree-sawant | Reporter | 27123379

Activity

  1. added
    External
    Daily
    Bug
    on Oct 3, 2023
  2. changed the title [-]Chat - App closes mention suggestions when cursor is between double @[/-] [+][$500] Chat - App closes mention suggestions when cursor is between double @[/+] on Oct 3, 2023
  3. melvin-bot commented on Oct 3, 2023

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  4. melvin-bot commented on Oct 3, 2023

    @melvin-bot
  5. added
    Help Wanted
    on Oct 3, 2023
  6. melvin-bot commented on Oct 3, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Oct 3, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

  8. paultsimura commented on Oct 3, 2023

    @paultsimura
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Placing a cursor in between consecutive @ signs doesn't show the name suggestions.

    What is the root cause of that problem?

    We are using a RegExp that no longer exists (CONST.REGEX.NEW_LINE_OR_WHITE_SPACE_OR_EMOJI) to calculate the end of the next word after the cursor:

    const indexOfFirstWhitespaceCharOrEmojiAfterTheCursor = valueAfterTheCursor.search(CONST.REGEX.NEW_LINE_OR_WHITE_SPACE_OR_EMOJI);

    As a result, the value of indexOfFirstWhitespaceCharOrEmojiAfterTheCursor is always 0 (as RegExp is undefined), and the calculation logic is broken.

    What changes do you think we should make in order to solve the problem?

    We should replace the non-existing RegExp with the one that replaced it in #19004

    -           const indexOfFirstWhitespaceCharOrEmojiAfterTheCursor = valueAfterTheCursor.search(CONST.REGEX.NEW_LINE_OR_WHITE_SPACE_OR_EMOJI);
    +           const indexOfFirstWhitespaceCharOrEmojiAfterTheCursor = valueAfterTheCursor.search(CONST.REGEX.SPECIAL_CHAR_OR_EMOJI);

    Result:

    double-mention.mov

    What alternative solutions did you explore? (Optional)

  9. Christinadobrzyn commented on Oct 3, 2023

    @Christinadobrzyn
    Contributor

    Hey team! Do you think this GH has the same root and therefore the same fix? #28753

  10. paultsimura commented on Oct 3, 2023

    @paultsimura
    Contributor

    Hey @Christinadobrzyn , even though I'm not a part of the Internal team:
    #28753 is a regression from the recently merged #28045

    And this issue (#28754) existed relatively long before that regression – at least since #25758.

  11. 27 remaining items

  12. melvin-bot commented on Oct 18, 2023

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Oct 18, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.86-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2023-10-25. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    For reference, here are some details about the assignees on this issue:

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  14. melvin-bot commented on Oct 18, 2023

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
    • [@parasharrajat] 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:
    • [@parasharrajat] A discussion in #expensify-bugs 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:
    • [@parasharrajat] Determine if we should create a regression test for this bug.
    • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. added
    Daily
    and removed
    Weekly
    on Oct 25, 2023
  16. mallenexpensify commented on Oct 26, 2023

    @mallenexpensify
    Contributor

    Issue reporter: @dhanashree-sawant paid $50 via Upwork
    Contributor: @paultsimura paid $750 via Upwork, inc. urgency bonus (see above)
    Contributor+: @parasharrajat due $750 via NewDot

    @parasharrajat , can you please fill out the BZ checklist? Thx

  17. parasharrajat commented on Oct 26, 2023

    @parasharrajat
    Member

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    Regression Test Steps

    1. Open any report
    2. Write @, it will trigger mention suggestions
    3. Write @gmail (or any other email domain that is present in your contacts) after the first "@". It should be looking like @@gmail now.
    4. Place the cursor right after the first "@".
    5. Verify that the mention suggestions are still open.
    6. Verify that the search is happening by the whole word up until the space or a special character, regardless of the cursor position on the word from first @.

    Do you agree 👍 or 👎 ?

  18. melvin-bot commented on Oct 30, 2023

    @melvin-bot

    @madmax330, @paultsimura, @mallenexpensify, @parasharrajat Whoops! This issue is 2 days overdue. Let's get this updated quick!

  19. madmax330 commented on Oct 30, 2023

    @madmax330
    Contributor

    @mallenexpensify can you review the BZ checklist when you get a chance?

  20. mallenexpensify commented on Oct 30, 2023

    @mallenexpensify
    Contributor
  21. parasharrajat commented on Dec 5, 2023

    @parasharrajat
    Member

    Payment requested as per #28754 (comment)

  22. JmillsExpensify commented on Dec 11, 2023

    @JmillsExpensify
    Contributor

    $750 payment approved for @parasharrajat based on this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions