Skip to content

RG-T132 Fixed Weather alerts info, fixed timezone issue - #125

Merged
ucswift merged 1 commit into
masterfrom
develop
Aug 20, 2026
Merged

ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Aug 20, 2026

Copy link
Copy Markdown
Member

This PR fixes weather alert date/time handling and updates weather alert details to use the correct alert fields.

What changed

  • Corrected weather alert date usage across the app

    • Weather alert detail, list, and widget screens now prefer the newer UTC timestamp fields (EffectiveOnUtc, OnsetOnUtc, ExpiresOnUtc) when available.
    • Older fields are still used as a fallback for compatibility.
  • Fixed timezone-related “time ago” calculations

    • Updated the shared UTC relative-time utility so it correctly handles:
      • UTC timestamps with Z
      • timestamps with explicit offsets
      • legacy zone-less UTC strings
      • Date objects and epoch values
    • This prevents incorrect offset shifting for timestamps that already include timezone information.
  • Updated weather alert sender display

    • Weather alert detail now shows the sender from Sender instead of SenderName, matching the current data model.
  • Aligned the weather alert model with current API data

    • Expanded the weather alert result model to include newer fields such as source identifiers, geocodes, sent/updated timestamps, notification-related fields, and the new explicit UTC timestamp fields.
    • Added defaults/comments that distinguish display-only date strings from true UTC values intended for date calculations.

Functional impact

  • Weather alerts should now display more accurate effective/onset/expiration times.
  • Sorting and expiry calculations for alerts should behave correctly across timezones.
  • Sender information in alert details now uses the correct field from the returned alert data.
  • The app is better aligned with newer weather alert payloads while preserving fallback support for older servers.

Validation

  • Added unit tests covering the UTC “time ago” behavior for:
    • Z-based UTC timestamps
    • offset-based timestamps
    • legacy zone-less strings
    • Date instances
    • epoch milliseconds
    • empty input

@Resgrid-Bot

Resgrid-Bot commented Aug 20, 2026

Copy link
Copy Markdown

Code Review Could Not Complete ⚠️

The review failed before suggestions could be generated.

Reason: Rate limit reached on the provider (openai). Try again in a few minutes.

After fixing the issue, comment @kody review on this PR to re-run the review.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 59 minutes

Limit details: You’ve used the included review currently available. Your 61 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7191c947-687f-45d8-b04e-f2d9eda7d3b2

📥 Commits

Reviewing files that changed from the base of the PR and between 7de9c6f and 58774ab.

📒 Files selected for processing (6)
  • src/app/(app)/weather-alert-detail.tsx
  • src/app/(app)/weather-alerts.tsx
  • src/components/widgets/WeatherAlertsWidget.tsx
  • src/lib/__tests__/get-time-ago-utc.test.ts
  • src/lib/utils.ts
  • src/models/v4/weatherAlerts/weatherAlertResultData.ts

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

@ucswift

ucswift commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift
ucswift merged commit 13c48e7 into master Aug 20, 2026
6 of 7 checks passed
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.

2 participants