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.34k stars 2.77k forks source link

[$250] [Performance] Request permission and store cached receipts in camera roll when using clear cache and restart #49085

Open muttmuure opened 6 days ago

muttmuure commented 6 days 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!


What performance issue do we need to solve?

When multiple requests fail and jam up the sequential queue for several minutes (which is being investigated and fixed) the fastest way to GSD again is to use Clear cache and restart in the Troubleshoot menu.

The byproduct of doing this is that if you have any messages or receipt uploads waiting for their request to process, they are lost when you hit that button.

What is the impact of this on end-users?

Users lose their receipt images.

List any benchmarks that show the severity of the issue

Please also provide exact steps taken to collect metrics above if any so we can independently verify the results.

N/A

Proposed solution (if any)

Please list out the steps you think we should take to solve this issue.

Ask the end user for permission to store all pending receipt uploads to their phone's camera roll, add the receipts to the camera roll, and automatically add them to the camera roll next time.

List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)

Note: These should be the same as the benchmarks collected before any changes.

Platforms:

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

Version Number: Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL: Issue reported by: @JmillsExpensify Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1726082473000159?thread_ts=1726059136.088489&cid=C05LX9D6E07

View all open jobs on Upwork

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834242849711510101
  • Upwork Job ID: 1834242849711510101
  • Last Price Increase: 2024-09-12
Issue OwnerCurrent Issue Owner: @mananjadhav
melvin-bot[bot] commented 6 days ago

Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext.

melvin-bot[bot] commented 6 days ago

Triggered auto assignment to @isabelastisser (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

melvin-bot[bot] commented 6 days ago

Triggered auto assignment to @strepanier03 (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.

melvin-bot[bot] commented 6 days ago

:warning: It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time :warning:

melvin-bot[bot] commented 6 days ago

Triggered auto assignment to Design team member for new feature review - @dannymcclain (NewFeature)

melvin-bot[bot] commented 6 days ago

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

melvin-bot[bot] commented 6 days ago

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

melvin-bot[bot] commented 20 hours ago

@mananjadhav, @dannymcclain, @strepanier03, @isabelastisser Huh... This is 4 days overdue. Who can take care of this?

isabelastisser commented 19 hours ago

Waiting for proposals.

TMisiukiewicz commented 8 hours ago

I'm Tomasz from Callstack and I'd like to work on this issue

TMisiukiewicz commented 1 hour ago

@muttmuure I initially explored persisting the networkRequestQueue while clearing the Onyx state, as it seemed like a quicker solution. The request queue holds the locally cached image paths, so pending receipts remain persistent. Once the state is cleared and the queue is processed, the receipts are handled correctly.

Would this solution be sufficient, or are you specifically looking to store the scanned receipts in the camera roll?

muttmuure commented 1 hour ago

yes I think that would work too

TMisiukiewicz commented 1 hour ago

thanks, I'll work on a PR with that change 👍