Skip to content

Refuse weather coordinates off the globe - #18810

Closed
ThePrimeagen wants to merge 1 commit into
omacom:quattrofrom
ThePrimeagen:fix/weather-invalid-coords
Closed

ThePrimeagen wants to merge 1 commit into
omacom:quattrofrom
ThePrimeagen:fix/weather-invalid-coords

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

omarchy-weather-location --set Home 91,181 saves a place off the globe and exits 0, because bin/omarchy-weather-location checks only that the pair looks like two numbers. After the next shell start the bar's weather icon is gone and the panel sits on "Fetching forecast…", and parseLocationFile in shell/plugins/panels/weather/Model.js lets a hand-written weather.json do the same.

Screenshots

Before After
before after

Reproduce

  1. Press Super + Return to open a terminal.
  2. Run omarchy-weather-location --set Home 91,181; echo $?: it prints 0.
  3. Run cat ~/.local/state/omarchy/settings/weather.json: it holds "latitude":91,"longitude":181.
  4. Run omarchy-restart-shell and wait a minute: the weather icon never appears in the top bar.
  5. Run omarchy-notification-weather: the panel shows no temperature, only "Fetching forecast…".

More cases

A weather.json written by hand at 91,181, after a shell restart

Before After
before after

Just past the other edges, -91,0, 0,-181, 90.0001,0, 0,180.0001, and a pair typed longitude first

Before After
before after

Related

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR rejects weather coordinates outside latitude ±90 and longitude ±180.

  • Weather location settings reject coordinates beyond the globe.
  • The weather panel ignores coordinates beyond the globe.

No actionable issues found. Review was based on source inspection; tests were not run.

Reviews (2) · Last reviewed commit: "Refuse weather coordinates off the globe" · Reviewed by Greptile

@omarchybot

Copy link
Copy Markdown
Collaborator

Closing as a duplicate of #18553: the same range check, which also stops a failed write from emptying weather.json.

Reviewed by Claude Opus 5.5 with Codex Medium as a second opinion; its independence is not guaranteed.

@omarchybot omarchybot added the duplicate This issue or pull request already exists label Nov 16, 2026
@omarchybot omarchybot closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants