Skip to content

fix a crash with a recent update of windy#380

Merged
vicb merged 2 commits intomasterfrom
vicb/sdg
Jan 2, 2026
Merged

fix a crash with a recent update of windy#380
vicb merged 2 commits intomasterfrom
vicb/sdg

Conversation

@vicb
Copy link
Owner

@vicb vicb commented Jan 2, 2026

Summary by Sourcery

Delay setting the Windy overlay to clouds to avoid a crash and bump the windy-sounding plugin package version.

Bug Fixes:

  • Work around a crash in the Windy plugin by deferring the overlay change via a timeout.

Build:

  • Increment the windy-sounding package version to 4.1.16.

@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

Warning

Rate limit exceeded

@vicb has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 02217e3 and 99d4c35.

⛔ Files ignored due to path filters (1)
  • libs/windy-sounding/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • libs/windy-sounding/package.json
  • libs/windy-sounding/src/sounding.tsx
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vicb/sdg

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.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 2, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a small delay before setting the Windy overlay to 'clouds' to work around a crash introduced by a recent Windy update, and bumps the windy-sounding package version accordingly.

Sequence diagram for delayed Windy overlay setup in openPlugin

sequenceDiagram
    participant Caller
    participant openPlugin
    participant windyMap
    participant windyStore
    participant centerMap
    participant favs
    participant dispatch
    participant pluginSlice

    Caller->>openPlugin: openPlugin(lat, lon, modelName)
    activate openPlugin
    openPlugin->>openPlugin: create location { lat, lon }

    openPlugin->>windyMap: setZoom(10, { animate: false })

    openPlugin->>openPlugin: schedule overlay update (setTimeout 200ms)
    activate openPlugin
    Note over openPlugin,windyStore: After 200ms
    openPlugin->>windyStore: set('overlay', 'clouds')
    deactivate openPlugin

    openPlugin->>centerMap: centerMap(location)

    openPlugin->>favs: getAll()
    favs-->>openPlugin: favorites
    openPlugin->>pluginSlice: setFavorites(favorites)
    pluginSlice-->>dispatch: action
    dispatch-->>openPlugin: store updated

    openPlugin-->>Caller: Promise resolved
    deactivate openPlugin
Loading

File-Level Changes

Change Details Files
Introduce a delayed overlay update to avoid a crash in the Windy plugin.
  • Wrap the windyStore overlay update in a 200ms setTimeout instead of calling it synchronously
  • Keep map zooming and centering logic unchanged while deferring only the overlay change
  • Document the delay with a TODO comment referencing the upstream crash investigation
libs/windy-sounding/src/sounding.tsx
Bump plugin package version to release the crash workaround.
  • Increment windy-sounding package version from 4.1.15 to 4.1.16
  • Update package-lock to reflect the new version and dependency graph
libs/windy-sounding/package.json
libs/windy-sounding/package-lock.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Since this setTimeout is a temporary workaround, consider extracting the delay (200ms) into a named constant and expanding the TODO with a link or reference to the upstream Windy issue so future maintainers know when it’s safe to remove.
  • If openPlugin can be called multiple times or the component can unmount quickly, you may want to track and clear this timeout to avoid calling windyStore.set on a stale or disposed context.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since this setTimeout is a temporary workaround, consider extracting the delay (200ms) into a named constant and expanding the TODO with a link or reference to the upstream Windy issue so future maintainers know when it’s safe to remove.
- If openPlugin can be called multiple times or the component can unmount quickly, you may want to track and clear this timeout to avoid calling windyStore.set on a stale or disposed context.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@vicb vicb merged commit fe4a96e into master Jan 2, 2026
7 checks passed
@vicb vicb deleted the vicb/sdg branch January 2, 2026 11:13
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.

1 participant