Skip to content

weather: add MET Norway and an ordered provider fallback list - #4086

Merged
bbedward merged 3 commits into
duxlabs-dev:masterfrom
joshii-h:weather-providers
Nov 3, 2026
Merged

bbedward merged 3 commits into
duxlabs-dev:masterfrom
joshii-h:weather-providers

Conversation

@joshii-h

@joshii-h joshii-h commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Weather providers can be selected, MET Norway added, default stays Open-Meteo.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Closes #3871

Screenshots / video

image

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

A meaningful part of this code was AI generated. I reviewed it, read the
code, and tested it on my desktop, including the test cases.

@github-actions github-actions Bot added feature ui Quickshell UI under quickshell/ labels Nov 2, 2026
@joshii-h joshii-h changed the title Weather providers weather: add MET Norway and an ordered provider fallback list Nov 2, 2026
@joshii-h
joshii-h marked this pull request as ready for review November 2, 2026 20:00
@bbedward

bbedward commented Nov 2, 2026

Copy link
Copy Markdown
Member

/claude review

Comment thread quickshell/Common/WeatherProviders.js Resolved
Comment thread quickshell/Common/WeatherProviders.js Resolved
@claude

claude Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Claude review

The structure is sound. Two problems in the MET Norway mapping.

  • With MET Norway, midnight sun makes every hour count as night, so night icons show all day (polar day has no sunrise or sunset), quickshell/Common/WeatherProviders.js:202
  • With MET Norway, days after the hourly window get no precipitation probability because only next_1_hours is read, quickshell/Common/WeatherProviders.js:186
    Checked: provider fallback chain and cancel/onExited ordering, fetch throttle, settings spec/reset, reorder list wiring, null handling in weather formatters, i18n terms, JS const exports. Model: claude-opus-5-5.

@bbedward

bbedward commented Nov 2, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found. Both earlier findings (midnight sun day/night, 6-hourly precipitation) are fixed in 6d63ee0 and 6bb9de7.
Checked: polar day/night and per-hour is_day in the MET Norway mapping, next_6_hours precipitation fallback, Open-Meteo DST day matching and nullable readings, provider queue/cancel/onExited ordering against location changes and weatherEnabled, primaryProvider refresh, settings spec/reset and reorder row wiring (matches the lyrics providers pattern), deprecated shims, i18n terms. Model: claude-opus-5-5.

@bbedward

bbedward commented Nov 3, 2026

Copy link
Copy Markdown
Member

Probably prefer to move the fetching multiple provider logic to go, maybe dux-go or dms itself at some point. It's much more robust and simpler code-wise than QML, and less lines of QML is generally good

@bbedward
bbedward merged commit 0e99c31 into duxlabs-dev:master Nov 3, 2026
3 checks passed
purian23 pushed a commit that referenced this pull request Nov 3, 2026
@joshii-h

joshii-h commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@bbedward
Makes sense. I'd rather clean this up now than later, so I'm moving it to dux-go the same way lyrics work, and I'm happy to redo the follow-ups for it. #4089 and #4090 stay drafts until the new PR is up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alternative weather providers

2 participants