Skip to content

[Due for payment 2025-10-21] [$250] Report - "New Messages" badge appears briefly on report with new system messages #71962

Closed

Description

@jponikarchuk

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.2.24-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-1160/folder/13176910/41237479/936933725
Email or phone of affected tester (no customers): ibellicotest+1896@gmail.com
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 / Android 12 / Chrome ( mWeb)
App Component: Money Requests

Action Performed:

Prerequisite: Account has at least one workspace.

  1. Open the staging.new.expensify.com website.
  2. Navigate to workspace chat.
  3. Create a manual expense.
  4. Long tap on the expense preview and hold the expense.
  5. Long tap on preview again, and remove hold from expense.
  6. Open the report.
  7. Note that "New Messages" badge appears briefly on top of report.
  8. Scroll to the bottom of the report and return to the top.
  9. Note that now, badge remains displayed.

Expected Result:

"New Messages" badge on transaction thread, should remain displayed when the new messages are not visible.

Actual Result:

"New Messages" badge on transaction thread, only appears briefly when there are new system messages on report. Badge only remain displayed after scrolling to the bottom of report and returning to the top.

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

11.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021975571349168699803
  • Upwork Job ID: 1975571349168699803
  • Last Price Increase: 2025-10-07
  • Automatic offers:
    • nkdengineer | Contributor | 109079975
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @joekaufmanexpensify

Activity

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

    @melvin-bot

    Triggered auto assignment to @joekaufmanexpensify (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. nkdengineer commented on Oct 7, 2025

    @nkdengineer
    Contributor

    Proposal

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

    "New Messages" badge on transaction thread, only appears briefly when there are new system messages on report. Badge only remain displayed after scrolling to the bottom of report and returning to the top.

    What is the root cause of that problem?

    when users hold/unhold the request, we'll add the new system messages in the transaction report, users haven't seen this message yet so when they go to the transaction report, isFloatingMessageCounterVisible will be true

    and we also have the logic to set it to false when the page is mounted in

    setIsFloatingMessageCounterVisible(false);

    so the New messages badge disappear

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

    setIsFloatingMessageCounterVisible(false) should be called along with reportScrollManager.scrollToBottom(); like what we did in

    setIsFloatingMessageCounterVisible(false);
    reportScrollManager.scrollToBottom();

    setIsFloatingMessageCounterVisible(false);
    reportScrollManager.scrollToBottom();

    and other places, so we should move

    setIsFloatingMessageCounterVisible(false);

    to

    if (!shouldScrollToEndAfterLayout) {

    if (!shouldScrollToEndAfterLayout) {
                    setIsFloatingMessageCounterVisible(false);
                    reportScrollManager.scrollToBottom();
                }
    

    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)

    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. changed the title [-]Report - "New Messages" badge appears briefly on report with new system messages[/-] [+][$250] Report - "New Messages" badge appears briefly on report with new system messages[/+] on Oct 7, 2025
  5. melvin-bot commented on Oct 7, 2025

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

    @melvin-bot

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

  8. dmkt9 commented on Oct 8, 2025

    @dmkt9
    Contributor

    Proposal

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

    "New Messages" badge on transaction thread, only appears briefly when there are new system messages on report. Badge only remain displayed after scrolling to the bottom of report and returning to the top.

    What is the root cause of that problem?

    1. Since ReportActionsList is now rendered at the top when isTransactionThreadReport or isMoneyRequestOrInvoiceReport is true:

      {shouldScrollToEndAfterLayout && topReportAction ? renderTopReportActions() : undefined}

    2. By default, the list is rendered at the bottom, so the "New messages" badge will be manually disabled here:

      InteractionManager.runAfterInteractions(() => {
      setIsFloatingMessageCounterVisible(false);
      if (!shouldScrollToEndAfterLayout) {
      reportScrollManager.scrollToBottom();
      }
      });

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

    • If FlatList is rendered at the top, we don’t need to manually disable the "New messages" badge
    • If FlatList is rendered at the bottom, the "New messages" badge is never enabled
      Therefore, we should remove this useEffect:
      useEffect(() => {
      if (linkedReportActionID) {
      return;
      }
      // eslint-disable-next-line deprecation/deprecation
      InteractionManager.runAfterInteractions(() => {
      setIsFloatingMessageCounterVisible(false);
      if (!shouldScrollToEndAfterLayout) {
      reportScrollManager.scrollToBottom();
      }
      });
      // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
      }, []);

    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.

  9. self-assigned this
    on Oct 9, 2025
  10. 22 remaining items

  11. joekaufmanexpensify commented on Oct 21, 2025

    @joekaufmanexpensify
    Contributor

    Bumped checklist in Slack. Will issue payment as soon as that's done.

  12. rojiphil commented on Oct 22, 2025

    @rojiphil
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    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
    • 2b. Reported on staging (deploy blocker)
    • 2c. 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:

    • [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: Not Required. The existing checklist is good enough to capture such issues.

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

    Precondition:

    • Account has at least one workspace.

    Test:

    1. Navigate to workspace chat.
    2. Create a manual expense.
    3. Long tap on the expense preview and hold the expense.
    4. Long tap on preview again, and remove hold from expense.
    5. Open the report.
    6. Verify that "New Messages" badge appears on top of report when new messages are not visible.

    Do we agree 👍 or 👎

  13. rojiphil commented on Oct 22, 2025

    @rojiphil
    Contributor

    @joekaufmanexpensify BZ Checklist done. Thanks.

  14. joekaufmanexpensify commented on Oct 22, 2025

    @joekaufmanexpensify
    Contributor
  15. joekaufmanexpensify commented on Oct 22, 2025

    @joekaufmanexpensify
    Contributor

    Payment Summary

  16. joekaufmanexpensify commented on Oct 22, 2025

    @joekaufmanexpensify
    Contributor

    @nkdengineer could you please accept this offer so we can pay you?

  17. nkdengineer commented on Oct 22, 2025

    @nkdengineer
    Contributor

    @joekaufmanexpensify I will request payment via NewDot. Please help update the payment summary to indicate that. Then we're good to close here.

  18. joekaufmanexpensify commented on Oct 22, 2025

    @joekaufmanexpensify
    Contributor

    Nice. I confirmed internally that @nkdengineer's NewDot payments eligibility date is before they were hired for this role, so we are good to pay them via NewDot.

  19. joekaufmanexpensify commented on Oct 22, 2025

    @joekaufmanexpensify
    Contributor

    @nkdengineer @rojiphil Please request payment at your earliest convenience. Closing as this is otherwise all set.

  20. JmillsExpensify commented on Oct 27, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @nkdengineer

  21. trjExpensify commented on Nov 10, 2025

    @trjExpensify
    Contributor

    approved $250 for @rojiphil.

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

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions