You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-05-27] [$250] expense-Concierge message is shown after deleting the expense #60999
Version Number: V9.1.33-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): Sloottwo1 4@gmail.com Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 App Component: Money Requests
Action Performed:
Launch app
Open a workspace chat
Create 2 manual expenses without selecting category
Open the expense report
Open the second expense
Tap header - delete the expense
Expected Result:
Concierge message musnt be shown after deleting the expense.
Actual Result:
Concierge message is shown after deleting the expense.
changed the title [-]expense-Concierge message is shown after deleting the expense[/-][+][$250] expense-Concierge message is shown after deleting the expense[/+]on Apr 28, 2025
Please re-state the problem that we are trying to solve in this issue.
After deleting an expense, the Concierge message is incorrectly shown.
What is the root cause of that problem?
When a transaction is deleted, the category options in the UI are not disabled as expected. Specifically, in this section of the code, we do not disable the options when the associated transaction has been removed.
What changes do you think we should make in order to solve the problem?
Introduce a new check to determine whether the transaction associated with getOriginalMessage(action)?.transactionID has been deleted.
If the transaction no longer exists, we should disable the whisper buttons accordingly.
Please re-state the problem that we are trying to solve in this issue.
After deleting an expense, the Concierge message is incorrectly shown with active category option buttons. This creates a confusing user experience where users can see and interact with category options for a transaction that no longer exists.
What is the root cause of that problem?
When a transaction is deleted, the category options in the UI are not properly disabled. The code doesn't check whether the associated transaction still exists before displaying the actionable buttons. Currently, the only check is whether the category options are resolved, but there's no verification that the underlying transaction still exists:
What changes do you think we should make in order to solve the problem?
Add a check in PureReportActionItem.tsx to determine if the transaction associated with the concierge category options still exists using TransactionUtils.getTransaction().
Update the isDisabled property of the concierge category option buttons to return true when the transaction has been deleted.
Add a condition to not render the ActionableItemButtons component at all when all items are disabled.
Update the OriginalMessageConciergeCategoryOptions type to include the transactionID property.
Here are the key code changes:
// In PureReportActionItem.tsxif(isConciergeCategoryOptions(action)){constoptions=getOriginalMessage(action)?.options;if(!options){return[];}constisResolved=isResolvedConciergeCategoryOptions(action);consttransactionID=getOriginalMessage(action)?.transactionID;consttransactionExists=TransactionUtils.getTransaction(transactionID);returnoptions.map((option,i)=>({text: `${i+1} - ${option}`,key: `${action.reportActionID}-conciergeCategoryOptions-${option}`,onPress: ()=>{addComment(originalReportID,option);},isDisabled: isResolved||!transactionExists,}));}
// Condition to prevent rendering buttons when all are disabled{actionableItemButtons.length>0&&actionableItemButtons.some(item=>!item.isDisabled)&&(<ActionableItemButtonsitems={actionableItemButtons}layout={isActionableTrackExpense(action)||isConciergeCategoryOptions(action) ? 'vertical' : 'horizontal'}shouldUseLocalization={!isConciergeCategoryOptions(action)}/>)}
// Update to OriginalMessageConciergeCategoryOptions type definition/** Model of `concierge category options` report action */typeOriginalMessageConciergeCategoryOptions={/** The options we present to the user when confidence in the predicted category is low */options: string[];/** ID of the transaction */transactionID?: string;};
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)
Option 1: Hide the entire concierge category options message when the transaction is deleted by modifying the message rendering logic to check for transaction existence before displaying the message.
Option 2: Delete the category options whisper message when a transaction is deleted, by adding logic to the transaction deletion process. This would involve modifying the optimistic data in the delete transaction flow to also remove the associated concierge message:
// In the transaction deletion logicconsttransactionThreadReportActions=allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThreadID}`]??{};constcategoryOptionsWhisper=Object.values(transactionThreadReportActions).find((action)=>isConciergeCategoryOptions(action));if(categoryOptionsWhisper){optimisticData.push({onyxMethod: Onyx.METHOD.SET,key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThreadID}`,value: {[categoryOptionsWhisper.reportActionID]: null,},});}
Thanks everybody for the proposals! Unfortunately none of the current proposals are fixing the issue according to the Expected result, which states:
Concierge message musnt be shown after deleting the expense.
❌ The main solutions of both proposals are only disabling the 3 buttons that the Concierge message shows -> this means that the Concierge message / thread reply are still visible.
❌ Proposal 1 - Alternative 1 doesn't work as long as the report is opened, only works if we havigate back to expense group, then it will show Deleted expense, but still display the Concierge thread reply under the Deleted expense.
❌ Proposal 1 - Alternative 2 this seems to work as expected, will transition back to expenses group and show Deleted expense after the expense is deleted, but will still display the Concierge thread reply (which we don't want).
♻ For a complete solution for this issue, according to the Expected result we're looking at something similar to what Proposal 1 - Alternative 2 proposed, but with the addition that the Concierge thread reply must be removed as well.
cc @thelullabyy@Nick4dawin to update proposals according to expected result (if still interested)
Thanks everybody for the proposals! Unfortunately none of the current proposals are fixing the issue according to the Expected result, which states:
Concierge message musnt be shown after deleting the expense.
@ikevin127 If we're aligning with this expected behavior, we'll need support from the backend as well. Could you check with the internal engineering team to confirm whether the backend can accommodate this? Once the backend implementation is ready, I’ll update the solution to match the new response structure from BE side?
@JakubKorytko is doing the PR over on #61775 @DylanDylann is reviewing the PR ^^
No separate PR is being drafted or reviewed on this GH
So will be payment be handled over on #61775
Yep, correct. This issue is going to be solved by another issue now. Typically what I do in this situation is one of two things:
If it's confirmed it will for sure be solved by the other one or a straight up dupe, I just close the issue.
If it's a bit TBD (i.e "I think this will be fixed here"), then I pop a [Hold #61775] in the title and drop it to weekly. Once the PR for the other issue in question is deployed > re-test to confirm > close or progress it.
In this case, I'm confident with option 1 because Jakub shared a vid here illustrating the fix from this WIP PR, so we can just close this out.
changed the title [-][$250] expense-Concierge message is shown after deleting the expense[/-][+][Due for payment 2025-05-27] [$250] expense-Concierge message is shown after deleting the expense[/+]on May 20, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.46-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@DylanDylann@lydiabarclay@DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Activity
melvin-bot commentedon Apr 28, 2025
Triggered auto assignment to @lydiabarclay (
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 commentedon Apr 28, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021917004187845693619
[-]expense-Concierge message is shown after deleting the expense[/-][+][$250] expense-Concierge message is shown after deleting the expense[/+]melvin-bot commentedon Apr 28, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)thelullabyy commentedon Apr 29, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
getOriginalMessage(action)?.transactionIDhas been deleted.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
Option 1: Hide the category options whisper.
Option 2: Delete the category options whisper message.
Nick4dawin commentedon Apr 29, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After deleting an expense, the Concierge message is incorrectly shown with active category option buttons. This creates a confusing user experience where users can see and interact with category options for a transaction that no longer exists.
What is the root cause of that problem?
When a transaction is deleted, the category options in the UI are not properly disabled. The code doesn't check whether the associated transaction still exists before displaying the actionable buttons. Currently, the only check is whether the category options are resolved, but there's no verification that the underlying transaction still exists:
What changes do you think we should make in order to solve the problem?
Here are the key code changes:
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)
Option 1: Hide the entire concierge category options message when the transaction is deleted by modifying the message rendering logic to check for transaction existence before displaying the message.
Option 2: Delete the category options whisper message when a transaction is deleted, by adding logic to the transaction deletion process. This would involve modifying the optimistic data in the delete transaction flow to also remove the associated concierge message:
ikevin127 commentedon Apr 29, 2025
Thanks everybody for the proposals! Unfortunately none of the current proposals are fixing the issue according to the Expected result, which states:
❌ The main solutions of both proposals are only disabling the 3 buttons that the Concierge message shows -> this means that the Concierge message / thread reply are still visible.
❌ Proposal 1 - Alternative 1 doesn't work as long as the report is opened, only works if we havigate back to expense group, then it will show
Deleted expense, but still display the Concierge thread reply under theDeleted expense.❌ Proposal 1 - Alternative 2 this seems to work as expected, will transition back to expenses group and show
Deleted expenseafter the expense is deleted, but will still display the Concierge thread reply (which we don't want).♻ For a complete solution for this issue, according to the Expected result we're looking at something similar to what Proposal 1 - Alternative 2 proposed, but with the addition that the Concierge thread reply must be removed as well.
cc @thelullabyy @Nick4dawin to update proposals according to expected result (if still interested)
thelullabyy commentedon May 2, 2025
@ikevin127 If we're aligning with this expected behavior, we'll need support from the backend as well. Could you check with the internal engineering team to confirm whether the backend can accommodate this? Once the backend implementation is ready, I’ll update the solution to match the new response structure from BE side?
42 remaining items
trjExpensify commentedon May 12, 2025
Yep, correct. This issue is going to be solved by another issue now. Typically what I do in this situation is one of two things:
[Hold #61775]in the title and drop it toweekly. Once the PR for the other issue in question is deployed > re-test to confirm > close or progress it.In this case, I'm confident with option 1 because Jakub shared a vid here illustrating the fix from this WIP PR, so we can just close this out.
👋 it's-a-me!
melvin-bot commentedon May 16, 2025
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.
[-][$250] expense-Concierge message is shown after deleting the expense[/-][+][Due for payment 2025-05-27] [$250] expense-Concierge message is shown after deleting the expense[/+]melvin-bot commentedon May 20, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 20, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.46-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-05-27. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 20, 2025
@DylanDylann @lydiabarclay @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]