Skip to content

PZB-1285: report the selected date range for alerts, not another window - #5266

Merged
guilherme-n merged 2 commits into
developfrom
pzb-1285-v2
Sep 9, 2026
Merged

guilherme-n merged 2 commits into
developfrom
pzb-1285-v2

Conversation

@guilherme-n

Copy link
Copy Markdown
Collaborator

Overview

A range past the end of an alert system's data was falling back to that system's default window, so every GLAD-L range after 2026-07-25 reported the same 329,403 alerts for Brazil under the dates the user had picked.
The map time slider also ran to today, because it took its end from the dataset's publication date rather than its last day of alerts.

Demo

Screenshot 2026-09-09 at 13 22 58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The changed download date-range behavior lacks regression coverage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Fixes alert counts and map timelines to reflect selected and available alert dates accurately.

Changes:

  • Resolves latest dates from alert data tables.
  • Preserves user-selected ranges instead of substituting defaults.
  • Adds regression tests for date resolution and widget queries.
File summaries
File Description
services/latest-alert-date.js Adds shared latest-alert-date resolution.
services/analysis-cached.js Reuses shared date resolution.
services/__tests__/latest-alert-date.spec.js Tests latest-date behavior.
providers/latest-provider/actions.js Corrects map timeline end dates.
providers/latest-provider/__tests__/actions.spec.js Tests timeline date resolution.
components/widgets/forest-change/integrated-deforestation-alerts/index.js Preserves selected query and download ranges.
components/widgets/forest-change/integrated-deforestation-alerts/index.spec.js Tests selected-range behavior.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@guilherme-n
guilherme-n temporarily deployed to gfw-staging-pr-5266 September 9, 2026 17:24 Inactive

@willian-viana willian-viana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@guilherme-n
guilherme-n merged commit c57ddd6 into develop Sep 9, 2026
4 checks passed
@guilherme-n
guilherme-n deleted the pzb-1285-v2 branch September 9, 2026 17:40
@gtempus gtempus mentioned this pull request Sep 9, 2026
gtempus added a commit that referenced this pull request Sep 9, 2026
Deploy to Production

Bug Fixes:
- Fix GLAD-L alerts missing on Flagship since 7/25 (PZB-1285, #5264)
- Fix alert counts showing the wrong date range (PZB-1285, #5266)
- Fix widget metadata modal erroring out on analyze (PZB-1204, #5262)
- Fix zoom/color issue in encoded maps (PZB-1178, #5260)

Content/Copy Updates:
- Rename and reposition "Places to Watch" (PZB-1258, #5261)
- Update "Other Tools" links (PZB-1284, #5265)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
gfw-staging-pr-5266 — 1ed4bace Deployed Sep 9, 2026 by guilherme-n
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.

3 participants