Repository navigation
[Payment due @marufsharifi] Deprecate Year to date in favor of This year - #104074
Conversation
Removes Year to date from the date picker, switches the Insights default to this-year, and resolves and labels saved year-to-date values as This year.
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Insights comparisons compare Year to date month for month like This year, so its separate same-days-last-year comparison is removed. The anyApproval getDatePresets test no longer expects Year to date.
|
Given that all mentioned PRs are now merged, can we take this out of draft now and put it up for review? |
|
Asking because we are currently seeing this in product, and we think this PR might solve this issue of plotting future periods that have no data (and thus, shouldn't be graphed). cc @mhawryluk
|
to be precise, it's the other issue that this PR fixes - the previous and current period buckets not being correctly paired up at the end (2 Novembers, 2 Decembers) |
# Conflicts: # src/pages/Insights/insightsCompare.ts # tests/unit/Search/SearchUIUtilsTest.ts
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cebf7a92c0
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee0f6f5296
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Is this ready for my review? |
|
@FitseTLT yes, the failing check is unrelated. I merged main branch and pushed. It might succeed now. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bc6e02b80
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@FitseTLT could you review this PR? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01973f75cd
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks, fixed both. Saved Year to date searches now open and save as This year, and a typed year-to-date query becomes this-year too. Applying the unchanged date filter keeps the selection and the loaded results, even offline. |
|
Awesome, looks like we are ready for another review. |
|
@marufsharifi please jump in for that review today! |
BUG. Applying an unchanged date filter from a legacy link clears selected expensesSteps:
Expected result: The expense remains checked and the bulk-action toolbar remains available. Actual Result: The checkbox clears and the bulk-action toolbar disappears. Video_2026-11-02_15-22-46.mp4 |
|
@c3024, back to you. thanks. |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Still good on my end. Just working through C+ review.
|
Thanks. This only happens when an old year-to-date URL is opened directly, which the app no longer creates. Saved Searches already work well. When ytd url is manually typed or opened with a stale bookmark, only the first Apply clears the selection. It moves the URL to this-year, and later Applies keep the selection. IMO this edge case is not worth rewriting the URL on page load for this. |
|
@marufsharifi, if you find anything else please raise them so I can fix them quickly and we can move this PR forward. |
|
🎯 @marufsharifi, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
@JS00001 when you're ready. Let's try to get this one merged |
|
🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.28-4 🚀
|
|
Help site update needed. This PR replaced the Year to date preset with This year, but an example query in Use Search Operators to Filter and Analyze still uses it:
[No QA] Docs updates for E/A#104074 Use this-year in Spend over time search example changes @c3024, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Users can't save year-to-date searches anymore, and old saved year-to-date searches now open as this-year. There should be very few of these, so I think this is enough as the final fix without a separate migration. If we still want to migrate, there are two options:
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.30-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.30-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #105800 |

Explanation of Change
Year to date is deprecated in favor of This year, which covers the whole year including future-dated expenses. This removes Year to date from the date picker and switches the Insights default to
this-year.year-to-datestays a valid search value, so saved searches, saved Insights filters, and links keep working. It now resolves to the whole year and is labeled This year, matching the Auth alias.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/690021
PROPOSAL: N/A
Tests
date:year-to-dateand verify the chip reads This year and the results cover the whole year.Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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