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-06-02] [$250] Expensify Card - After deactivating card, Expensify Card link in system message remains linked #61472
Version Number: 9.1.40-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/6051897 Email or phone of affected tester (no customers):applausetester+khcategory19@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Windows 11 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
User has assigned themselves a virtual Expensify Card.
Go to staging.new.expensify.com
Go to workspace chat.
Click Expensify Card link in the system message.
Click Deactivate card.
Click Deactivate.
Click Expensify Card link in the system message again.
Expected Result:
After deactivating Expensify card, Expensify Card link in the system message should be unlinked.
Actual Result:
After deactivating Expensify card, Expensify Card link in the system message remains linked, which leads to not here page.
changed the title [-]Expensify Card - After deactivating card, Expensify Card link in system message remains linked[/-][+][$250] Expensify Card - After deactivating card, Expensify Card link in system message remains linked[/+]on May 6, 2025
If we decide to go with this solution, we might need to update BE as well to maintain consistency between BE and FE.
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.
@daledah
Thanks for your proposal
I like your two solutions
But the alternative looks a bit cleaner as for me
Since we don't need to pass specific params to the common component
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition: User has assigned themselves a virtual Expensify Card.
Open App.
Go to workspace chat.
Click Expensify Card link in the system message.
Click Deactivate card.
Click Deactivate.
Verify that: After RHP is closed, Expensify Card link in the system message is unlinked.
Activity
melvin-bot commentedon May 6, 2025
Triggered auto assignment to @laurenreidexpensify (
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.[-]Expensify Card - After deactivating card, Expensify Card link in system message remains linked[/-][+][$250] Expensify Card - After deactivating card, Expensify Card link in system message remains linked[/+]melvin-bot commentedon May 6, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021919734679965911302
melvin-bot commentedon May 6, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (
External)daledah commentedon May 6, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-06 15:29:28 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After deactivating Expensify card, Expensify Card link in the system message remains linked, which leads to not here page.
What is the root cause of that problem?
We display issue card message without relying on card changes:
App/src/components/ReportActionItem/IssueCardMessage.tsx
Line 22 in 1082941
While when deactivating card, only card data is modified
App/src/libs/actions/Card.ts
Line 589 in 1082941
So the message is not updated after deactivate card
What changes do you think we should make in order to solve the problem?
We can force render card message when card data change
First, get card data up in
ReportActionItemcomponentWhile doing this we modify
getExpensifyCardFromReportActionlike belowApp/src/libs/CardMessageUtils.ts
Line 31 in 1082941
App/src/libs/CardMessageUtils.ts
Line 44 in 1082941
The purpose is to force recalculation of
cardafter deactivating card.Then, pass
cardfromReportActionItemdown toIssueCardMessageScreen.Recording.2025-05-06.at.21.57.50.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can render
IssueCardMessage, perform Onyx update similar to deactivate card action and make sureIssueCardMessageis rerendered properlyWhat alternative solutions did you explore? (Optional)
We can update
deactivateCardto modifyreportActiondata to force rerenderIssueCardMessagewithout the need of passingcardfrom above.First, we need to create 2 util functions:
This function is used to get the
reportActionrelated tocardIDAnd another one
This is used to get
reportIDof foundreportAction, since I don't seereportIDexists in anyCARDISSUEDVIRTUALreport actions.Then we update
deactivateCardApp/src/libs/actions/Card.ts
Line 592 in 99f2a5a
Add optimistic and failure data
If we decide to go with this solution, we might need to update BE as well to maintain consistency between BE and FE.
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.
ZhenjaHorbach commentedon May 6, 2025
@daledah
Thanks for your proposal
I like your two solutions
But the alternative looks a bit cleaner as for me
Since we don't need to pass specific params to the common component
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon May 6, 2025
Triggered auto assignment to @rlinoz, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
26 remaining items
ZhenjaHorbach commentedon Jun 4, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/47986/files#r2127391984
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
melvin-bot commentedon Jun 6, 2025
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Jun 6, 2025
Contributor: @daledah paid $ via Upwork
Contributor+: @ZhenjaHorbach due $250 via NewDot
Test case
Thx!
ZhenjaHorbach commentedon Jun 19, 2025
Requested in ND
garrettmknight commentedon Jun 26, 2025
$250 approved for @ZhenjaHorbach