Skip to content

[AI] Add 'Last 30 days' date range option to custom reports#7217

Open
kenkuo wants to merge 3 commits intoactualbudget:masterfrom
kenkuo:feat/last-30-days-range
Open

[AI] Add 'Last 30 days' date range option to custom reports#7217
kenkuo wants to merge 3 commits intoactualbudget:masterfrom
kenkuo:feat/last-30-days-range

Conversation

@kenkuo
Copy link

@kenkuo kenkuo commented Mar 16, 2026

Summary

Add a rolling 30-day date range to the Live mode date filter in custom reports. The new option appears between Last month and Last 3 months in the range dropdown.

Changes

  • ReportOptions.ts — New Last 30 days entry with type: 'Day', enabled for Daily/Weekly/Monthly intervals
  • getLiveRange.tslast30Days case computing today - 29 daystoday (30 inclusive days)
  • disabledList.ts — Disables the Include current period toggle (a rolling-day range always includes today)
  • getLiveRange.test.ts — 5 unit tests covering range calculation, boundary clamping, mode, and includeCurrentInterval invariance
  • upcoming-release-notes/7210.md — Release note

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 26 11.81 MB → 11.81 MB (+808 B) +0.01%
loot-core 1 4.83 MB 0%
api 4 4.05 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
26 11.81 MB → 11.81 MB (+808 B) +0.01%
Changeset
File Δ Size
src/components/reports/getLiveRange.ts 📈 +153 B (+9.90%) 1.51 kB → 1.66 kB
src/components/reports/ReportOptions.ts 📈 +165 B (+2.40%) 6.7 kB → 6.86 kB
src/components/reports/disabledList.ts 📈 +64 B (+1.63%) 3.83 kB → 3.89 kB
locale/en.json 📈 +236 B (+0.14%) 169.04 kB → 169.27 kB
locale/it.json 📈 +190 B (+0.11%) 168.79 kB → 168.97 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/ReportRouter.js 1002.19 kB → 1002.56 kB (+382 B) +0.04%
static/js/en.js 169.04 kB → 169.27 kB (+236 B) +0.14%
static/js/it.js 168.79 kB → 168.97 kB (+190 B) +0.11%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 3.21 MB 0%
static/js/BackgroundImage.js 119.98 kB 0%
static/js/FormulaEditor.js 716.38 kB 0%
static/js/TransactionList.js 81.29 kB 0%
static/js/ca.js 185.62 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 177.63 kB 0%
static/js/en-GB.js 7.16 kB 0%
static/js/es.js 172.13 kB 0%
static/js/fr.js 177.63 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/narrow.js 353.32 kB 0%
static/js/nb-NO.js 154.72 kB 0%
static/js/nl.js 111.58 kB 0%
static/js/pl.js 88.31 kB 0%
static/js/pt-BR.js 180.55 kB 0%
static/js/resize-observer.js 18.03 kB 0%
static/js/th.js 179.94 kB 0%
static/js/theme.js 30.68 kB 0%
static/js/uk.js 213.14 kB 0%
static/js/useTransactionBatchActions.js 4.27 MB 0%
static/js/wide.js 418 B 0%
static/js/workbox-window.prod.es5.js 7.28 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.83 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.Bu63xj1l.js 4.83 MB 0%

api

Total

Files count Total bundle size % Changed
4 4.05 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 3.83 MB 0%
from-Bl-Hslp4.js 167.73 kB 0%
multipart-parser-BnDysoMr.js 8.1 kB 0%
src-iMkUmuwR.js 43.64 kB 0%

Add a rolling 30-day date range to the Live mode date filter in custom
reports. The option appears between 'Last month' and 'Last 3 months'
and is available for Daily, Weekly, and Monthly intervals.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@actual-github-bot actual-github-bot bot changed the title Add 'Last 30 days' date range option to custom reports [WIP] Add 'Last 30 days' date range option to custom reports Mar 16, 2026
@netlify
Copy link

netlify bot commented Mar 16, 2026

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit f153835
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/69b81e634e74c800085a3d0f
😎 Deploy Preview https://deploy-preview-7217.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

👋 Hello contributor!

We would love to review your PR! Before we can do that, please make sure:

  • ✅ All CI checks pass
  • ✅ The PR is moved from draft to open (if applicable)
  • ✅ The "[WIP]" prefix is removed from the PR title
  • ✅ All CodeRabbit code review comments are resolved (if you disagree with anything - reply to the bot with your reasoning so we can read through it). The bot will eventually approve the PR.

We do this to reduce the TOIL the core contributor team has to go through for each PR and to allow for speedy reviews and merges.

For more information, please see our Contributing Guide.

@kenkuo kenkuo changed the title [WIP] Add 'Last 30 days' date range option to custom reports [WIP] [AI} Add 'Last 30 days' date range option to custom reports Mar 16, 2026
@kenkuo kenkuo changed the title [WIP] [AI} Add 'Last 30 days' date range option to custom reports [WIP] [AI] Add 'Last 30 days' date range option to custom reports Mar 16, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

This PR adds a new "Last 30 days" date range option to custom reports in live mode. The changes include configuration updates to enable the option, implementation of the 30-day window calculation logic, comprehensive test coverage, and release notes documentation.

Changes

Cohort / File(s) Summary
Configuration & Options
packages/desktop-client/src/components/reports/ReportOptions.ts, packages/desktop-client/src/components/reports/disabledList.ts
Added "Last 30 days" date range option to dateRangeOptions and currentIntervalOptions with appropriate properties and disable flags.
Date Range Logic
packages/desktop-client/src/components/reports/getLiveRange.ts
Implemented support for "last30Days" range type that computes a 30-day window (current day minus 29 to current day) using validateRange.
Test Coverage
packages/desktop-client/src/components/reports/getLiveRange.test.ts
Added comprehensive test suite covering last 30 days calculation, boundary clamping with earliestTransaction/latestTransaction, includeCurrentInterval flag irrelevance, and sliding-window mode verification.
Release Notes
upcoming-release-notes/7217.md
Documented feature addition of "Last 30 days" date range option to custom reports live mode.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A feature hops into place,
Thirty days in temporal space,
Tests verify every bound,
Clean and sound,
Live reports with a faster pace!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description provides comprehensive details about the changes, covering all modified files and the feature's purpose, which is directly related to the changeset.
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding a 'Last 30 days' date range option to custom reports, which directly matches the primary objective of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable the changed files summary in the walkthrough.

Disable the reviews.changed_files_summary setting to disable the changed files summary in the walkthrough.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 16, 2026
@github-actions
Copy link
Contributor

🤖 Auto-generated Release Notes

Hey @kenkuo! I've automatically created a release notes file based on CodeRabbit's analysis:

Category: Features
Summary: Add "Last 30 days" date range option to custom reports for enhanced reporting flexibility.
File: upcoming-release-notes/7217.md

If you're happy with this release note, you can add it to your pull request. If not, you'll need to add your own before a maintainer can review your change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kenkuo kenkuo changed the title [WIP] [AI] Add 'Last 30 days' date range option to custom reports [AI] Add 'Last 30 days' date range option to custom reports Mar 16, 2026
@youngcw youngcw self-assigned this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants