Skip to content

[Due for payment 2025-05-20] [$250] Onboarding - Onboarding tasks in #admins room are grayed out in offline mode #60833

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.32-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N
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): jsdijsojdsosjo@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with a new Gmail account
  3. Click Skip on Work email step
  4. Select Manage my team's expenses
  5. Select 1-10 employees
  6. Select any accounting > Continue
  7. Go to #admins
  8. Send a message
  9. Wait for a while
  10. Go offline

Expected Result:

All the content in #admins room will not be grayed out in offline mode

Actual Result:

Onboarding tasks in #admins room are grayed out in offline mode

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6811727_1745505083449.20250424_222353.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021915751970400646068
  • Upwork Job ID: 1915751970400646068
  • Last Price Increase: 2025-04-25
  • Automatic offers:
    • Krishna2323 | Contributor | 107095230
Issue OwnerCurrent Issue Owner: @dylanexpensify

Activity

  1. added
    Bug
    Daily
    on Apr 24, 2025
  2. melvin-bot commented on Apr 24, 2025

    @melvin-bot

    Triggered auto assignment to @dylanexpensify (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 Apr 24, 2025

    @nkdengineer
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-04-24 14:59:33 UTC.

    Proposal

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

    Onboarding tasks in #admins room are grayed out in offline mode

    What is the root cause of that problem?

    We don't update isOptimisticAction to false in successData for onboarding task action then the pendingAction is add here which causes the task action still be grayed out even when the API is done.

    pendingAction={
    draftMessage !== undefined ? undefined : action.pendingAction ?? (action.isOptimisticAction ? CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD : undefined)
    }

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

    We should update isOptimisticAction to false for task success data here. We can do the same for failure data if need.

    const tasksForSuccessData = tasksData.reduce<OnyxUpdate[]>((acc, {currentTask, taskCreatedAction, taskReportAction, completedTaskReportAction}) => {

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

    Test completeOnboarding API and verify isOptimisticAction is updated to false after the API is success

    What alternative solutions did you explore? (Optional)

    We can remove action.isOptimisticAction ? CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD here since if the action has no pendingAction it means it's not an optimistic action anymore and shouldn't have offline feedback in this case.

    pendingAction={
    draftMessage !== undefined ? undefined : action.pendingAction ?? (action.isOptimisticAction ? CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD : undefined)
    }

    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. Krishna2323 commented on Apr 24, 2025

    @Krishna2323
    Contributor

    Proposal

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

    Onboarding - Onboarding tasks in #admins room are grayed out in offline mode

    What is the root cause of that problem?

    • The isOptimisticAction for tasks, textComment and welcomeSignOffCommentAction is not set to null in the success data.

      App/src/libs/ReportUtils.ts

      Lines 9709 to 9718 in 19dbb47

      const currentTask = buildOptimisticTaskReport(
      actorAccountID,
      targetChatReportID,
      currentUserAccountID,
      taskTitle,
      taskDescription,
      targetChatPolicyID,
      CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
      task.mediaAttributes,
      );

      App/src/libs/ReportUtils.ts

      Lines 9672 to 9673 in 19dbb47

      const textComment = buildOptimisticAddCommentReportAction(message, undefined, actorAccountID, 1);
      const textCommentAction: OptimisticAddCommentReportAction = textComment.reportAction;

      App/src/libs/ReportUtils.ts

      Lines 9745 to 9746 in 19dbb47

      const welcomeSignOffComment = buildOptimisticAddCommentReportAction(welcomeSignOffText, undefined, actorAccountID, tasksData.length + 3);
      const welcomeSignOffCommentAction: OptimisticAddCommentReportAction = welcomeSignOffComment.reportAction;

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

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

    We can test the completeOnboarding api and verify that the message are not greyed out on api success

    What alternative solutions did you explore? (Optional)

    N/A

    Result

  5. added
    External
    on Apr 25, 2025
  6. changed the title [-]Onboarding - Onboarding tasks in #admins room are grayed out in offline mode[/-] [+][$250] Onboarding - Onboarding tasks in #admins room are grayed out in offline mode[/+] on Apr 25, 2025
  7. melvin-bot commented on Apr 25, 2025

    @melvin-bot
  8. added
    Help Wanted
    on Apr 25, 2025
  9. melvin-bot commented on Apr 25, 2025

    @melvin-bot

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

  10. Krishna2323 commented on Apr 25, 2025

    @Krishna2323
    Contributor

    PROPOSAL UPDATED

    • Added one more reference where we need to add isOptimisticAction: null and fixed a typo.
  11. jayeshmangwani commented on Apr 28, 2025

    @jayeshmangwani
    Contributor

    @Krishna2323 's proposal looks good to me. I agree that onboarding company size message and the welcomeSignOffTitleManageTeam should also not be greyed out when offline, along with the tasks.

    🎀 👀 🎀 C+ reviewed

  12. 14 remaining items

  13. removed
    Reviewing
    on May 13, 2025
  14. melvin-bot commented on May 13, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-8 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-05-20. 🎊

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

  15. melvin-bot commented on May 13, 2025

    @melvin-bot

    @jayeshmangwani @dylanexpensify @jayeshmangwani 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. added
    Daily
    and removed
    Weekly
    on May 20, 2025
  17. jayeshmangwani commented on May 20, 2025

    @jayeshmangwani
    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: Create report flow follow ups #59386

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

    1. Log in with a new account.
    2. Click Skip on the Work email step.
    3. Select Manage my team’s expenses.
    4. Choose 1–10 employees.
    5. Select any accounting option, then click Continue.
    6. Go to #admins.
    7. Send a message.
    8. Wait for a while.
    9. Go offline.
    10. Verify that the message starting with Here is a task list I’d recommend for a company of your size is not greyed out.
    11. Verify that the tasks are not greyed out.
    12. Verify that the message starting with We can explore more features such as is not greyed out.

    Do we agree 👍 or 👎

  18. melvin-bot commented on May 23, 2025

    @melvin-bot

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

  19. jayeshmangwani commented on May 26, 2025

    @jayeshmangwani
    Contributor

    @dylanexpensify This issue is ready for payout and can then be closed.

  20. melvin-bot commented on May 27, 2025

    @melvin-bot

    @dylanexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  21. dylanexpensify commented on May 28, 2025

    @dylanexpensify
    Contributor

    Payment summary:

    Contributor: @Krishna2323 $250 via Upwork
    Contributor+: @jayeshmangwani $250 via NewDot

    Please apply/request!

  22. dylanexpensify commented on May 28, 2025

    @dylanexpensify
    Contributor

    done!

  23. garrettmknight commented on Jun 5, 2025

    @garrettmknight
    Contributor

    $250 approved for @jayeshmangwani

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