Skip to content

[Better Expense Report View] [$250] Web - Reports - Unable to play video in Reports > Chats #59774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 8 tasks
mitarachim opened this issue Apr 8, 2025 · 28 comments
Closed
2 of 8 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Apr 8, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.1.24-2
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to chat.
  3. Upload a video.
  4. Go to Reports.
  5. Go to Chats.
  6. Click on the video.

Expected Result:

The video will play.

Actual Result:

The video does not play. Nothing happens after clicking on the video.
If Reports page is refreshed, the video will play. When switching between Reports and Inbox, the video does not play again in Reports > Chats.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6795602_1744077155211.20250408_095048.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021909486704097387391
  • Upwork Job ID: 1909486704097387391
  • Last Price Increase: 2025-04-08
  • Automatic offers:
    • DylanDylann | Reviewer | 106833583
Issue OwnerCurrent Issue Owner: @miljakljajic
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

Copy link

melvin-bot bot commented Apr 8, 2025

Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Apr 8, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 8, 2025
Copy link
Contributor

github-actions bot commented Apr 8, 2025

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@mkzie2
Copy link
Contributor

mkzie2 commented Apr 8, 2025

Proposal

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

The video does not play. Nothing happens after clicking on the video.
If Reports page is refreshed, the video will play. When switching between Reports and Inbox, the video does not play again in Reports > Chats.

What is the root cause of that problem?

  1. On the search page, reportID is undefined

setCurrentReportID(reportID);

function VideoPlayerPreview({videoUrl, thumbnailUrl, reportID, fileName, videoDimensions, videoDuration, onShowModalPress, isDeleted}: VideoPlayerPreviewProps) {

But the currentReportID is always the topmost reportID or reportID from the params. This causes currentPlayReportID not to be the same reportID on the search page, and the video can't play.

const currentPlayReportID = [attachmentReportID, reportIDWithUrl, currentReportID].find((id) => id !== undefined);

  1. !firstRenderRoute.isFocused is never true if we the play the video in preview on large screen.

if (videoUrl !== currentlyPlayingURL || reportID !== currentlyPlayingURLReportID || !firstRenderRoute.isFocused) {
return;
}
setIsThumbnail(false);
}, [currentlyPlayingURL, currentlyPlayingURLReportID, updateCurrentlyPlayingURL, videoUrl, reportID, firstRenderRoute]);

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

  1. If the focused route is not an attachment route or report screen route, reportID should be undefined
if (Navigation.getActiveRouteWithoutParams() !== `/${ROUTES.ATTACHMENTS.route}` && focusedRoute?.name !== SCREENS.REPORT) {
    reportID = undefined;
} else {
    reportID = Navigation.getActiveRouteWithoutParams() === `/${ROUTES.ATTACHMENTS.route}` ? prevCurrentReportID : reportID;
}

const updateCurrentPlayingReportID = useCallback(

  1. This hook should return true in large screen
const {shouldUseNarrowLayout} = useResponsiveLayout();

get isFocused() {
    if (!shouldUseNarrowLayout) {
        return true;
    }
    const activeRoute = Navigation.getActiveRouteWithoutParams();
    const allRoutesToConsider = [initialRoute.current, ...(focusExceptionRoutes ?? [])];
    return allRoutesToConsider.includes(activeRoute);
},

get isFocused() {

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

NA

What alternative solutions did you explore? (Optional)

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.

@techievivek
Copy link
Contributor

I think it could be loosely related to this PR https://github.com/Expensify/App/pull/59430/files, we didn't handle this specific case.

@techievivek
Copy link
Contributor

I will demote this since it's not very concerning bug and the video plays if refreshed.

@techievivek techievivek added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Apr 8, 2025
@techievivek
Copy link
Contributor

And going to pass move this to external.

@techievivek techievivek added the External Added to denote the issue can be worked on by a contributor label Apr 8, 2025
@melvin-bot melvin-bot bot changed the title Web - Reports - Unable to play video in Reports > Chats [$250] Web - Reports - Unable to play video in Reports > Chats Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

Copy link

melvin-bot bot commented Apr 8, 2025

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Copy link

melvin-bot bot commented Apr 8, 2025

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@mountiny mountiny moved this to Second Cohort - HIGH in [#whatsnext] #migrate Apr 8, 2025
@mountiny mountiny changed the title [$250] Web - Reports - Unable to play video in Reports > Chats [Better Expense Report View] [$250] Web - Reports - Unable to play video in Reports > Chats Apr 8, 2025
@mountiny
Copy link
Contributor

mountiny commented Apr 8, 2025

Classified it in the right project for better tracking @JakubKorytko @DylanDylann Coul you please check the proposals, and we can let contributors fix this but ideally with urgency. Thank you!

@miljakljajic
Copy link
Contributor

Thank you!

@DylanDylann
Copy link
Contributor

Thanks for all the proposals. But after discussing it with @JakubKorytko, we decided to develop a new solution. @JakubKorytko will raise a PR to fix this issue

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 9, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@JakubKorytko
Copy link
Contributor

FYI blocker should be removed #60223 (comment)

Copy link

melvin-bot bot commented Apr 17, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@mountiny
Copy link
Contributor

Fake news

@trjExpensify
Copy link
Contributor

I think we can close this.

@mountiny
Copy link
Contributor

mountiny commented May 6, 2025

Yeah lets close

@mountiny mountiny closed this as completed May 6, 2025
@github-project-automation github-project-automation bot moved this from Second Cohort - HIGH to Done in [#whatsnext] #migrate May 6, 2025
@DylanDylann
Copy link
Contributor

DylanDylann commented May 6, 2025

@trjExpensify Please help to handle payment to me as @mountiny said this should be handled outside the scope of the project

@mountiny mountiny reopened this May 6, 2025
@mountiny
Copy link
Contributor

mountiny commented May 6, 2025

Ah right, this went beyond just the previews as the logic was refactored to work well across pages. Lets issue a separate payment of $250 to @DylanDylann

@miljakljajic
Copy link
Contributor

I'll handle the payment if it hasn't been created already!

@mountiny mountiny added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels May 16, 2025
@mountiny
Copy link
Contributor

Yes please, thank you @miljakljajic

@miljakljajic
Copy link
Contributor

Payment summary for @DylanDylann (as per this comment)

@DylanDylann is owed 250 USD. Please make a request via NewDot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Development

No branches or pull requests

9 participants