Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

[$1000] Android - On first visit after login, app does not display emoji reaction in reply in thread main message #25902

Closed izarutskaya closed 1 year ago

izarutskaya commented 1 year ago

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


Action Performed:

  1. Open the app
  2. Open any report and add few reactions to any message
  3. Hover on that message and click on reply in thread
  4. Add any message in it
  5. Logout and again login
  6. Directly open reply in thread report of step 4 and observe that app does not display emojis in it

Expected Result:

App should display added reactions on visit to reply in thread report after login

Actual Result:

App should display added reactions on main message when we visit to reply in thread report first time after login

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: v1.3.57-0

Reproducible in staging?: Y

Reproducible in production?: Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/115492554/34545ab3-b481-4514-8f38-6bf638f04a5f

https://github.com/Expensify/App/assets/115492554/ca0ac297-7810-441a-aca0-9751ac5e808e

Expensify/Expensify Issue URL:

Issue reported by: @Dhanashree-Sawant

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691906944875479

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0184d2ee9438cd3144
  • Upwork Job ID: 1695163217342586880
  • Last Price Increase: 2023-08-25
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

b4s36t4 commented 1 year ago

Proposal

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

On first visit after login, app does not display emoji reaction in reply in thread main message

What is the root cause of that problem?

If we observe the flow clearly the we've added reactions in the main report which would come under report A's reportactions.

So whatever the info related to the reportaction would be saved under the Report A's info.

This only happens with the first message of a thread because that message is related to parent report.

After logout we won't be having any of parent report until parent report info saved into Onyx, because of that reactions would appear only after opening the parent report.

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

Maybe this can be backend but I don't think this needs backend intervention because I feel the system is designed the way it is and it's working good as well.

To solve this before opening any thread we should first get the info about the parentReportID.

Example here https://github.com/Expensify/App/blob/1f22dfed6448591493ecf1124ee3654fee74aec3/src/pages/home/report/ReportActionsView.js#L143 we could add a check like the following

// Fetch Parent Report before fetching the child report.
if(props.report.parentReportID){
    Report.openReport(props.reportParentID)
}

What alternative solutions did you explore? (Optional)

Updating backend to accept a new param parentReportID which will help backend to return reportActions_ onyx key so that it will sync with Onyx locally.

Result

https://github.com/Expensify/App/assets/59088937/289ad57e-952c-4b1b-a986-bee0b434b487

adelekennedy commented 1 year ago

🐛

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~0184d2ee9438cd3144

melvin-bot[bot] commented 1 year ago

Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

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

imranaalam commented 1 year ago

Problem Statement: On the first visit after login, the app does not display the emoji reaction in the reply of the thread's main message. This is due to the fact that the emoji reactions are stored in the parent report. When a user logs out and logs back in, the app doesn't have this parent report data loaded until it's explicitly fetched.

Proposed Solution: In the App/src/pages/home/report/ReportActionsView.js, add a condition that checks for the presence of a parentReportID for the thread's main message. If found, it opens the parent report to fetch its data:

if(props.report.parentReportID){
    Report.openReport(props.reportParentID);
}

Why this Solution Might Not Be Optimal:

  1. Performance Overhead: Fetching the entire parent report for one message's reactions can lead to a delay.
  2. Data Redundancy: Loading some of the same data twice if a user navigates to the parent report afterward.
  3. User Experience: A potential lag due to fetching an extensive parent report before accessing the desired thread.
  4. Network Costs: Fetching entire reports for limited data can be costly, especially for users on constrained data plans.
  5. Complexity: This approach can make the code harder to maintain due to added logic checks and unnecessary fetches.

More Optimal Solution:

  1. Backend Modification: Modify the backend to return the necessary reaction data for the first message of a thread, even when querying just that child report.
  2. Lazy Load Reactions: If a backend tweak isn't feasible, lazily load the reactions for the first message:
    useEffect(() => {
    if (props.report.parentReportID && !props.report.firstMessageReactionsLoaded) {
        Report.fetchReactionsForMessage(props.report.reportID, props.report.firstMessageID);
    }
    }, []);

    In the Report API handler:

    function fetchReactionsForMessage(reportID, messageID) {
    // Call to backend API to get reactions for a specific message by its ID and reportID
    }

    This solution fetches only the necessary reactions, making it efficient and modular, which allows for further optimizations and a better separation of concerns.

Contributor details Your Expensify account email: imranaalam@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~010d9646baeae737aa

melvin-bot[bot] commented 1 year ago

