Repository navigation
[HOLD for payment 2024-03-14] [$500] [MEDIUM] Smartscan: Show PDF receipt thumbnails #31432
Description
Coming from here. CC: @sobitneupane @pradeepmdk @Gonals
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: v1.3.98-5
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
Expensify/Expensify Issue URL:
Issue reported by: @trjExpensify
Slack conversation: #30747 (comment)
Action Performed:
- Request Money > Scan > Upload a PDF receipt > choose a participant
- Observe there isn't a preview of the PDF receipt in the thumbnail on the confirmation page
- Click confirm to create the request
- Observe there isn't a preview of the PDF receipt in the thumbnail on the report preview component in the chat
- Click the report preview component
- Observe there isn't a preview of the PDF receipt in the thumbnail on the request preview component in the expense/iouReport
- Click the request preview component
- Observe there isn't a preview of the PDF receipt in the thumbnail on the receipt preview component in the request view
Expected Result:
PDF receipts should show a preview in the relevant thumbnails throughout the app.
P.s this also includes in the split preview component, so let's make sure it works there.
Actual Result:
Generic "empty" thumbnail previews are displayed for PDF receipts.
Workaround:
Yes, they can tap the thumbnail to see the PDF but they'd really not know to do that.
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android: Native
- Android: mWeb Chrome
- iOS: Native
- iOS: mWeb Safari
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Request preview on the expense/iouReport:

Receipt preview on the request:

Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01f90fbd2f6a7c49f2
- Upwork Job ID: 1725113274629943296
- Last Price Increase: 2023-11-23
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsMEDIUM
- StatusShow more project fieldsDone


Activity
melvin-bot commentedon Nov 16, 2023
Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.
[-][SMARTSCAN] Show PDF receipt thumbnails[/-][+][$500] [SMARTSCAN] Show PDF receipt thumbnails[/+]melvin-bot commentedon Nov 16, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01f90fbd2f6a7c49f2
melvin-bot commentedon Nov 16, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 16, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (
External)tienifr commentedon Nov 16, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Show PDF receipt thumbnails
What is the root cause of that problem?
We're getting thumbnail for receipt here
App/src/libs/ReceiptUtils.ts
Line 31 in 69a3358
We do not have the logic to get the thumbnail of pdf
-> Default image is shown
What changes do you think we should make in order to solve the problem?
We can lean on the source to get the thumbnail for pdf.
Here's the sample source
https://www.expensify.com/receipts/{id}.pdf-> the thumbnail should behttps://www.expensify.com/receipts/{id}.jpg.1024.jpgWhat alternative solutions did you explore? (Optional)
BE will return the thumbnail and use it to shown on FE side
Result
Screen.Recording.2023-11-16.at.18.56.52.mov
[-][$500] [SMARTSCAN] Show PDF receipt thumbnails[/-][+][$500] [SMARTSCAN] MEDIUM: Show PDF receipt thumbnails[/+]205 remaining items
melvin-bot commentedon Mar 7, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
s77rt commentedon Mar 8, 2024
Regression Test Proposal
eh2077 commentedon Mar 12, 2024
Hi @trjExpensify
Considering the added time and complexity of completing this task, could we discuss the possibility of a bonus for me and C+ @s77rt ?
We have completed several tasks in this new feature, including displaying local PDFs, detecting password-protected PDFs, and refining translations.
It would be great to have it but it’s also fine if not :)
melvin-bot commentedon Mar 14, 2024
Payment Summary
Upwork Job
BugZero Checklist (@trjExpensify)
trjExpensify commentedon Mar 15, 2024
Hey @eh2077, thanks for the request. I agree the scope of this issue increased to encompass password-protected PDFs and updating the file type modal. I've added a bonus and sent you both offers for $750.
s77rt commentedon Mar 15, 2024
@trjExpensify We had a regression #37852. Should the payment here be $375 in that case?
trjExpensify commentedon Mar 15, 2024
Ah, I didn't see that. Okay cool, so then I'm fine with keeping the bounty at $500 and not reducing for that regression. Once you guys accept the offers, I'll pay a different amount. 👍
s77rt commentedon Mar 15, 2024
@trjExpensify Accepted! Thank you!
trjExpensify commentedon Mar 18, 2024
Paid both of you, thanks!