Skip to content

issue-1379: Fix for invalid date bug in CAP warnings#1380

Merged
geosaaga merged 1 commit into
mainfrom
feature/1379-invalid-time-in-CAP-warnings
Jun 22, 2026
Merged

issue-1379: Fix for invalid date bug in CAP warnings#1380
geosaaga merged 1 commit into
mainfrom
feature/1379-invalid-time-in-CAP-warnings

Conversation

@geosaaga

@geosaaga geosaaga commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #1379

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.

Pull request overview

Fixes the CAP warnings header timespan aggregation so that multiple non-overlapping warning intervals no longer produce an “Invalid date” expiry string (issue #1379).

Changes:

  • Reworked header timespan interval-building logic to merge overlaps safely and always produce valid onset/expiry pairs.
  • Added a regression test ensuring the header does not render “Invalid date” when warnings contain multiple separate time spans.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/warnings/cap/WarningBlock.tsx Replaces the previous timespan grouping algorithm with a safer interval merge approach to prevent invalid expiry rendering.
__tests__/components/WarningBlockCap.test.tsx Adds a regression test covering multiple separate warning timespans to ensure “Invalid date” is not rendered.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@geosaaga geosaaga merged commit 938294f into main Jun 22, 2026
3 checks passed
@geosaaga geosaaga deleted the feature/1379-invalid-time-in-CAP-warnings branch June 22, 2026 09:40
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.

Fix "Invalid time" bug in CAP warnings

2 participants