📣 @imranaalam! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
imranaalam commented 1 year ago

📣 @imranaalam! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Contributor details Your Expensify account email: imranaalam@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~010d9646baeae737aa

melvin-bot[bot] commented 1 year ago

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

adelekennedy commented 1 year ago

pending proposal review from @burczu

burczu commented 1 year ago

@adelekennedy I reviewed both proposals and tend to agree with @imranaalam and his Optimal Solution that this should be first updated on the backend side:

Backend Modification: Modify the backend to return the necessary reaction data for the first message of a thread, even when querying just that child report.

If we agree, I think we should change it to Internal. What do you think?

melvin-bot[bot] commented 1 year ago

Current assignee @burczu is eligible for the Internal assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @francoisl (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

adelekennedy commented 1 year ago

moved to internal

melvin-bot[bot] commented 1 year ago

@francoisl, @burczu, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

adelekennedy commented 1 year ago

@francoisl can you make the backend update suggested here or should we deprioritize for now?

francoisl commented 1 year ago

Yeah, finished the fix - just need to update tests for it. The internal PR should be ready for review tomorrow.

burczu commented 1 year ago

Just to inform: I'll be OOO on Thursday and Friday (7-8 September).

francoisl commented 1 year ago

Backend fix was deployed to production yesterday. @adelekennedy I think we'll need to compensate for reporting the issue?

adelekennedy commented 1 year ago

I think reporting and C+?

melvin-bot[bot] commented 1 year ago

@francoisl, @burczu, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

adelekennedy commented 1 year ago

Payouts due:

Issue Reporter: $250 @dhanashree-sawant Upwork Eligible for 50% #urgency bonus? N

Upwork job is here.

burczu commented 1 year ago

@adelekennedy I'm not eligible for payment here - I'm a contractor from Callstack.

dhanashree-sawant commented 1 year ago

Thanks @adelekennedy, I have accepted the offer.

imranaalam commented 1 year ago

Report on Transitioning Expensify Issue from External to Internal: Consideration for Partial Compensation to Community Contributors

Introduction: The transition of an issue from an external to an internal status in Expensify raises concerns about community engagement and motivation. While it is acknowledged that moving an issue internally may be necessary for various reasons, this report explores the potential benefits of providing partial compensation to the community members who initially contributed to the issue. This approach aims to maintain community morale and incentivize future contributions.

Background: Expensify is a platform where users and community members actively engage in issue reporting and problem-solving. In some cases, issues initially opened to the external community may be reclassified as internal, limiting the visibility to external contributors.

Benefits of Transitioning to Internal: Transitioning an issue to an internal status can be beneficial for several reasons:

  1. Focused Problem Resolution: It allows the internal team to concentrate on the issue without external distractions.
  2. Confidentiality: Certain issues may involve sensitive information that needs to be protected.
  3. Streamlined Communication: Internal discussions can be more efficient and tailored to the team's needs.
  4. Resource Allocation: It enables better resource allocation for issue resolution.

Challenges with Transitioning to Internal: While the decision to move an issue internally is often the right one, it poses some challenges:

  1. Community Disengagement: External contributors may feel disheartened when their contributions are no longer visible or considered.
  2. Loss of Motivation: The lack of recognition and engagement may discourage future community efforts.
  3. Reduced Collaboration: Community members may hesitate to participate if they perceive a risk of their efforts being "lost."

Proposed Approach: To mitigate the challenges mentioned above, we propose considering partial compensation for community contributors when an issue transitions from external to internal. This approach can offer several advantages:

  1. Recognition and Incentive: Providing partial compensation acknowledges the efforts of the community contributors and incentivizes future participation.
  2. Positive Community Relations: It fosters goodwill and maintains a positive relationship with the community.
  3. Enhanced Future Contributions: The prospect of compensation can motivate community members to continue contributing valuable insights and reports.
  4. Retaining Community Trust: Compensation demonstrates that their contributions are valued, even if not immediately actionable.

Implementation Details: Implementing this approach requires defining criteria for compensation, such as the significance of the issue, the quality of the report, or the level of community involvement. Compensation can be in the form of credits, recognition, or other tangible benefits.

Conclusion: Transitioning an issue from external to internal is sometimes necessary for efficient resolution, but it should not come at the cost of community engagement and motivation. Offering partial compensation to community contributors is a proactive approach that recognizes their efforts, fosters goodwill, and encourages ongoing participation. This approach not only benefits the community but also contributes to maintaining a positive image and strong relations between Expensify and its dedicated user base.

bug reporting and fixing policy review

imranaalam commented 1 year ago

Proposal for a Survey to Address the Bug Policy Issue

Introduction: The identification of a bug in our current policy, which may potentially result in a slower pace of bug fixing, is a matter of significant concern. To comprehensively assess the validity of this issue and explore potential solutions, we propose conducting a survey. This survey aims to gather insights from contributors and users to determine if the policy needs adjustments and, if so, how to address it effectively.

Survey Objectives: The primary objectives of this survey are as follows:

  1. Validate the Issue: Confirm whether there is a genuine concern regarding the bug policy impacting bug-fixing efficiency.
  2. Identify Specific Concerns: Understand the specific aspects of the policy that contributors and users find problematic.
  3. Gauge Community Feedback: Collect feedback from the community, including contributors and users, to ensure their voices are heard.
  4. Propose Solutions: Based on the survey results, propose effective solutions or adjustments to the policy that address the identified concerns.

Survey Structure: The survey will consist of a series of questions designed to achieve the objectives mentioned above. The questions will cover topics such as:

Survey Distribution: The survey will be distributed among the following groups:

  1. Contributors: Individuals who actively report bugs and contribute to issue resolution.
  2. Users: Individuals who use our product but may not necessarily contribute to issue reporting.
  3. Bloggers and Community Members: Those who have publicly expressed concerns about the bug policy.

Survey Analysis: Upon collecting survey responses, the data will be thoroughly analyzed to identify common themes, concerns, and potential solutions. This analysis will serve as the basis for further action.

Follow-Up Actions: Based on the survey findings, the following actions can be taken:

  1. Policy Adjustments: If the survey confirms issues with the bug policy, consider making specific adjustments to address the concerns.
  2. Communication: Communicate the survey results and any proposed policy changes to the community.
  3. Feedback Loop: Establish a feedback loop to continuously gather input from contributors and users to ensure ongoing policy improvements.

Conclusion: Conducting a survey to address the bug policy issue is a proactive step toward ensuring the efficiency of our bug-fixing process and maintaining a positive relationship with our community. By involving contributors, users, and concerned bloggers, we can collectively work towards a solution that benefits all stakeholders and improves the overall bug-fixing experience.

imranaalam commented 1 year ago

Bug Policy Feedback Survey


Introduction: Thank you for taking the time to participate in this survey. Your feedback is crucial in helping us assess our current bug policy and make necessary improvements. Please answer the questions honestly and provide as much detail as possible.


Demographics (Optional):

  1. What is your age range?

    • [ ] Under 18
    • [ ] 18-24
    • [ ] 25-34
    • [ ] 35-44
    • [ ] 45-54
    • [ ] 55+
  2. How do you primarily engage with our platform?

    • [ ] Contributor (actively report bugs)
    • [ ] User (use the product without active contribution)
    • [ ] Blogger or community member (publicly discuss the platform)

Bug Policy Experience:

  1. On a scale of 1-10, how familiar are you with our current bug policy? (1 being not familiar at all, 10 being extremely familiar)

    • [ ] 1
    • [ ] 2
    • [ ] 3
    • [ ] ...
    • [ ] 10
  2. Have you ever felt that our bug policy affected the pace of bug fixing?

    • [ ] Yes
    • [ ] No
    • [ ] Unsure

    If yes, please describe the situation:

    [Text box for detailed answer]

  3. Have you encountered instances where bugs remained open or unresolved due to the current policy?

    • [ ] Yes
    • [ ] No
    • [ ] Unsure

    If yes, please provide specific examples:

    [Text box for detailed answer]


Suggestions and Feedback:

  1. What aspects of the current bug policy do you believe need improvement or modification?

    [Text box for detailed answer]

  2. If you could suggest one major change to the bug policy, what would it be?

    [Text box for detailed answer]

  3. Are there any other policies or practices you believe contribute to delays in bug fixing?

    [Text box for detailed answer]


Additional Comments:

  1. Please provide any additional feedback, comments, or concerns you have regarding our bug policy or any other related topic.

    [Text box for detailed answer]


Closure: Thank you for your valuable feedback! We are committed to improving our processes and ensuring a better experience for all stakeholders.


[SUBMIT BUTTON]


melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

@francoisl, @burczu, @adelekennedy 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

francoisl commented 1 year ago

@dhanashree-sawant did you receive the payment for this? @adelekennedy is OOO this week, but if you received it then I think we can close this.

dhanashree-sawant commented 1 year ago

Hi @francoisl, yes I have received the payment, we can close this