Fix time based group expansion in Reports/Search#81418
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@shubham1206agra, this is ready for review 🙏 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10e3cdfaaf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
trjExpensify
left a comment
There was a problem hiding this comment.
Clean up for Insights 👍
|
@shubham1206agra where are you at with the review? |
|
@cristipaval Steps for repro the bug:
Expected behavior Both date bounds are expected to be followed |
|
you're right @shubham1206agra! great catch! I fixed it now, could you please review and test again? 🙏 |
|
@cristipaval The TS is failing |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-02-11.at.7.11.50.PM.mov |
|
@marcochavezf Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🚧 @marcochavezf has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.3.18-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.18-8 🚀
|
| filters: [ | ||
| { | ||
| operator: CONST.SEARCH.SYNTAX_OPERATORS.EQUAL_TO, | ||
| value: CONST.SEARCH.DATE_PRESETS.LAST_MONTH, // e.g., January 2026: 2026-01-01 to 2026-01-31 | ||
| }, | ||
| { | ||
| operator: CONST.SEARCH.SYNTAX_OPERATORS.GREATER_THAN_OR_EQUAL_TO, | ||
| value: '2025-04-01', // Earlier than preset start | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| const result = SearchUIUtils.adjustTimeRangeToDateFilters(yearDateRange, [dateFilter]); | ||
|
|
||
| // Should intersect: max(preset start, constraint start) = max(2026-01-01, 2025-04-01) = 2026-01-01 | ||
| // The preset start should be preserved, not overwritten by the earlier constraint | ||
| expect(result.start).toBe('2026-01-01'); |
There was a problem hiding this comment.
Starting today (Mar 1), tests failing on main, caused by these tests.
Can someone please fix as priority?
RCA: #83301 (comment)
Explanation of Change
Fixed Issues
$ #81402
PROPOSAL:
Tests
Have some expenses in December 2025. Some before December 15th, some after.
Date filter respected when expanding year groups
type:expense group-by:year date:>=2025-12-15Date filter respected when expanding month groups
type:expense group-by:month date:>=2025-12-15Date filter respected when expanding quarter groups
type:expense group-by:quarter date:>=2025-12-15Date filter with both start and end limits
type:expense group-by:month date:>=2025-12-01 date:<=2025-12-15Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-02-04.at.19.39.34.mov