Skip to content

Add new comments to transaction thread for single transaction expense#68692

Merged
nkuoch merged 14 commits intomainfrom
aldo_use-transaction-thread-3
Aug 25, 2025
Merged

Add new comments to transaction thread for single transaction expense#68692
nkuoch merged 14 commits intomainfrom
aldo_use-transaction-thread-3

Conversation

@aldo-expensify
Copy link
Copy Markdown
Contributor

@aldo-expensify aldo-expensify commented Aug 18, 2025

Explanation of Change

Re-implementation of this #68415, fixing bugs that it caused.

Changes: When a report has a single transactions and we merge reportActions for this report with the transaction thread, new comments should be added to the transaction thread instead of the main report. (more context: https://expensify.slack.com/archives/C090U774ZH7/p1754067856509739?thread_ts=1752726050.956949&cid=C090U774ZH7)

Parent components of ReportFooter are already obtaining the transaction thread reportID for reports with single transactions, so I'm just passing it down here.

Then, ReportFooter will prefer using the single transaction transactionThreadReportID instead of report.reportID if available.

The previous PR broke whispers because the code resolving whispers was using the reportID which pointed to the expense report when the whisper was in an expense report with a single transaction, even if the whisper reportAction belonged to the transaction thread.

This solves the issue by first trying to use originalReportID. originalReportID holds the correct reportID corresponding to the action being handled by PureReportActionItem.

Another issue handled here is auto-scrolling when a new comment is added: notifyNewAction handles scrolling to the bottom when we add a new comment. In single transaction expense reports we have to scroll to the bottom of the expense report, not the transaction thread.

And, another consideration is that we handle reports created in the "send money" flow differently, for those we don't want to use the transaction thread by default for new comments because we don't combine reportActions there.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/526433
PROPOSAL:

Tests

You need to disable the beta BETAS.NO_OPTIMISTIC_TRANSACTION_THREADS to test this properly

Messages are stored in the correct report:

  1. Create an account in NewDot
  2. Create a workspace
  3. Create an empty report
  4. Create an expense (transaction) in the expense report with any category that is NOT "Travel"
  5. Send some messages in the expense report
  6. Send a message like Set category to "Travel"
  7. Verify that the category changes to "Travel" and an automatic response from Concierge appears:
    image
  8. Send another message
  9. Create another transaction (the expense report doesn't have a single transaction anymore)
  10. Verify that all messages sent before are now in the first transaction thread
  11. Verify that the expense report conversation is empty

Attachments are stored in the correct report:

  1. Create an empty report
  2. Create an expense in the report
  3. Add an image attachment
  4. Verify you can see the attachment correctly
  5. Create a new expense in the report
  6. Verify that now the attachment is under the transaction thread of the first expense
Screen.Recording.2025-08-18.at.12.44.09.PM.mov

Test editing comment while offline:

  1. Create an empty report
  2. Create an expense within the report
  3. Add a comment in the expense report
  4. Go offline
  5. Edit the comment
  6. Verify that the offline edit looks well
  7. Add another comment while offline
  8. Edit the last comment and verify it looks well
  9. Add another comment while offline
  10. Edit the last comment removing all its content and confirm you want to delete it
  11. Verify the last comment disappears
  12. Go back online
  13. Verify that the comments look correct
Screen.Recording.2025-08-21.at.4.41.54.PM.mov

Mention whisper:

  1. Create an empty report
  2. Create an expense in the report
  3. Send a message mentioning another user (any email should work)
  4. Verify you get a whisper from Concierge to invite the user
    image
  5. Dismiss the invitation clicking "Do nothing"
  6. Add another message mentioning the same user
  7. Verify you get a whisper from Concierge to invite the user
  8. Create another expense in the report
  9. Verify that all messages so far are now under the transaction thread of the first expense
  10. Verify that dismissing the whisper from concierge works
Screen.Recording.2025-08-18.at.1.01.41.PM.mov

Mention whisper - deleting second expense:

  1. Create an empty report
  2. Create an expense in the report
  3. Send a message mentioning another user (any email should work)
  4. Create another expense in the report
  5. Open the first expense transaction thread, and verify that all messages are here
  6. Open the second expense transaction thread and delete the expense
  7. Verify the mention-whisper should appear now in the main expense report chat
  8. Click "Do nothing"
  9. Verify that dismissing the whisper from concierge works
Screen.Recording.2025-08-20.at.4.23.31.PM.mov

Suggested category actionable whisper:

  1. Create a clean workspace
  2. Create an empty expense report
  3. Create an expense with a like dsgdgrewerfwefaeg and don't select any category
  4. Wait for Concierge to send a whisper suggesting category options
    image
  5. Click on a suggested category
  6. Verify the actionable whisper disappears and Concierge adds a comment like set the category to "Other"
  7. Create a new expense in the report
  8. Verify that the messages went into the transaction thread and are not visible anymore from the expense report
    image
Screen.Recording.2025-08-18.at.1.05.12.PM.mov

Report mention whisper:

  1. Create an empty expense report
  2. Create an expense within the report
  3. Send a message referencing a room name, for example: #1232534543634522 hello
  4. Verify a whisper appears
    image
  5. Click "No"
  6. Verify the whisper dissappears correctly
  7. Send another message referencing a room name, for example: #asdasda214234 asdsasf
  8. Verify a new whisper appears
  9. Create another expense
  10. Verify your initial messages and the whisper is now under the transaction thread of the first transaction
  11. Click "Yes" in the whisper
  12. Verify the room is created
Screen.Recording.2025-08-18.at.1.06.39.PM.mov

Pay user flow (plus auto-scrolling)

  1. Go to NewDot
  2. Open 1:1 DM.
  3. Click + > Pay user.
  4. Enter amount > Next.
  5. Click Mark as paid.
  6. Open the expense report.
  7. Send a message.
  8. Message will appear as an individual message in the expense report.
  9. Send many messages... enough for the scroll bar to appear.
  10. Scroll to the top of the expense report
  11. Send another message
  12. Verify it automatically scrolled to the bottom
Screen.Recording.2025-08-15.at.12.50.26.PM.mov

Request money flow (plus auto-scrolling)

  1. Go to NewDot
  2. Open 1:1 DM.
  3. Click + > Create expense.
  4. Enter amount > Next.
  5. Open the expense report.
  6. Send many messages... enough for the scroll bar to appear.
  7. Scroll to the top of the expense report
  8. Send another message
  9. Verify it automatically scrolled to the bottom
  10. Create another expense in the same report
  11. Verify that the first message now is under the first expense's transaction thread
  12. Send a new message in the expense report
  13. Verify the message appears in the expense report
  14. Verify you can add messages in each expense's transaction threads individually
  15. Go to the expense report
  16. Send many messages... enough for the scroll bar to appear.
  17. Scroll to the top of the expense report
  18. Send another message
  19. Verify it automatically scrolled to the bottom
Screen.Recording.2025-08-15.at.12.51.35.PM.mov
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

@aldo-expensify aldo-expensify self-assigned this Aug 18, 2025
@aldo-expensify aldo-expensify requested a review from a team as a code owner August 18, 2025 19:18
@melvin-bot melvin-bot Bot requested a review from cristipaval August 18, 2025 19:19
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Aug 18, 2025

@cristipaval Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot removed the request for review from a team August 18, 2025 19:19
@aldo-expensify aldo-expensify marked this pull request as draft August 18, 2025 19:21
@aldo-expensify aldo-expensify requested review from jayeshmangwani and removed request for cristipaval August 18, 2025 20:12
@aldo-expensify aldo-expensify marked this pull request as ready for review August 18, 2025 20:14
@aldo-expensify
Copy link
Copy Markdown
Contributor Author

@jayeshmangwani ready for another round? 😓

@jayeshmangwani
Copy link
Copy Markdown
Contributor

@aldo-expensify thanks for the new PR. I will start reviewing it and will try to cover many cases around report deletion, navigation, and offline behavior, and compare them with the prod version to make sure we can reach prod with this PR this time.

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

Thank you @jayeshmangwani 🙇

@jayeshmangwani
Copy link
Copy Markdown
Contributor

jayeshmangwani commented Aug 20, 2025

@aldo-expensify buttons don’t work after deleting the second expense while offline.

  1. Go to WS expenses.
  2. Create an expense.
  3. On that expense, send a message that contains a user’s email.
  4. Create another expense.
  5. Go offline.
  6. Go to the second expense and delete it.
  7. Now try pressing the whisper buttons (“Invite them” and “Do nothing”) on that email message.
  8. Buttons don’t work.
buttons-doent-works.mov

Edit: It also doesn’t work when we delete it while online.

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

Thanks @jayeshmangwani , I'll investigate

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

aldo-expensify commented Aug 20, 2025

I'm suspecting the bug is coming from the useMemo here not recalculating the originalReportID when it should, and maybe it is happening because we are mutating action somewhere:

const originalReportID = useMemo(() => getOriginalReportID(reportID, action), [reportID, action]);

Update: or maybe not a mutation, but a bug caused from reading data loading by Onyx.connect

Comment on lines +7 to +27
function useOriginalReportID(reportID: string | undefined, reportAction: OnyxInputOrEntry<ReportAction>): string | undefined {
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID ?? CONST.DEFAULT_NUMBER_ID}`, {canBeMissing: true});
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID ?? CONST.DEFAULT_NUMBER_ID}`, {canBeMissing: true});
const [chatReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report?.chatReportID}`, {canBeMissing: true});

if (!reportID) {
return undefined;
}
const currentReportAction = reportAction?.reportActionID ? reportActions?.[reportAction.reportActionID] : undefined;

if (Object.keys(currentReportAction ?? {}).length === 0) {
const isThreadReportParentAction = reportAction?.childReportID?.toString() === reportID;
if (isThreadReportParentAction) {
return report?.parentReportID;
}
const transactionThreadReportID = getOneTransactionThreadReportID(report, chatReport, reportActions ?? ([] as ReportAction[]));
const retorno = transactionThreadReportID ?? reportID;
return retorno;
}
return reportID;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this hook analog to the function ReportUtils::getOriginalReportID which was reading data from Onyx.connect and causing this: #68692 (comment)

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

Thanks @jayeshmangwani for catching data, it should be fixed now. I added the reproduction step as a testing case in the PR description.

@jayeshmangwani
Copy link
Copy Markdown
Contributor

Testing the PR now.

@jayeshmangwani
Copy link
Copy Markdown
Contributor

Not a big issue, but running into a minor bug in the offline case.

Steps to reproduce:

  1. Go to WS expenses.
  2. Go offline.
  3. Create 1 expense.
  4. Open that expense and send a message.
  5. Right-click on the message , we can see 6 options, including Reply in thread, Edit comment, and Delete comment.
  6. Now create another expense.
  7. Delete the second expense.
  8. Go back to the message we sent earlier, right-click again — now you only see 3 options, and the ones mentioned above (Reply in thread, Edit comment, Delete comment) are missing.
offline-bug.mov

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

aldo-expensify commented Aug 21, 2025

hmm, it is because when you do that offline, we find two IOU reportActions here:

image

// If we don't have any IOU request actions, or we have more than one IOU request actions, this isn't a oneTransaction report

so we consider it to not be a single-transaction expense report, and then we end up with the wrong originalReportID.

Having said that, there must be some inconsistency because the report is rendered as a single-transaction expense report, so we may have two different logics that don't find the same result.

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

@jayeshmangwani this should be working now, and while fixing that I also caught another bug I fixed:

Test editing comment while offline:

  1. Create an empty report
  2. Create an expense within the report
  3. Add a comment in the expense report
  4. Go offline
  5. Edit the comment
  6. Verify that the offline edit looks well
  7. Add another comment while offline
  8. Edit the last comment and verify it looks well
  9. Add another comment while offline
  10. Edit the last comment removing all its content and confirm you want to delete it
  11. Verify the last comment disappears
  12. Go back online
  13. Verify that the comments look correct
Screen.Recording.2025-08-21.at.4.41.54.PM.mov

@jayeshmangwani
Copy link
Copy Markdown
Contributor

While testing these steps #68692 (comment), I noticed that the second edited message is missing the edited flag after going online. The same issue is happening on staging, so it’s definitely not coming from our PR. We might want to report this as a new bug.

Offline:
Screenshot 2025-08-22 at 5 13 29 PM

After going online:
Screenshot 2025-08-22 at 5 13 38 PM

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

While testing these steps #68692 (comment), I noticed that the second edited message is missing the edited flag after going online. The same issue is happening on staging, so it’s definitely not coming from our PR. We might want to report this as a new bug.

Yes, I noticed too, but I was wondering if it could be a feature and not a bug. That message was edited before it was actually sent.

@aldo-expensify
Copy link
Copy Markdown
Contributor Author

Please continue with the review/testing so we don't run into more conflicts

@jayeshmangwani
Copy link
Copy Markdown
Contributor

jayeshmangwani commented Aug 24, 2025

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android.mov
Android: mWeb Chrome
mweb-chrome.mov
iOS: HybridApp
iOS.mov
iOS: mWeb Safari
mweb-safari.mov
MacOS: Chrome / Safari
web-2.mov
MacOS: Desktop
desktop.mov

Copy link
Copy Markdown
Contributor

@jayeshmangwani jayeshmangwani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

@melvin-bot melvin-bot Bot requested a review from nkuoch August 25, 2025 07:10
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Aug 25, 2025

@nkuoch Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Aug 25, 2025

🎯 @jayeshmangwani, thanks for reviewing and testing this PR! 🎉

An E/App issue has been created to issue payment here: #69135.

@nkuoch
Copy link
Copy Markdown
Contributor

nkuoch commented Aug 25, 2025

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

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

@nkuoch nkuoch merged commit afa5bf8 into main Aug 25, 2025
25 checks passed
@nkuoch nkuoch deleted the aldo_use-transaction-thread-3 branch August 25, 2025 07:49
@OSBotify
Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/nkuoch in version: 9.1.99-0 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/thienlnam in version: 9.1.99-11 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants