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] Reports - "undefinedundefined" is shown briefly when switching group-by from "From" to "Card" #70802
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Version Number: 9.2.15-9 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#67802 Email or phone of affected tester (no customers):sjdniojsdoisjo@gmail.com Issue reported by: Applause Internal Team Device used: Mac 15.5 / Chrome App Component: Search
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense in workspace chat.
Go to Reports > Expenses.
Search with group-by:from.
Click Group-by button.
Select Card and click Apply.
Expected Result:
The subtitle below user name will not show "undefinedundefined" when switching group-by from "From" to "Card".
Actual Result:
The subtitle below user name shows "undefinedundefined" briefly when switching group-by from "From" to "Card".
When switching from "From" to "Card" grouping, there's a brief moment during data reconstruction where cardItem.cardName and cardItem.lastFourPAN might be undefined
What changes do you think we should make in order to solve the problem?
Please re-state the problem that we are trying to solve in this issue.
"undefinedundefined" is shown briefly when switching group-by from "From" to "Card"
What is the root cause of that problem?
We cast data[key] as SearchCardGroup, but during the transition, data[key] is actually a SearchMemberGroup (from the "From" grouping). This type assertion is unsafe and causes the undefined properties
What changes do you think we should make in order to solve the problem?
We should check if it valid data before continue (We can use existing util func to check if having, however, I couldn't find out them so I check manually)
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
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.
changed the title [-]Reports - "undefinedundefined" is shown briefly when switching group-by from "From" to "Card"[/-][+][$250] Reports - "undefinedundefined" is shown briefly when switching group-by from "From" to "Card"[/+]on Sep 23, 2025
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
melvin-bot commentedon Sep 18, 2025
Triggered auto assignment to @bfitzexpensify (
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.nyomanjyotisa commentedon Sep 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports - "undefinedundefined" is shown briefly when switching group-by from "From" to "Card"
What is the root cause of that problem?
Subtitle text concatenation doesn't handle undefined values properly
App/src/components/SelectionList/Search/CardListItemHeader.tsx
Line 82 in e2e05b5
When switching from "From" to "Card" grouping, there's a brief moment during data reconstruction where
cardItem.cardNameandcardItem.lastFourPANmight beundefinedWhat changes do you think we should make in order to solve the problem?
We should add proper null/undefined checks
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
None
lorretheboy commentedon Sep 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
"undefinedundefined" is shown briefly when switching group-by from "From" to "Card"
What is the root cause of that problem?
We cast data[key] as SearchCardGroup, but during the transition, data[key] is actually a SearchMemberGroup (from the "From" grouping). This type assertion is unsafe and causes the undefined properties
App/src/libs/SearchUIUtils.ts
Lines 1442 to 1445 in 353237f
App/src/libs/SearchUIUtils.ts
Lines 1477 to 1480 in 353237f
App/src/libs/SearchUIUtils.ts
Line 1515 in 353237f
What changes do you think we should make in order to solve the problem?
We should check if it valid data before continue (We can use existing util func to check if having, however, I couldn't find out them so I check manually)
Optional: Though we have fixed the root cause of issue, we still can have better null/undefined check here as well if needed
App/src/components/SelectionList/Search/CardListItemHeader.tsx
Line 82 in 353237f
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
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.
[-]Reports - "undefinedundefined" is shown briefly when switching group-by from "From" to "Card"[/-][+][$250] Reports - "undefinedundefined" is shown briefly when switching group-by from "From" to "Card"[/+]melvin-bot commentedon Sep 23, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021970487701513069863
melvin-bot commentedon Sep 23, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb (
External)dominictb commentedon Sep 24, 2025
I cannot reproduce this today on
main. Could anyone? @lorretheboy @nyomanjyotisaScreen.Recording.2025-09-24.at.23.20.43.mov
nyomanjyotisa commentedon Sep 25, 2025
Yeah, the issue is not reproducible on the latest main
dominictb commentedon Sep 25, 2025
@bfitzexpensify please close this.