Skip to content

[Due for payment 2025-10-21] [$250] chat-@ mention suggestions not displayed on new line after emoji in edit comment #68722

Closed

Description

@mitarachim

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


Version Number: V9.1.96-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://test-management.browserstack.com/projects/2219752/test-runs/TR-331/folder/13176681/41236997/846111073
Email or phone of affected tester (no customers): Slottwo1 2@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13 phone
App Component: Chat Report View

Action Performed:

  1. Launch app
  2. Send a emoji
  3. Open edit comment
  4. Tap enter few times and in new line enter @

Expected Result:

After entering an emoji, pressing Enter to move to a new line and typing @ should still trigger the suggestion box in edit comment.

Actual Result:

When an emoji is present, typing @ on a new line inside edit comment does not display the suggestion box.

Note: After entering @, on tapping space and removing the space shows suggestion box.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6920645_1755579468096.Screenrecorder-2025-08-19-10-15-25-477.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021958601260731157450
  • Upwork Job ID: 1958601260731157450
  • Last Price Increase: 2025-08-28
Issue OwnerCurrent Issue Owner: @thesahindia

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 19, 2025
  2. melvin-bot commented on Aug 19, 2025

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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.

  3. NJ-2020 commented on Aug 19, 2025

    @NJ-2020
    Contributor

    Proposal

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

    Chat @ mention suggestions are not displayed on new line after emoji in edit comment

    What is the root cause of that problem?

    We'll close the mention suggestions here automatically whenever the user scrolls the input

    onScroll={onSaveScrollAndHideSuggestionMenu}

    const onSaveScrollAndHideSuggestionMenu = useCallback(
    (e: NativeSyntheticEvent<TextInputScrollEventData>) => {
    mobileInputScrollPosition.current = e?.nativeEvent?.contentOffset?.y ?? 0;
    hideSuggestionMenu();
    },
    [hideSuggestionMenu],
    );

    But if we type any text after the emoji, the emoji size and input height will changes which will trigger the onScroll in this case:

    Screen.Recording.2025-08-19.at.16.01.55.mov

    But this bug doesn't happen if we do directly into input send message composer which is (ReportActionCompose)
    It's because right here we prevent from hiding any suggestions if the onScroll trigger is likely coming from the layout changes


    (e: NativeSyntheticEvent<TextInputScrollEventData>) => {
    mobileInputScrollPosition.current = e?.nativeEvent?.contentOffset?.y ?? 0;
    if (!suggestionsRef.current || isScrollLikelyLayoutTriggered.current) {
    return;
    }
    suggestionsRef.current.updateShouldShowSuggestionMenuToFalse(false);

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

    We should do same way as we do for ReportActionCompose/ComposerWithSuggestions

    // A flag to indicate whether the onScroll callback is likely triggered by a layout change (caused by text change) or not
    const isScrollLikelyLayoutTriggered = useRef(false);
    /**
    * Reset isScrollLikelyLayoutTriggered to false.
    *
    * The function is debounced with a handpicked wait time to address 2 issues:
    * 1. There is a slight delay between onChangeText and onScroll
    * 2. Layout change will trigger onScroll multiple times
    */
    const debouncedLowerIsScrollLikelyLayoutTriggered = useDebounce(
    useCallback(() => (isScrollLikelyLayoutTriggered.current = false), []),
    500,
    );
    const raiseIsScrollLikelyLayoutTriggered = useCallback(() => {
    isScrollLikelyLayoutTriggered.current = true;
    debouncedLowerIsScrollLikelyLayoutTriggered();
    }, [debouncedLowerIsScrollLikelyLayoutTriggered]);

    const updateComment = useCallback(
    (commentValue: string, shouldDebounceSaveComment?: boolean) => {
    raiseIsScrollLikelyLayoutTriggered();

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 21, 2025
  5. changed the title [-]chat-@ mention suggestions not displayed on new line after emoji in edit comment[/-] [+][$250] chat-@ mention suggestions not displayed on new line after emoji in edit comment[/+] on Aug 21, 2025
  6. melvin-bot commented on Aug 21, 2025

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 21, 2025
  8. melvin-bot commented on Aug 21, 2025

    @melvin-bot

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

  9. mallenexpensify commented on Aug 21, 2025

    @mallenexpensify
    Contributor

    @thesahindia , I wasn't able to test on the Android phone at the bank and I'm not back there til Monday so added External. Can you please test, ideally on a physical device, and share details? Assuming you're able to reproduce, please review the above proposals. thx

  10. melvin-bot commented on Aug 26, 2025

    @melvin-bot

    @thesahindia Huh... This is 4 days overdue. Who can take care of this?

  11. 52 remaining items

  12. changed the title [-][$250] chat-@ mention suggestions not displayed on new line after emoji in edit comment[/-] [+][Due for payment 2025-10-21] [$250] chat-@ mention suggestions not displayed on new line after emoji in edit comment[/+] on Oct 14, 2025
  13. melvin-bot commented on Oct 14, 2025

    @melvin-bot

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

  14. melvin-bot commented on Oct 14, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.30-6 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 2025-10-21. 🎊

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

    • @NJ-2020 requires payment (Needs manual offer from BZ)
    • @thesahindia requires payment through NewDot Manual Requests
  15. melvin-bot commented on Oct 14, 2025

    @melvin-bot

    @thesahindia @mallenexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  16. mallenexpensify commented on Oct 22, 2025

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @NJ-2020 paid $250 via Upwork
    Contributor+: @thesahindia due $250 via NewDot

    @NJ-2020 can you please accept the job below? Please reply here and tag me once you have.

    @thesahindia plz complete the BZ checklist.

  17. NJ-2020 commented on Oct 23, 2025

    @NJ-2020
    Contributor

    @NJ-2020 can you please accept the job below? Please reply here and tag me once you have.

    @mallenexpensify Accepted, thanks.

  18. mallenexpensify commented on Oct 24, 2025

    @mallenexpensify
    Contributor

    @NJ-2020 paid, summary updated above.

    @thesahindia plz complete the BZ checklist.

  19. thesahindia commented on Oct 25, 2025

    @thesahindia
    Member

    BugZero Checklist:

    • [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: It was an edge case missed in the implementation

    • [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.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Open Expensify app on android
    2. Go to any chat
    3. Send an emoji
    4. Edit message/comment
    5. Add a few lines and type @
    6. Verify that the Mention Suggestions menu appears

    Do we agree 👍 or 👎

  20. mallenexpensify commented on Oct 27, 2025

    @mallenexpensify
    Contributor
  21. garrettmknight commented on May 21, 2026

    @garrettmknight
    Contributor

    $250 approved for @thesahindia

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions