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
[$250] Unassigning company card offline removes it optimistically instead of making it strike through #78575
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review
What changes do you think we should make in order to solve the problem?
Keep the card in the workspace cards list with a pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE instead of setting it to null in the optimistic data. Only remove it in the success data
We can also add logic to show loading indicator/skeleton loading individually for each card when there are pending unassign requests to prevent it to disappear briefly
We need to change the card feed icon loading state in WorkspaceCompanyCardsTableItem from spinner to a skeleton as well
Create a new skeleton component CardIconSkeleton.tsx with SkeletonViewContentLoader that accepts width and height props
Update PlaidCardFeedIcon.tsx to add a new prop useSkeletonLoader (defaults to false), then conditionally renders CardIconSkeleton when useSkeletonLoader={true}, otherwise use ActivityIndicator
Update CardFeedIcon.tsx to add a new prop useSkeletonLoader (defaults to false), then pass it through to PlaidCardFeedIcon when rendering Plaid card feeds
Because we don't set cardID value as null so if the user navigate to the card detail page by URL, it still shows the full access and the user can unassign card again. So we need to disable it or we can show the not found page when card is pending delete
Note: We should do the same with other places and other logic that will need to check if card is not pending delete
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.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
[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: This is a known issue that came from Tgolen fix transition #78078. We decided to fix it as a follow up here.
[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: N/A
[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:
Your workspace has at least one company card.
Test:
Go to workspace > Company card.
Choose any card > Assign.
Go Offline
Click on that card > Unassign a card.
Verify that the unassigned card gets shown as strike through or greyed out signaling a pending action like in the other pages for offline behavior.
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review
Activity
melvin-bot commentedon Dec 30, 2025
Triggered auto assignment to @zanyrenney (
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.nlemma commentedon Dec 30, 2025
@m-natarajan tagging you to assign the issue.
ryntgh commentedon Dec 30, 2025
🚨 Edited by proposal-police: This proposal was edited at 2026-01-09 06:39:45 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unassigning company card offline removes it optimistically instead of making it strike through
What is the root cause of that problem?
In
unassignWorkspaceCompanyCard, the optimistic data sets the card tonullin the workspace cards list, which removes it immediately from the UIApp/src/libs/actions/CompanyCards.ts
Lines 414 to 421 in a1fa8dc
What changes do you think we should make in order to solve the problem?
Keep the card in the workspace cards list with a
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETEinstead of setting it tonullin the optimistic data. Only remove it in the success dataOr conditionally handle optimistic data based on network state
App/src/libs/actions/CompanyCards.ts
Lines 415 to 421 in a1fa8dc
App/src/libs/actions/CompanyCards.ts
Lines 451 to 460 in a1fa8dc
We can also add logic to show loading indicator/skeleton loading individually for each card when there are pending unassign requests to prevent it to disappear briefly
App/src/pages/workspace/companyCards/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableItem.tsx
Lines 127 to 243 in 65e7b60
We need to change the card feed icon loading state in
WorkspaceCompanyCardsTableItemfrom spinner to a skeleton as wellCreate a new skeleton component
CardIconSkeleton.tsxwithSkeletonViewContentLoaderthat accepts width and height propsUpdate
PlaidCardFeedIcon.tsxto add a new propuseSkeletonLoader(defaults to false), then conditionally rendersCardIconSkeletonwhenuseSkeletonLoader={true}, otherwise useActivityIndicatorApp/src/components/PlaidCardFeedIcon.tsx
Lines 60 to 62 in 65e7b60
CardFeedIcon.tsxto add a new propuseSkeletonLoader(defaults to false), then pass it through toPlaidCardFeedIconwhen rendering Plaid card feedsApp/src/components/CardFeedIcon.tsx
Lines 32 to 36 in 65e7b60
useSkeletonLoaderprop toCardFeedIconinWorkspaceCompanyCardsTable/index.tsxwhen creating the icon for the tableApp/src/pages/workspace/companyCards/WorkspaceCompanyCardsTable/index.tsx
Lines 208 to 216 in 65e7b60
Minor styling of the loading indicator / skeleton can be finalized during the PR phase
POC.mp4
What alternative solutions did you explore? (Optional)
NA
daledah commentedon Dec 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The unassigned card gets removed optimistically.
What is the root cause of that problem?
we set
cardIDas null here that will remove the card in UIApp/src/libs/actions/CompanyCards.ts
Lines 414 to 421 in a1fa8dc
What changes do you think we should make in order to solve the problem?
pendingActionasdeletein optimistic data then reset it in failure data and success dataApp/src/libs/actions/CompanyCards.ts
Lines 414 to 421 in a1fa8dc
cardIDvalue asnullso if the user navigate to the card detail page by URL, it still shows the full access and the user can unassign card again. So we need to disable it or we can show the not found page when card is pending deletebug.mov
Note: We should do the same with other places and other logic that will need to check if card is not pending delete
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.
m-natarajan commentedon Dec 30, 2025
Discussed about this issue here
melvin-bot commentedon Jan 3, 2026
@carlosmiceli, @dannymcclain, @zanyrenney, @dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
dylanexpensify commentedon Jan 5, 2026
I think we should follow the same patter -> showing grey + strike through, then actioned when back online
43 remaining items
melvin-bot commentedon Feb 13, 2026
This issue has not been updated in over 15 days. @carlosmiceli, @dannymcclain, @hungvu193, @zanyrenney, @dylanexpensify, @ryntgh eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
hungvu193 commentedon Feb 16, 2026
Oh this is due for payment
hungvu193 commentedon Feb 16, 2026
BugZero Checklist:
[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: This is a known issue that came from Tgolen fix transition #78078. We decided to fix it as a follow up here.
[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: N/A
[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:
Test:
Do we agree 👍 or 👎
dylanexpensify commentedon Feb 16, 2026
Payment summary:
Contributor: @ryntgh $250 via Upwork
Contributor+: @hungvu193 $250 via NewDot
Please apply/request!
ryntgh commentedon Feb 16, 2026
Hi @dylanexpensify, I can't apply to the upwork job since the job is no longer available
dylanexpensify commentedon Feb 16, 2026
@ryntgh new post here!
ryntgh commentedon Feb 16, 2026
Thanks! I applied to the job
dylanexpensify commentedon Feb 17, 2026
@ryntgh offer sent!
dylanexpensify commentedon Feb 17, 2026
done
dominictb commentedon May 5, 2026
@hungvu193 Did you request payment here?
hungvu193 commentedon May 5, 2026
@dominictb Thanks for asking. I think I did 😅 , I've just checked my ND transactions and it was approved.