Skip to content

[$250] Sound - No sound when paying to a user via QAB #61296

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

Open
2 of 8 tasks
jponikarchuk opened this issue May 2, 2025 · 15 comments
Open
2 of 8 tasks

[$250] Sound - No sound when paying to a user via QAB #61296

jponikarchuk opened this issue May 2, 2025 · 15 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@jponikarchuk
Copy link

jponikarchuk commented May 2, 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.39-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6031362
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Windows 10/ Chrome, Samsung S23FE/ Android 14
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with a new gmail account
  3. Open a DM with any user
  4. Click + in the composer and pay using the Pay {userName} option
  5. Verify success sound is played
  6. Click FAB > Click on QAB
  7. Pay the user again

Expected Result:

The success sound is played.

Actual Result:

No sound when paying to a user via QAB.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021919507454284417985
  • Upwork Job ID: 1919507454284417985
  • Last Price Increase: 2025-05-05
  • Automatic offers:
    • linhvovan29546 | Contributor | 107277283
Issue OwnerCurrent Issue Owner: @neil-marcellini
@jponikarchuk jponikarchuk added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels May 2, 2025
Copy link

melvin-bot bot commented May 2, 2025

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

@linhvovan29546
Copy link
Contributor

linhvovan29546 commented May 2, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-05-05 01:34:49 UTC.

Proposal

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

Sound - No sound when paying to a user via QAB

What is the root cause of that problem?

We currently play a sound when a user paying to user via the Report screen(AttachmentPickerWithMenuItems). However, this sound is missing when the user sends money via the QAB (Quick Action Button).

sendMoneyElsewhere(report, backendAmount, currency, '', currentUserPersonalDetails.accountID, participants.at(0) ?? {});

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

We should add playSound(SOUNDS.DONE); here

sendMoneyElsewhere(report, backendAmount, currency, '', currentUserPersonalDetails.accountID, participants.at(0) ?? {});

                    playSound(SOUNDS.DONE);
                    sendMoneyElsewhere(report, backendAmount, currency, '', currentUserPersonalDetails.accountID, participants.at(0) ?? {});
                    return;

In addition, we should review other similar functions (e.g., sendMoneyWithWallet) to ensure the sound is played consistently.

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

N/A

What alternative solutions did you explore? (Optional)

We can add playSound here, and then remove all instances of playSound inside shouldSkipConfirmation, such as in requestMoney and trackExpense(We can add a condition to check the iouType to determine whether playSound should be triggered.)

if (shouldSkipConfirmation) {

            if (shouldSkipConfirmation) {
                playSound(SOUNDS.DONE);
...

@twilight2294
Copy link
Contributor

Proposal

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

No sound when paying to a user via QAB

What is the root cause of that problem?

We do not use playSound once the API to pay elsewhere is successful that is why we don't hear any sound:

App/src/libs/actions/IOU.ts

Lines 8643 to 8650 in 223a34c

function sendMoneyElsewhere(report: OnyxEntry<OnyxTypes.Report>, amount: number, currency: string, comment: string, managerID: number, recipient: Participant) {
const {params, optimisticData, successData, failureData} = getSendMoneyParams(report, amount, currency, comment, CONST.IOU.PAYMENT_TYPE.ELSEWHERE, managerID, recipient);
API.write(WRITE_COMMANDS.SEND_MONEY_ELSEWHERE, params, {optimisticData, successData, failureData});
dismissModalAndOpenReportInInboxTab(params.chatReportID);
notifyNewAction(params.chatReportID, managerID);
}

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

We need to use the playSound in the API and remove other instances where the sound is duplicated if any:

function sendMoneyElsewhere(report: OnyxEntry<OnyxTypes.Report>, amount: number, currency: string, comment: string, managerID: number, recipient: Participant) {
    const {params, optimisticData, successData, failureData} = getSendMoneyParams(report, amount, currency, comment, CONST.IOU.PAYMENT_TYPE.ELSEWHERE, managerID, recipient);

    playSound(SOUNDS.SUCCESS);
    API.write(WRITE_COMMANDS.SEND_MONEY_ELSEWHERE, params, {optimisticData, successData, failureData});

    dismissModalAndOpenReportInInboxTab(params.chatReportID);
    notifyNewAction(params.chatReportID, managerID);
}

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

N/A

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label May 5, 2025
@linhvovan29546
Copy link
Contributor

Updated

Copy link

melvin-bot bot commented May 5, 2025

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

@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label May 5, 2025
@melvin-bot melvin-bot bot changed the title Sound - No sound when paying to a user via QAB [$250] Sound - No sound when paying to a user via QAB May 5, 2025
Copy link

melvin-bot bot commented May 5, 2025

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

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

melvin-bot bot commented May 5, 2025

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

Copy link

melvin-bot bot commented May 9, 2025

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

@melvin-bot melvin-bot bot added the Overdue label May 9, 2025
@ahmedGaber93
Copy link
Contributor

Reviewing today.

@melvin-bot melvin-bot bot removed the Overdue label May 9, 2025
@ahmedGaber93
Copy link
Contributor

It is a straight forward issue. @linhvovan29546's proposal LGTM!

🎀 👀 🎀 C+ reviewed.

Copy link

melvin-bot bot commented May 10, 2025

Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@twilight2294
Copy link
Contributor

@ahmedGaber93 shouldn't we make all the sounds play in the api instead of in the function file ? i think that is a better way to go ! @neil-marcellini what do you think ? we currently play many of those sounds in the API

@ahmedGaber93
Copy link
Contributor

shouldn't we make all the sounds play in the api instead of in the function file ?

Hmm! I just see it as a "clean code" note that can be handled in PR, but doesn't have effect when choosing the best proposal compared to who come first, plus we currently use it in the both places.

But it can take into consideration if we will do an entire clean/refactor for it through the app. Let see if @neil-marcellini think this entire clean/refactor is worth (move the playSound to actions files).

@melvin-bot melvin-bot bot added the Overdue label May 12, 2025
@neil-marcellini
Copy link
Contributor

neil-marcellini commented May 12, 2025

It is a straight forward issue. @linhvovan29546's proposal LGTM!

🎀 👀 🎀 C+ reviewed.

Yeah, sounds good. I agree that we should move playSound calls into the action functions so we don't have to remember to call it every time the function is called. However I also agree it's not a very significant detail to make us skip the earlier proposal. Thank you for bringing it up @twilight2294.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 12, 2025
Copy link

melvin-bot bot commented May 12, 2025

📣 @linhvovan29546 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

6 participants