Skip to content

Make live weather explicitly opt-in - #76

Merged
gitar-bot[bot] merged 2 commits into
mainfrom
fix/weather-network-opt-in
Aug 28, 2026
Merged

Make live weather explicitly opt-in#76
gitar-bot[bot] merged 2 commits into
mainfrom
fix/weather-network-opt-in

Conversation

@offyotto

@offyotto offyotto commented Aug 28, 2026

Copy link
Copy Markdown
Owner

No description provided.

Comment thread Core-Monitor/TouchBarCustomizationCompatibility.swift
@gitar-bot
gitar-bot Bot enabled auto-merge (squash) August 28, 2026 02:32

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@gitar-bot gitar-bot Bot added the gitar-approved Added by Gitar label Aug 28, 2026
@gitar-bot

gitar-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Adds explicit opt-in consent for live weather to avoid unintended network requests. Consider removing the Weather widget from the strip when disabling—currently it leaves a dormant tile that users must manually delete, creating inconsistent behavior with the symmetric enable operation.

Auto-approved and auto-merge armed: No blocking issues found.
Please see Auto-approve Docs for details on setting custom approval criteria. — merges when pipeline and required approvals pass.

✅ 1 resolved
Quality: Disabling Live Weather leaves the Weather widget in the strip

📄 Core-Monitor/TouchBarCustomizationCompatibility.swift:441-447 📄 Core-Monitor/SettingsWindow.swift:271-277
setWeatherEnabled(true) appends the Weather widget, but setWeatherEnabled(false) only flips the consent flag and leaves the widget in items, so the strip keeps showing a dormant 'Weather Off / Enable in Settings' tile that the user must separately delete via 'Active Items'. The footer text ('Enabling this adds the Weather widget') implies symmetric behavior. Consider removing the built-in weather item when disabling for consistency, e.g. filter it out of updatedItems when enabled == false.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@gitar-bot
gitar-bot Bot merged commit aa00d39 into main Aug 28, 2026
6 of 7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ecf9f482b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if enabled && contains(.weather) == false {
updatedItems.append(.builtIn(.weather))
}
applyConfiguration(items: updatedItems, weatherEnabled: enabled)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent refresh completion after disabling weather

When the user turns off Enable Live Weather while a location or WeatherKit request is awaiting completion, this keeps the Weather widget in the layout and causes the controller to call stop(), which sets the model to idle. However, the in-flight refreshNow() has no cancellation or isRunning check before publishing its result, so it can subsequently replace the idle state with a cached/loaded snapshot or a cancellation error; tasks spawned by the location-change subscriber are not canceled by stop() either. The still-visible widget can therefore continue showing weather or an error after opt-out instead of “Weather Off”; ensure all refresh completion paths are ignored after the model stops.

Useful? React with 👍 / 👎.

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

Labels

gitar-approved Added by Gitar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant