Skip to content

[Due for payment 2025-03-31] [$500][HIGH] Hybrid - Green/red dot on 'Inbox' disappear after close and open the app again. #58322

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: v9.1.12-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): testexpensify9+00008@gmail.com
Issue reported by: Applause Internal Team
Device used: Samsung A15, Android 14 | iPhone SE 3rd generation (2022), iOS 18.3.1
App Component: Other

Action Performed:

  1. Open Hybrid app
  2. Loggin
  3. Close the app & open it again
  4. Tap on 'Reports' (the green/red dot is shown on 'Inbox' button)
  5. Tap on 'Settings'

Expected Result:

The green/red button should be displayed

Actual Result:

The green/red button is not shown (Until the user opens any expense that has a pending action).

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6769014_1741808265704.SkreenRecording_03-12-2025_16-27-53_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021900188126174179653
  • Upwork Job ID: 1900188126174179653
  • Last Price Increase: 2025-03-13
Issue OwnerCurrent Issue Owner: @allroundexperts

Activity

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

    @melvin-bot

    Triggered auto assignment to @NicMendonca (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. bernhardoj commented on Mar 13, 2025

    @bernhardoj
    Contributor

    Proposal

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

    The GBR doesn'st show on Home tab bottom tab icon.

    What is the root cause of that problem?

    The GBR will show if getChatTabBrickRoad returns info.

    useEffect(() => {
    setChatTabBrickRoad(getChatTabBrickRoad(activeWorkspaceID, orderedReportIDs));

    But in our case, it's undefined. It gets the value by iterating over all report that is shown in LHN and check if a report has GBR or not.

    const allReports = orderedReportIDs.map((reportID) => reportsCollection?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]);
    // If policyID is undefined, then all reports are checked whether they contain any brick road
    const policyReports = policyID ? Object.values(allReports).filter((report) => report?.policyID === policyID) : Object.values(allReports);
    let reportWithGBR: OnyxEntry<Report>;
    const reportWithRBR = policyReports.find((report) => {
    const brickRoad = report ? getBrickRoadForPolicy(report) : undefined;
    if (!reportWithGBR && brickRoad === CONST.BRICK_ROAD_INDICATOR_STATUS.INFO) {
    reportWithGBR = report;
    return false;
    }
    return brickRoad === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
    });
    if (reportWithRBR) {
    return reportWithRBR;
    }
    if (reportWithGBR) {
    return reportWithGBR;
    }
    return undefined;

    However, the policyReports contains undefined collection. orderedReportIDs contains valid reportID values, but when retrieving it from reportsCollection, we get undefined. It's because the reportsCollection isn't available yet.

    let reportsCollection: OnyxCollection<Report>;
    Onyx.connect({
    key: ONYXKEYS.COLLECTION.REPORT,
    waitForCollectionCallback: true,
    callback: (value) => {
    reportsCollection = value;
    },
    });

    It has the same root cause as #56158 (comment).

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

    I will propose the same main solution as #56158 (comment).

    Instead of passing the list of reportIDs, we can directly pass the list of reports.

    const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {selector: (values) => {
        const newReports = {};
        orderedReportIDs.forEach((reportID) => {
            newReports[reportID] = values?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
        })
        return newReports;
    }});
    ...
    setChatTabBrickRoad(getChatTabBrickRoad(activeWorkspaceID, reports));
    

    We won't need the allReports anymore because we will use the report collection from the param.

    function getChatTabBrickRoadReport(policyID: string | undefined, orderedReportIDs: string[] = []): OnyxEntry<Report> {
    if (!orderedReportIDs.length) {
    return undefined;
    }
    const allReports = orderedReportIDs.map((reportID) => reportsCollection?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]);
    // If policyID is undefined, then all reports are checked whether they contain any brick road
    const policyReports = policyID ? Object.values(allReports).filter((report) => report?.policyID === policyID) : Object.values(allReports);

    For the alternative solution, it's the same as the other issue I linked above.

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

    N/A

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 13, 2025
  5. changed the title [-]Hybrid - Green/red dot on 'Inbox' disappear after close and open the app again.[/-] [+][$250] Hybrid - Green/red dot on 'Inbox' disappear after close and open the app again.[/+] on Mar 13, 2025
  6. melvin-bot commented on Mar 13, 2025

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

    @melvin-bot

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

  9. changed the title [-][$250] Hybrid - Green/red dot on 'Inbox' disappear after close and open the app again.[/-] [+][$250][HIGH] Hybrid - Green/red dot on 'Inbox' disappear after close and open the app again.[/+] on Mar 13, 2025
  10. mallenexpensify commented on Mar 13, 2025

    @mallenexpensify
    Contributor

    Added status of HIGH cuz I suspect this affects most-all users (even though I never look at the dots at the bottom of the app)

  11. 27 remaining items

  12. melvin-bot commented on Mar 31, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@NicMendonca)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1900188126174179653/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  13. bernhardoj commented on Mar 31, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  14. NicMendonca commented on Mar 31, 2025

    @NicMendonca
    Contributor

    @allroundexperts bump on the checklist please!

  15. NicMendonca commented on Mar 31, 2025

    @NicMendonca
    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 (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:

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

    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

    Precondition:

    Test:

    Do we agree 👍 or 👎

  16. melvin-bot commented on Apr 3, 2025

    @melvin-bot

    @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. allroundexperts commented on Apr 3, 2025

    @allroundexperts
    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 (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: https://github.com/Expensify/App/pull/53852/files#r2026553073

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

    Regression Test Proposal

    Precondition:

    • Have an outstanding action on a report (money request, task, errors, etc.). As an example, this can be an error asking for receipt upload.

    Test:

    1. Close and reopen the app/Refresh the web.

    Verify there is a GBR/RBR on the inbox bottom tab

    Do we agree 👍 or 👎

  18. NicMendonca commented on Apr 4, 2025

    @NicMendonca
    Contributor

    Payment Summary

  19. JmillsExpensify commented on Apr 9, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  20. JmillsExpensify commented on Jun 13, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @allroundexperts

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