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-11-07] [$250] Report - Saved filter is not shown checked after refresh. #70189
Version Number: V9.2.3-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#70012 Email or phone of affected tester (no customers): Slottwo1 bxvb@gmail.com Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 App Component: User Settings
Please re-state the problem that we are trying to solve in this issue.
Saved filter is not shown checked after refresh.
What is the root cause of that problem?
The component uses an “uncontrolled” internal state dateValues, initialized from defaultDateValues only once at mount.
After a reload, defaultDateValues may change after the component has rendered, but dateValues does not automatically update, so SingleSelectListItem’s isSelected (which depends on dateValues) gets out of sync with the new data.
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)
We can separate user interactions from default behavior, and compute the final date value dynamically like the pattern what we already used in Search component.
IMO the dateValue is very simple to compute so this approach is a bit overkill.
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.
What changes do you think we should make in order to solve the problem?
We should avoid initializing the state this way. Instead, use defaultDateValues as a fallback value. This ensures defaultDateValues serves its intended role as a default and eliminates the need for multiple renders to reset dateValues.
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)
NA
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 [-]Report - Saved filter is not shown checked after refresh.[/-][+][$250] Report - Saved filter is not shown checked after refresh.[/+]on Sep 17, 2025
@bernhardoj / @getusha@sonialiap 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]
[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.
I think we can add a test since this is something that could easily slip.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Sep 9, 2025
Triggered auto assignment to @sonialiap (
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.daledah commentedon Sep 9, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Saved filter is not shown checked after refresh.
What is the root cause of that problem?
The component uses an “uncontrolled” internal state dateValues, initialized from defaultDateValues only once at mount.
After a reload,
defaultDateValuesmay change after the component has rendered, but dateValues does not automatically update, so SingleSelectListItem’s isSelected (which depends on dateValues) gets out of sync with the new data.App/src/components/Search/SearchDatePresetFilterBase.tsx
Line 67 in a24b0c0
What changes do you think we should make in order to solve the problem?
We should set the
dateValueswhen thedefaultDateValueschangesWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
We can separate user interactions from default behavior, and compute the final date value dynamically like the pattern what we already used in Search component.
IMO the
dateValueis very simple to compute so this approach is a bit overkill.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.
dmkt9 commentedon Sep 9, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Saved filter is not shown checked after refresh.
What is the root cause of that problem?
dateValuesstate is initialized withdefaultDateValuesviauseState:App/src/components/Search/SearchDatePresetFilterBase.tsx
Line 67 in 32cf88b
searchAdvancedFiltersFormisundefinedduring the initial render,defaultDateValuesdoes not contain the expected values:App/src/components/Search/SearchDatePresetFilterBasePage.tsx
Lines 35 to 42 in 32cf88b
What changes do you think we should make in order to solve the problem?
We should avoid initializing the state this way. Instead, use
defaultDateValuesas a fallback value. This ensuresdefaultDateValuesserves its intended role as a default and eliminates the need for multiple renders to resetdateValues.App/src/components/Search/SearchDatePresetFilterBase.tsx
Lines 67 to 69 in 32cf88b
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)
NA
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.
2025-09-09.18-36-39.mp4
bernhardoj commentedon Sep 9, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Selected date filter is not checked/selected after refresh.
What is the root cause of that problem?
The value is initialized from
defaultDateValues.App/src/components/Search/SearchDatePresetFilterBase.tsx
Line 67 in 89efec0
The
defaultDateValuesis derived fromSEARCH_ADVANCED_FILTERS_FORMonyx data.App/src/components/Search/SearchDatePresetFilterBasePage.tsx
Lines 35 to 42 in 89efec0
However, after refresh, the data is still loading, so it's undefined, and the selected item is not checked.
What changes do you think we should make in order to solve the problem?
We have 2 options.
First of all, we need to get the loading state of the onyx data.
For the 1st option, we can use this loading state as the component key, so it remounts when the key changes.
App/src/components/Search/SearchDatePresetFilterBasePage.tsx
Lines 113 to 119 in 89efec0
For the 2nd option, we can update the value state once the loading completes.
First, pass the loading state to
SearchDatePresetFilterBase.Then, in
SearchDatePresetFilterBase, update the state when the loading completes.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
melvin-bot commentedon Sep 12, 2025
@sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Sep 16, 2025
@sonialiap 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
[-]Report - Saved filter is not shown checked after refresh.[/-][+][$250] Report - Saved filter is not shown checked after refresh.[/+]melvin-bot commentedon Sep 17, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021968225820993416364
32 remaining items
melvin-bot commentedon Oct 31, 2025
@bernhardoj / @getusha @sonialiap 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]
melvin-bot commentedon Nov 7, 2025
Payment Summary
Upwork Job
BugZero Checklist (@sonialiap)
sonialiap commentedon Nov 10, 2025
Payment summary:
@bernhardoj $250 please request in NewDot
@getusha $250 please request in NewDot - please complete the checklist
bernhardoj commentedon Nov 10, 2025
Requested in ND.
getusha commentedon Nov 11, 2025
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: https://github.com/Expensify/App/pull/65518/files#r2513645753
[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.
I think we can add a test since this is something that could easily slip.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:https://github.com/Expensify/Expensify/issues/567735
Regression Test Proposal
Test:
PaidDo we agree 👍 or 👎
quinthar commentedon Nov 19, 2025
Approved $250 to @getusha
garrettmknight commentedon Nov 21, 2025
$250 approved for @bernhardoj