Skip to content

[Due for payment 2025-09-19] [$250] mWeb - Chat - Chat doesn't auto-scroll when a payment is received with chat opened #65792

Closed

Description

@lanitochka17

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: 9.1.78-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

Precondition: Log in with two different accounts (User A,User B)

  1. Go to the testing website https://staging.new.expensify.com/
  2. User A: Open a chat with User B
  3. User A: Send some messages to make the chat scrollable
  4. User B, Open a chat with User A
  5. User B, Tap on the "+" button
  6. User B, Select "Pay User A" option
  7. User B, Complete the payment flow and submit it.

Expected Result:

User A verifies that the expense appears in the chat and the chat is scrolled to the bottom

Actual Result:

User A verifies that the chat doesn't auto-scroll when a payment is received, and the payment preview isn't visible without manually scrolling down

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6868942_1750805996901.User_A.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021970190044341975545
  • Upwork Job ID: 1970190044341975545
  • Last Price Increase: 2025-09-22

Activity

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

    @melvin-bot

    Triggered auto assignment to @garrettmknight (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. dmkt9 commented on Jul 10, 2025

    @dmkt9
    Contributor

    Proposal

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

    User A verifies that the chat doesn't auto-scroll when a payment is received, and the payment preview isn't visible without manually scrolling down

    What is the root cause of that problem?

    Currently only implements the scrollToBottom mechanism when an action is removed but not added:

    if (
    scrollingVerticalOffset.current < AUTOSCROLL_TO_TOP_THRESHOLD &&
    previousLastIndex.current !== lastActionIndex &&
    reportActionSize.current > sortedVisibleReportActions.length &&
    hasNewestReportAction
    ) {
    setIsFloatingMessageCounterVisible(false);
    reportScrollManager.scrollToBottom();
    }

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

    • Add scrollToBottom mechanism when detecting a new action added:
      if (
      scrollingVerticalOffset.current < AUTOSCROLL_TO_TOP_THRESHOLD &&
      previousLastIndex.current !== lastActionIndex &&
      reportActionSize.current > sortedVisibleReportActions.length &&
      hasNewestReportAction
      ) {
    if (
        scrollingVerticalOffset.current < AUTOSCROLL_TO_TOP_THRESHOLD &&
        previousLastIndex.current !== lastActionIndex &&
        reportActionSize.current !== sortedVisibleReportActions.length &&
        hasNewestReportAction
    ) {
    • If we only want scrollToBottom with the same account, we will add the check const isFromCurrentUser = lastAction?.childLastActorAccountID ?? lastAction?.childOwnerAccountID ?? CONST.REPORT.OWNER_ACCOUNT_ID_FAKE === currentUserAccountID
    • If we only want to handle the IOU case, we can add a condition to the if clause.

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

    NA

    What alternative solutions did you explore? (Optional)

    NA

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 11, 2025
  5. changed the title [-]mWeb - Chat - Chat doesn't auto-scroll when a payment is received with chat opened[/-] [+][$250] mWeb - Chat - Chat doesn't auto-scroll when a payment is received with chat opened[/+] on Jul 11, 2025
  6. melvin-bot commented on Jul 11, 2025

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

    @melvin-bot

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

  9. melvin-bot commented on Jul 15, 2025

    @melvin-bot

    @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  10. c3024 commented on Jul 15, 2025

    @c3024
    Contributor

    Will update today.

  11. 98 remaining items

  12. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 22, 2025
  13. melvin-bot commented on Sep 22, 2025

    @melvin-bot

    📣 @dmkt9 You have been assigned to this job!
    Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
    Keep in mind: Code of Conduct | Contributing 📖

  14. garrettmknight commented on Sep 22, 2025

    @garrettmknight
    Contributor

    @dmkt9 please apply!

  15. dmkt9 commented on Sep 23, 2025

    @dmkt9
    Contributor

    @garrettmknight Thanks. I have just applied for the job.

  16. garrettmknight commented on Sep 23, 2025

    @garrettmknight
    Contributor

    Offer is out

  17. garrettmknight commented on Sep 23, 2025

    @garrettmknight
    Contributor

    @DylanDylann checklist please.

  18. DylanDylann commented on Sep 25, 2025

    @DylanDylann
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug: Looks like this is a new requirement
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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: Looks like this is a new requirement

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

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

    Regression Test Proposal

    Precondition: Log in with two different accounts (User A,User B)

    Test:

    1. Go to the testing website https://staging.new.expensify.com/
    2. User A: Open a chat with User B
    3. User A: Send some messages to make the chat scrollable
    4. User A: Scroll down to the bottom of the conversation
    5. User B, Open a chat with User A
    6. User B, Tap on the "+" button
    7. User B, Select "Pay User A" option
    8. User B, Complete the payment flow and submit it.
    9. User A verifies that the expense appears in the chat and the chat is scrolled to the bottom

    Do we agree 👍 or 👎

  19. garrettmknight commented on Sep 29, 2025

    @garrettmknight
    Contributor

    Payment Summary

    Contributor: @dmkt9 paid $250 via Upwork
    Contributor+: @DylanDylann due $250 via NewDot

  20. garrettmknight commented on Nov 11, 2025

    @garrettmknight
    Contributor

    $250 approved for @DylanDylann

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

Metadata

Metadata

Labels

BugSomething 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