Skip to content

fix: foxy-report-form preset range boundaries for quarter/month/year dates#241

Merged
brettflorio merged 2 commits into
mainfrom
copilot/fix-reportform-last-quarter-dates
Apr 17, 2026
Merged

fix: foxy-report-form preset range boundaries for quarter/month/year dates#241
brettflorio merged 2 commits into
mainfrom
copilot/fix-reportform-last-quarter-dates

Conversation

Copilot AI commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Previous quarter in foxy-report-form was deriving the start date from the current day-of-month (e.g., 2026-01-17) instead of the start of the quarter (2026-01-01). The same boundary bug existed in other calendar presets that relied on safeDate without an explicit day.

  • Range boundary fix (ReportForm utils)

    • Updated preset range generators to always pass day = 1 when computing month/quarter/year boundaries.
    • Applied to:
      • getPreviousQuarter
      • getCurrentQuarter
      • getPreviousMonth
      • getCurrentMonth
      • getPreviousYear
      • getCurrentYear
    • This aligns all calendar-based presets to true period boundaries while preserving last_30_days / last_365_days rolling-window behavior.
  • Regression coverage

    • Added focused assertions for all ReportForm presets at a fixed date (2026-04-17) to verify exact start/end timestamps.
    • Added explicit year-rollover coverage for previous quarter (Q1 -> prior year Q4).
  • Context screenshot (reported behavior)

// Before (day omitted => inherited current day-of-month semantics)
const start = safeDate(previousQuarterYear, previousQuarterStart);

// After (explicit period boundary)
const start = safeDate(previousQuarterYear, previousQuarterStart, 1);
const end = new Date(safeDate(previousQuarterYear, previousQuarterEnd + 1, 1).getTime() - 1);

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4193 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-BpcevG --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,11992544122591300552,508853977962956305,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,15713964178969131021,7527648787434593863,4 (dns block)
    • Triggering command: /usr/bin/chromium /usr/bin/chromium --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=Translate,BackForwardCache --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4626 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-Gv6CD5 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,5223233508890081597,10386814658780217278,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,14672616940011151164,17197520959422021783,4 (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4193 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-BpcevG --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,11992544122591300552,508853977962956305,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,15713964178969131021,7527648787434593863,4 (dns block)
    • Triggering command: /usr/bin/chromium /usr/bin/chromium --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=Translate,BackForwardCache --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4626 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-Gv6CD5 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,5223233508890081597,10386814658780217278,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,14672616940011151164,17197520959422021783,4 (dns block)
  • content-autofill.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4193 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-BpcevG --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,11992544122591300552,508853977962956305,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,15713964178969131021,7527648787434593863,4 (dns block)
    • Triggering command: /usr/bin/chromium /usr/bin/chromium --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=Translate,BackForwardCache --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4626 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-Gv6CD5 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,5223233508890081597,10386814658780217278,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,14672616940011151164,17197520959422021783,4 (dns block)
  • https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/982053/chrome-linux.zip
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node install.js (http block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4193 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-BpcevG --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,11992544122591300552,508853977962956305,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,15713964178969131021,7527648787434593863,4 (dns block)
    • Triggering command: /usr/bin/chromium /usr/bin/chromium --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=Translate,BackForwardCache --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=4626 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-Gv6CD5 --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,5223233508890081597,10386814658780217278,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=BackForwardCache,PaintHolding,Translate --variations-seed-version --pseudonymization-salt-handle=7,i,14672616940011151164,17197520959422021783,4 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix: ReportForm 'Last Quarter' start date error Fix foxy-report-form preset range boundaries for quarter/month/year dates Apr 17, 2026
Copilot AI requested a review from pheekus April 17, 2026 21:28
@pheekus pheekus requested a review from brettflorio April 17, 2026 21:46
@pheekus pheekus marked this pull request as ready for review April 17, 2026 21:46
@pheekus pheekus changed the title Fix foxy-report-form preset range boundaries for quarter/month/year dates fix: foxy-report-form preset range boundaries for quarter/month/year dates Apr 17, 2026
@brettflorio brettflorio merged commit 36493ed into main Apr 17, 2026
6 of 10 checks passed
@brettflorio brettflorio deleted the copilot/fix-reportform-last-quarter-dates branch April 17, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reports: "Last Quarter" start date is incorrectly set

3 participants